Skip to content

Commit 7522a65

Browse files
committed
Prevent overwriting default with a translation
1 parent 5200afd commit 7522a65

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/i18n/i18n.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const languageFiles = {
55
'be-BY': async () => (await import('./json/be-BY.json')).default,
66
'bn-BD': async () => (await import('./json/bn-BD.json')).default,
77
'de-DE': async () => (await import('./json/de-DE.json')).default,
8+
'en-US': async () => (await import('./json/en-US.json')).default,
89
'es-ES': async () => (await import('./json/es-ES.json')).default,
910
'fa-IR': async () => (await import('./json/fa-IR.json')).default,
1011
'fr-FR': async () => (await import('./json/fr-FR.json')).default,
@@ -31,4 +32,4 @@ export const languageFiles = {
3132
'zh-Hant': async () => (await import('./json/zh-Hant.json')).default,
3233
};
3334

34-
export const supportedLocales = [defaultLocale].concat(Object.keys(languageFiles));
35+
export const supportedLocales = [defaultLocale].concat(Object.keys(languageFiles).filter(x=>x!==defaultLocale));

src/i18n/json/en-US.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"React lifecycle methods diagram": "React lifecycle methods diagram",
3+
"Options": "Options",
4+
"Show less-common lifecycles": "Show less-common lifecycles",
5+
"Mounting": "Mounting",
6+
"Updating": "Updating",
7+
"Unmounting": "Unmounting",
8+
"“{name} phase”": "“{name} phase”",
9+
"Pure and has no side effects. May be paused, aborted or restarted by React.": "Pure and has no side effects. May be paused, aborted or restarted by React.",
10+
"Can read the DOM.": "Can read the DOM.",
11+
"Can work with DOM, run side effects, schedule updates.": "Can work with DOM, run side effects, schedule updates.",
12+
"React updates DOM and refs": "React updates DOM and refs",
13+
"Read docs for {name} (opens in a new tab)": "Read docs for {name} (opens in a new tab)",
14+
"//reactjs.org/docs/react-component.html#{docname}": "//reactjs.org/docs/react-component.html#{docname}",
15+
"See project's page on GitHub (opens in a new tab)": "See project's page on GitHub (opens in a new tab)"
16+
}

0 commit comments

Comments
 (0)