Skip to content

Commit a253af8

Browse files
committed
Prevent overwriting default with a translation
1 parent e95b6f0 commit a253af8

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

src/i18n/i18n.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ export const languageFiles = {
3232
'zh-Hant': async () => (await import('./json/zh-Hant.json')).default,
3333
};
3434

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

src/i18n/json/en-US.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
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)"
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)"
1616
}

0 commit comments

Comments
 (0)