|
| 1 | +import * as bg from "./bg/index"; |
1 | 2 | import * as de from "./de/index"; |
2 | 3 | import * as en from "./en/index"; |
3 | | -import * as ga from './ga/index' |
| 4 | +import * as es from "./es/index"; |
| 5 | +import * as fr from "./fr/index"; |
| 6 | +import * as ga from "./ga/index"; |
4 | 7 | import * as id from "./id/index"; |
5 | 8 | import * as it from "./it/index"; |
6 | 9 | import * as ja from "./ja/index"; |
| 10 | +import * as ko from "./ko/index"; |
7 | 11 | import * as nl from "./nl/index"; |
8 | 12 | import * as pl from "./pl/index"; |
9 | 13 | import * as ru from "./ru/index"; |
10 | 14 | import * as sk from "./sk/index"; |
11 | 15 | import * as vi from "./vi/index"; |
12 | 16 | import * as zh from "./zh/index"; |
13 | | -import * as ko from "./ko/index"; |
14 | | -import * as bg from "./bg/index"; |
15 | 17 |
|
16 | | -const items: any = { en, de, ja, sk, zh, pl, ru, it, vi, nl, bg, ko, ga, id } |
| 18 | +const items: any = { en, de, es, ja, sk, zh, pl, ru, it, vi, nl, bg, ko, ga, id, fr }; |
17 | 19 |
|
18 | 20 | const fallbackLang = "en"; |
19 | 21 |
|
20 | 22 | export const getHelpFile = (lang: string, section: string): string => { |
21 | | - if ( |
22 | | - typeof items[lang] !== "undefined" && |
23 | | - typeof items[lang][section] !== "undefined" |
24 | | - ) { |
| 23 | + if (typeof items[lang] !== "undefined" && typeof items[lang][section] !== "undefined") { |
25 | 24 | return items[lang][section].default; |
26 | 25 | } |
27 | 26 | // Fallback to English |
28 | | - if ( |
29 | | - typeof items[fallbackLang] !== "undefined" && |
30 | | - typeof items[fallbackLang][section] !== "undefined" |
31 | | - ) { |
| 27 | + if (typeof items[fallbackLang] !== "undefined" && typeof items[fallbackLang][section] !== "undefined") { |
32 | 28 | return items[fallbackLang][section].default; |
33 | 29 | } |
34 | 30 | throw new Error(`Cannot load help doc for ${lang}-${section}`); |
|
0 commit comments