diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-12 15:49:03 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-12 15:49:03 +0100 |
| commit | 37020d847e66e57913d493716e98f4dcab749262 (patch) | |
| tree | a6bfa0c49bcec61ff91465f323142db43511a122 /src/i18n | |
| parent | 18b85566df437ac932f59e94cbec771a4a331927 (diff) | |
Applies Prettier
Diffstat (limited to 'src/i18n')
| -rw-r--r-- | src/i18n/locales.ts | 4 | ||||
| -rw-r--r-- | src/i18n/translate.ts | 14 | ||||
| -rw-r--r-- | src/i18n/translations/pages/furthsettins.ts | 8 | ||||
| -rw-r--r-- | src/i18n/translations/pages/home.ts | 8 | ||||
| -rw-r--r-- | src/i18n/translations/site.ts | 20 |
5 files changed, 27 insertions, 27 deletions
diff --git a/src/i18n/locales.ts b/src/i18n/locales.ts index 4192e3f..306810c 100644 --- a/src/i18n/locales.ts +++ b/src/i18n/locales.ts @@ -2,7 +2,7 @@ import type Locale from '../types/Locale'; // Use the magic of TypeScript to guarantee completeness const localesHash: { [key in Locale]: 1 } = { - 'sco': 1, + sco: 1, 'en-GB': 1, }; @@ -13,4 +13,4 @@ const defaultLocaleAsLocale: Locale = 'sco'; const defaultLocale: 'sco' = defaultLocaleAsLocale; export { defaultLocale }; -export default Object.keys(localesHash) as Locale[];
\ No newline at end of file +export default Object.keys(localesHash) as Locale[]; 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 + }; +} diff --git a/src/i18n/translations/pages/furthsettins.ts b/src/i18n/translations/pages/furthsettins.ts index c46e2ad..41da32b 100644 --- a/src/i18n/translations/pages/furthsettins.ts +++ b/src/i18n/translations/pages/furthsettins.ts @@ -1,11 +1,11 @@ -import type { TranslationsDictionary } from "../../../types/TranslationsDictionary"; +import type { TranslationsDictionary } from '../../../types/TranslationsDictionary'; const furthsettinsTranslations = { - 'title': { - 'sco': 'Furthsettins', + title: { + sco: 'Furthsettins', 'en-GB': 'Publications', }, }; type Keys = keyof typeof furthsettinsTranslations; -export default furthsettinsTranslations as TranslationsDictionary<Keys>;
\ No newline at end of file +export default furthsettinsTranslations as TranslationsDictionary<Keys>; diff --git a/src/i18n/translations/pages/home.ts b/src/i18n/translations/pages/home.ts index 1415024..0dff80d 100644 --- a/src/i18n/translations/pages/home.ts +++ b/src/i18n/translations/pages/home.ts @@ -1,11 +1,11 @@ -import type { TranslationsDictionary } from "../../../types/TranslationsDictionary"; +import type { TranslationsDictionary } from '../../../types/TranslationsDictionary'; const homeTranslations = { - 'title': { - 'sco': 'Hame', + title: { + sco: 'Hame', 'en-GB': 'Home', }, }; type Keys = keyof typeof homeTranslations; -export default homeTranslations as TranslationsDictionary<Keys>;
\ No newline at end of file +export default homeTranslations as TranslationsDictionary<Keys>; diff --git a/src/i18n/translations/site.ts b/src/i18n/translations/site.ts index 726f22c..89e9ed5 100644 --- a/src/i18n/translations/site.ts +++ b/src/i18n/translations/site.ts @@ -1,23 +1,23 @@ -import type { TranslationsDictionary } from "../../types/TranslationsDictionary"; +import type { TranslationsDictionary } from '../../types/TranslationsDictionary'; const siteTranslations = { - 'title': { - 'sco': 'Scots Leid Associe', + title: { + sco: 'Scots Leid Associe', 'en-GB': 'Scots Language Society', }, - 'description': { - 'sco': 'The wabsteid o the Scots Leid Associe', + description: { + sco: 'The wabsteid o the Scots Leid Associe', 'en-GB': 'The website of the Scots Language Society', }, - 'lallans': { - 'sco': 'Lallans', + lallans: { + sco: 'Lallans', 'en-GB': 'Lallans', }, - 'by': { - 'sco': 'bi', + by: { + sco: 'bi', 'en-GB': 'by', }, }; type Keys = keyof typeof siteTranslations; -export default siteTranslations as TranslationsDictionary<Keys>;
\ No newline at end of file +export default siteTranslations as TranslationsDictionary<Keys>; |
