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