mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
I18n: Fix and reenable verify-i18n CI check (#87496)
* I18n: Change verify-i18n script to use node_deb image with make in it * remove swagger from i18n make * make verify-i18n fail ci * fix incorrect and unextracted nav translations * fix more copy paste
This commit is contained in:
parent
b383cafd35
commit
c41ec46b29
13
.drone.yml
13
.drone.yml
@ -241,7 +241,6 @@ steps:
|
||||
image: node:20.9.0-alpine
|
||||
name: lint-frontend
|
||||
- commands:
|
||||
- apk add --update git
|
||||
- |-
|
||||
make i18n-extract || (echo "
|
||||
Extraction failed. Make sure that you have no dynamic translation phrases, such as 't(\`preferences.theme.\$${themeID}\`, themeName)' and that no translation key is used twice. Search the output for '[warning]' to find the offending file." && false)
|
||||
@ -252,8 +251,7 @@ steps:
|
||||
\ "
|
||||
depends_on:
|
||||
- yarn-install
|
||||
failure: ignore
|
||||
image: node:20.9.0-alpine
|
||||
image: node:20-bookworm
|
||||
name: verify-i18n
|
||||
trigger:
|
||||
event:
|
||||
@ -1625,7 +1623,6 @@ steps:
|
||||
image: node:20.9.0-alpine
|
||||
name: lint-frontend
|
||||
- commands:
|
||||
- apk add --update git
|
||||
- |-
|
||||
make i18n-extract || (echo "
|
||||
Extraction failed. Make sure that you have no dynamic translation phrases, such as 't(\`preferences.theme.\$${themeID}\`, themeName)' and that no translation key is used twice. Search the output for '[warning]' to find the offending file." && false)
|
||||
@ -1636,8 +1633,7 @@ steps:
|
||||
\ "
|
||||
depends_on:
|
||||
- yarn-install
|
||||
failure: ignore
|
||||
image: node:20.9.0-alpine
|
||||
image: node:20-bookworm
|
||||
name: verify-i18n
|
||||
trigger:
|
||||
branch: main
|
||||
@ -4923,3 +4919,8 @@ get:
|
||||
path: secret/data/common/gcr
|
||||
kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 7397697ccc703dc375a0f90ba8a12fd978c2972f37fdffbdca1f72ff3991b339
|
||||
|
||||
...
|
||||
|
2
Makefile
2
Makefile
@ -118,7 +118,7 @@ ifeq ("$(wildcard $(ENTERPRISE_FE_EXT_FILE))","") ## if enterprise is not enable
|
||||
i18n-extract-enterprise:
|
||||
@echo "Skipping i18n extract for Enterprise: not enabled"
|
||||
else
|
||||
i18n-extract-enterprise: $(SWAGGER) ## Generate API Swagger specification
|
||||
i18n-extract-enterprise:
|
||||
@echo "Extracting i18n strings for Enterprise"
|
||||
yarn run i18next --config public/locales/i18next-parser-enterprise.config.cjs
|
||||
node ./public/locales/pseudo.mjs --mode enterprise
|
||||
|
@ -265,7 +265,7 @@ export function getNavSubTitle(navId: string | undefined) {
|
||||
case 'admin':
|
||||
return t(
|
||||
'nav.admin.subtitle',
|
||||
'Manage Alertmanager configurations and configure where alert instances generated from Grafana managed alert rules are sent'
|
||||
'Manage server-wide settings and access to resources such as organizations, users, and licenses'
|
||||
);
|
||||
case 'cfg/general':
|
||||
return t('nav.config-general.subtitle', 'Manage default preferences and settings across Grafana');
|
||||
|
@ -887,8 +887,8 @@
|
||||
"title": "Alerting"
|
||||
},
|
||||
"alerting-admin": {
|
||||
"title": "Settings",
|
||||
"subtitle": "Manage Alertmanager configurations and configure where alert instances generated from Grafana managed alert rules are sent"
|
||||
"subtitle": "Manage Alertmanager configurations and configure where alert instances generated from Grafana managed alert rules are sent",
|
||||
"title": "Settings"
|
||||
},
|
||||
"alerting-am-routes": {
|
||||
"subtitle": "Determine how alerts are routed to contact points",
|
||||
|
@ -887,6 +887,7 @@
|
||||
"title": "Åľęřŧįʼnģ"
|
||||
},
|
||||
"alerting-admin": {
|
||||
"subtitle": "Mäʼnäģę Åľęřŧmäʼnäģęř čőʼnƒįģūřäŧįőʼnş äʼnđ čőʼnƒįģūřę ŵĥęřę äľęřŧ įʼnşŧäʼnčęş ģęʼnęřäŧęđ ƒřőm Ğřäƒäʼnä mäʼnäģęđ äľęřŧ řūľęş äřę şęʼnŧ",
|
||||
"title": "Ŝęŧŧįʼnģş"
|
||||
},
|
||||
"alerting-am-routes": {
|
||||
|
@ -644,13 +644,11 @@ def verify_i18n_step():
|
||||
uncommited_error_message = "\nTranslation extraction has not been committed. Please run 'make i18n-extract', commit the changes and push again."
|
||||
return {
|
||||
"name": "verify-i18n",
|
||||
"image": images["node"],
|
||||
"image": images["node_deb"],
|
||||
"depends_on": [
|
||||
"yarn-install",
|
||||
],
|
||||
"failure": "ignore",
|
||||
"commands": [
|
||||
"apk add --update git",
|
||||
"make i18n-extract || (echo \"{}\" && false)".format(extract_error_message),
|
||||
# Verify that translation extraction has been committed
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user