Skip to content

A full-featured download manager.

refactor: i18n sort locale key

Dr_rOot3152252fb89e
diff --git a/src/shared/locales/all.js b/src/shared/locales/all.js
index ca4038ce..3414fa72 100644
--- a/src/shared/locales/all.js
+++ b/src/shared/locales/all.js
@@ -11,6 +11,7 @@ import appLocaleZhTW from '@shared/locales/zh-TW'
import appLocaleTr from '@shared/locales/tr'
import appLocaleFr from '@shared/locales/fr'
+// Please keep the locale key in alphabetical order.
const resources = {
'en-US': {
translation: {
@@ -18,6 +19,12 @@ const resources = {
...appLocaleEnUS
}
},
+ 'fr': {
+ translation: {
+ ...eleLocaleFr,
+ ...appLocaleFr
+ }
+ },
'pt-BR': {
translation: {
...eleLocalePtBR,
@@ -41,12 +48,6 @@ const resources = {
...eleLocaleZhTW,
...appLocaleZhTW
}
- },
- 'fr': {
- translation: {
- ...eleLocaleFr,
- ...appLocaleFr
- }
}
}
diff --git a/src/shared/locales/app.js b/src/shared/locales/app.js
index ec24bb8d..2a83d706 100644
--- a/src/shared/locales/app.js
+++ b/src/shared/locales/app.js
@@ -5,35 +5,36 @@ import appLocaleZhTW from '@shared/locales/zh-TW'
import appLocaleTrTR from '@shared/locales/tr'
import appLocaleFrFR from '@shared/locales/fr'
+// Please keep the locale key in alphabetical order.
const resources = {
'en-US': {
translation: {
...appLocaleEnUS
}
},
- 'pt-BR': {
+ 'fr': {
translation: {
- ...appLocalePtBr
+ ...appLocaleFrFR
}
},
- 'zh-CN': {
+ 'pt-BR': {
translation: {
- ...appLocaleZhCN
+ ...appLocalePtBr
}
},
- 'zh-TW': {
+ 'tr': {
translation: {
- ...appLocaleZhTW
+ ...appLocaleTrTR
}
},
- 'tr': {
+ 'zh-CN': {
translation: {
- ...appLocaleTrTR
+ ...appLocaleZhCN
}
},
- 'fr': {
+ 'zh-TW': {
translation: {
- ...appLocaleFrFR
+ ...appLocaleZhTW
}
}
}
diff --git a/src/shared/locales/index.js b/src/shared/locales/index.js
index f8aa1965..fb6679c1 100644
--- a/src/shared/locales/index.js
+++ b/src/shared/locales/index.js
@@ -2,20 +2,22 @@
* Welcome to translate to more versions in other languages.
* Please read the translation guide before starting work.
* https://github.com/agalwood/Motrix/blob/master/CONTRIBUTING.md#-translation-guide
+ *
+ * Please keep the locale key in alphabetical order.
*/
export const availableLanguages = [
{
value: 'en-US',
label: 'English'
},
- {
- value: 'pt-BR',
- label: 'Português (Brasil)'
- },
{
value: 'fr',
label: 'Français'
},
+ {
+ value: 'pt-BR',
+ label: 'Português (Brasil)'
+ },
{
value: 'tr',
label: 'Türkçe'