diff options
Diffstat (limited to 'src/i18n/translate.ts')
| -rw-r--r-- | src/i18n/translate.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/i18n/translate.ts b/src/i18n/translate.ts index c0d5620..b407e3b 100644 --- a/src/i18n/translate.ts +++ b/src/i18n/translate.ts @@ -1,9 +1,9 @@ -import type Locale from "../types/Locale"; -import type { TranslationsDictionary } from "../types/TranslationsDictionary"; -import { defaultLocale } from "./locales"; +import type Locale from '../types/Locale'; +import type { TranslationsDictionary } from '../types/TranslationsDictionary'; +import { defaultLocale } from './locales'; -export default function(locale: Locale) { - return function<T extends string>(dict: TranslationsDictionary<T>, key: T) { +export default function (locale: Locale) { + return function <T extends string>(dict: TranslationsDictionary<T>, key: T) { return dict[key][locale] ?? dict[key][defaultLocale]; - } -}
\ No newline at end of file + }; +} |
