Skip to content

Commit

Permalink
I18n: Reset back to default plural seperators (#76284)
Browse files Browse the repository at this point in the history
* reset to standard plural seperators for crowdin compatibility

* update docs
  • Loading branch information
joshhunt authored Oct 10, 2023
1 parent bb7ca78 commit 0d39038
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 84 deletions.
4 changes: 2 additions & 2 deletions contribute/internationalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ Once extracted with `yarn i18n:extract` you will need to manually edit the [Engl
```json
{
"inbox": {
"heading__one": "You got {{count}} message",
"heading__other": "You got {{count}} messages"
"heading_one": "You got {{count}} message",
"heading_other": "You got {{count}} messages"
}
}
```
Expand Down
2 changes: 0 additions & 2 deletions public/app/core/internationalization/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export function initializeI18n(language: string) {

// If translations are empty strings (no translation), fall back to the default value in source code
returnEmptyString: false,

pluralSeparator: '__',
};
let init = i18n;
if (language === 'detect') {
Expand Down
24 changes: 12 additions & 12 deletions public/locales/de-DE/grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
"new-folder-name-required-phrase": ""
},
"counts": {
"alertRule__one": "",
"alertRule__other": "",
"dashboard__one": "",
"dashboard__other": "",
"folder__one": "",
"folder__other": "",
"libraryPanel__one": "",
"libraryPanel__other": "",
"total__one": "",
"total__other": ""
"alertRule_one": "",
"alertRule_other": "",
"dashboard_one": "",
"dashboard_other": "",
"folder_one": "",
"folder_other": "",
"libraryPanel_one": "",
"libraryPanel_other": "",
"total_one": "",
"total_other": ""
},
"dashboards-tree": {
"collapse-folder-button": "",
Expand Down Expand Up @@ -429,8 +429,8 @@
},
"library-panels": {
"modal": {
"body__one": "",
"body__other": "",
"body_one": "",
"body_other": "",
"button-cancel": "",
"button-view-panel1": "",
"button-view-panel2": "",
Expand Down
24 changes: 12 additions & 12 deletions public/locales/en-US/grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
"new-folder-name-required-phrase": "Folder name is required."
},
"counts": {
"alertRule__one": "{{count}} alert rule",
"alertRule__other": "{{count}} alert rules",
"dashboard__one": "{{count}} dashboard",
"dashboard__other": "{{count}} dashboards",
"folder__one": "{{count}} folder",
"folder__other": "{{count}} folders",
"libraryPanel__one": "{{count}} library panel",
"libraryPanel__other": "{{count}} library panels",
"total__one": "{{count}} item",
"total__other": "{{count}} items"
"alertRule_one": "{{count}} alert rule",
"alertRule_other": "{{count}} alert rules",
"dashboard_one": "{{count}} dashboard",
"dashboard_other": "{{count}} dashboards",
"folder_one": "{{count}} folder",
"folder_other": "{{count}} folders",
"libraryPanel_one": "{{count}} library panel",
"libraryPanel_other": "{{count}} library panels",
"total_one": "{{count}} item",
"total_other": "{{count}} items"
},
"dashboards-tree": {
"collapse-folder-button": "Collapse folder {{title}}",
Expand Down Expand Up @@ -429,8 +429,8 @@
},
"library-panels": {
"modal": {
"body__one": "This panel is being used in {{count}} dashboard. Please choose which dashboard to view the panel in:",
"body__other": "This panel is being used in {{count}} dashboards. Please choose which dashboard to view the panel in:",
"body_one": "This panel is being used in {{count}} dashboard. Please choose which dashboard to view the panel in:",
"body_other": "This panel is being used in {{count}} dashboards. Please choose which dashboard to view the panel in:",
"button-cancel": "<0>Cancel</0>",
"button-view-panel1": "View panel in {{label}}...",
"button-view-panel2": "View panel in dashboard...",
Expand Down
36 changes: 18 additions & 18 deletions public/locales/es-ES/grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@
"new-folder-name-required-phrase": ""
},
"counts": {
"alertRule__one": "",
"alertRule__many": "",
"alertRule__other": "",
"dashboard__one": "",
"dashboard__many": "",
"dashboard__other": "",
"folder__one": "",
"folder__many": "",
"folder__other": "",
"libraryPanel__one": "",
"libraryPanel__many": "",
"libraryPanel__other": "",
"total__one": "",
"total__many": "",
"total__other": ""
"alertRule_one": "",
"alertRule_many": "",
"alertRule_other": "",
"dashboard_one": "",
"dashboard_many": "",
"dashboard_other": "",
"folder_one": "",
"folder_many": "",
"folder_other": "",
"libraryPanel_one": "",
"libraryPanel_many": "",
"libraryPanel_other": "",
"total_one": "",
"total_many": "",
"total_other": ""
},
"dashboards-tree": {
"collapse-folder-button": "",
Expand Down Expand Up @@ -434,9 +434,9 @@
},
"library-panels": {
"modal": {
"body__one": "",
"body__many": "",
"body__other": "",
"body_one": "",
"body_many": "",
"body_other": "",
"button-cancel": "",
"button-view-panel1": "",
"button-view-panel2": "",
Expand Down
36 changes: 18 additions & 18 deletions public/locales/fr-FR/grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@
"new-folder-name-required-phrase": ""
},
"counts": {
"alertRule__one": "",
"alertRule__many": "",
"alertRule__other": "",
"dashboard__one": "",
"dashboard__many": "",
"dashboard__other": "",
"folder__one": "",
"folder__many": "",
"folder__other": "",
"libraryPanel__one": "",
"libraryPanel__many": "",
"libraryPanel__other": "",
"total__one": "",
"total__many": "",
"total__other": ""
"alertRule_one": "",
"alertRule_many": "",
"alertRule_other": "",
"dashboard_one": "",
"dashboard_many": "",
"dashboard_other": "",
"folder_one": "",
"folder_many": "",
"folder_other": "",
"libraryPanel_one": "",
"libraryPanel_many": "",
"libraryPanel_other": "",
"total_one": "",
"total_many": "",
"total_other": ""
},
"dashboards-tree": {
"collapse-folder-button": "",
Expand Down Expand Up @@ -434,9 +434,9 @@
},
"library-panels": {
"modal": {
"body__one": "",
"body__many": "",
"body__other": "",
"body_one": "",
"body_many": "",
"body_other": "",
"button-cancel": "",
"button-view-panel1": "",
"button-view-panel2": "",
Expand Down
2 changes: 0 additions & 2 deletions public/locales/i18next-parser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module.exports = {

output: './public/locales/$LOCALE/$NAMESPACE.json',

pluralSeparator: '__',

sort: true,

createOldCatalogs: false,
Expand Down
24 changes: 12 additions & 12 deletions public/locales/pseudo-LOCALE/grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
"new-folder-name-required-phrase": "Főľđęř ʼnämę įş řęqūįřęđ."
},
"counts": {
"alertRule__one": "{{count}} äľęřŧ řūľę",
"alertRule__other": "{{count}} äľęřŧ řūľęş",
"dashboard__one": "{{count}} đäşĥþőäřđ",
"dashboard__other": "{{count}} đäşĥþőäřđş",
"folder__one": "{{count}} ƒőľđęř",
"folder__other": "{{count}} ƒőľđęřş",
"libraryPanel__one": "{{count}} ľįþřäřy päʼnęľ",
"libraryPanel__other": "{{count}} ľįþřäřy päʼnęľş",
"total__one": "{{count}} įŧęm",
"total__other": "{{count}} įŧęmş"
"alertRule_one": "{{count}} äľęřŧ řūľę",
"alertRule_other": "{{count}} äľęřŧ řūľęş",
"dashboard_one": "{{count}} đäşĥþőäřđ",
"dashboard_other": "{{count}} đäşĥþőäřđş",
"folder_one": "{{count}} ƒőľđęř",
"folder_other": "{{count}} ƒőľđęřş",
"libraryPanel_one": "{{count}} ľįþřäřy päʼnęľ",
"libraryPanel_other": "{{count}} ľįþřäřy päʼnęľş",
"total_one": "{{count}} įŧęm",
"total_other": "{{count}} įŧęmş"
},
"dashboards-tree": {
"collapse-folder-button": "Cőľľäpşę ƒőľđęř {{title}}",
Expand Down Expand Up @@ -429,8 +429,8 @@
},
"library-panels": {
"modal": {
"body__one": "Ŧĥįş päʼnęľ įş þęįʼnģ ūşęđ įʼn {{count}} đäşĥþőäřđ. Pľęäşę čĥőőşę ŵĥįčĥ đäşĥþőäřđ ŧő vįęŵ ŧĥę päʼnęľ įʼn:",
"body__other": "Ŧĥįş päʼnęľ įş þęįʼnģ ūşęđ įʼn {{count}} đäşĥþőäřđş. Pľęäşę čĥőőşę ŵĥįčĥ đäşĥþőäřđ ŧő vįęŵ ŧĥę päʼnęľ įʼn:",
"body_one": "Ŧĥįş päʼnęľ įş þęįʼnģ ūşęđ įʼn {{count}} đäşĥþőäřđ. Pľęäşę čĥőőşę ŵĥįčĥ đäşĥþőäřđ ŧő vįęŵ ŧĥę päʼnęľ įʼn:",
"body_other": "Ŧĥįş päʼnęľ įş þęįʼnģ ūşęđ įʼn {{count}} đäşĥþőäřđş. Pľęäşę čĥőőşę ŵĥįčĥ đäşĥþőäřđ ŧő vįęŵ ŧĥę päʼnęľ įʼn:",
"button-cancel": "<0>Cäʼnčęľ</0>",
"button-view-panel1": "Vįęŵ päʼnęľ įʼn {{label}}...",
"button-view-panel2": "Vįęŵ päʼnęľ įʼn đäşĥþőäřđ...",
Expand Down
12 changes: 6 additions & 6 deletions public/locales/zh-Hans/grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"new-folder-name-required-phrase": ""
},
"counts": {
"alertRule__other": "",
"dashboard__other": "",
"folder__other": "",
"libraryPanel__other": "",
"total__other": ""
"alertRule_other": "",
"dashboard_other": "",
"folder_other": "",
"libraryPanel_other": "",
"total_other": ""
},
"dashboards-tree": {
"collapse-folder-button": "",
Expand Down Expand Up @@ -424,7 +424,7 @@
},
"library-panels": {
"modal": {
"body__other": "",
"body_other": "",
"button-cancel": "",
"button-view-panel1": "",
"button-view-panel2": "",
Expand Down

0 comments on commit 0d39038

Please sign in to comment.