diff options
| -rw-r--r-- | apps/kit/src/lib/i18n/i18n-types.ts | 77 | ||||
| -rw-r--r-- | apps/kit/src/lib/i18n/i18n-util.async.ts | 4 | ||||
| -rw-r--r-- | apps/kit/src/lib/i18n/i18n-util.sync.ts | 6 | ||||
| -rw-r--r-- | apps/kit/src/lib/i18n/i18n-util.ts | 3 | ||||
| -rw-r--r-- | apps/kit/src/lib/i18n/nb/app/index.ts | 8 | ||||
| -rw-r--r-- | apps/kit/src/lib/i18n/nb/index.ts | 50 |
6 files changed, 109 insertions, 39 deletions
diff --git a/apps/kit/src/lib/i18n/i18n-types.ts b/apps/kit/src/lib/i18n/i18n-types.ts index 8383731..0df6d1a 100644 --- a/apps/kit/src/lib/i18n/i18n-types.ts +++ b/apps/kit/src/lib/i18n/i18n-types.ts @@ -7,6 +7,7 @@ export type BaseLocale = 'en' export type Locales = | 'en' + | 'nb' export type Translation = RootTranslation & DisallowNamespaces @@ -17,163 +18,163 @@ export type Translations = RootTranslation & type RootTranslation = { /** - * Or + * Or */ or: string /** - * Email address + * Email address */ emailAddress: string /** - * Password + * Password */ password: string /** - * Page not found + * Page not found */ pageNotFound: string /** - * It seems like your device does not have a internet connection, please check your connection. + * It seems like your device does not have a internet connection, please check your connection. */ noInternet: string /** - * Reset + * Reset */ reset: string /** - * {0} of {1} + * {0} of {1} * @param {unknown} 0 * @param {unknown} 1 */ of: RequiredParams<'0' | '1'> /** - * {0} is required + * {0} is required * @param {unknown} 0 */ isRequired: RequiredParams<'0'> /** - * Submit + * Submit */ submit: string /** - * Success + * Success */ success: string /** - * Try again soon + * Try again soon */ tryAgainSoon: string /** - * Create a new account + * Create a new account */ createANewAccount: string /** - * An unexpected error occured + * An unexpected error occured */ unexpectedError: string /** - * Not found + * Not found */ notFound: string /** - * Documentation + * Documentation */ documentation: string /** - * Terms of service + * Terms of service */ tos: string /** - * Privacy policy + * Privacy policy */ privacyPolicy: string /** - * Sign into your account + * Sign into your account */ signIntoYourAccount: string signInPage: { /** - * This is not my computer + * This is not my computer */ notMyComputer: string /** - * Reset password + * Reset password */ resetPassword: string /** - * Your password is updated + * Your password is updated */ yourPasswordIsUpdated: string /** - * Sign In + * Sign In */ signIn: string /** - * Your new password is applied + * Your new password is applied */ yourNewPasswordIsApplied: string /** - * Sign in below + * Sign in below */ signInBelow: string /** - * Your account is disabled + * Your account is disabled */ yourAccountIsDisabled: string /** - * Contact your administrator if this feels wrong + * Contact your administrator if this feels wrong */ contactYourAdminIfDisabled: string /** - * You've reached the hidden inactivity limit + * You've reached the hidden inactivity limit */ youHaveReachedInactivityLimit: string /** - * Feel free to sign in again + * Feel free to sign in again */ feelFreeToSignInAgain: string } signUpPage: { /** - * Create your new account + * Create your new account */ createYourNewAccount: string } resetPasswordPage: { /** - * Set a new password + * Set a new password */ setANewPassword: string /** - * Expired + * Expired */ expired: string /** - * Your request has expired + * Your request has expired */ requestHasExpired: string /** - * Request a new reset + * Request a new reset */ requestANewReset: string /** - * New password + * New password */ newPassword: string /** - * If we find your email address in our systems, you will receive an email with instructions on how to set a new password for your account. + * If we find your email address in our systems, you will receive an email with instructions on how to set a new password for your account. */ requestSentMessage: string /** - * Request a password reset + * Request a password reset */ requestAPasswordReset: string /** - * Your request was not found + * Your request was not found */ requestNotFound: string /** - * Submit a new reset request below + * Submit a new reset request below */ submitANewRequestBelow: string } diff --git a/apps/kit/src/lib/i18n/i18n-util.async.ts b/apps/kit/src/lib/i18n/i18n-util.async.ts index 3e8fa1b..00b8e0a 100644 --- a/apps/kit/src/lib/i18n/i18n-util.async.ts +++ b/apps/kit/src/lib/i18n/i18n-util.async.ts @@ -7,11 +7,15 @@ import { loadedFormatters, loadedLocales, locales } from './i18n-util' const localeTranslationLoaders = { en: () => import('./en'), + nb: () => import('./nb'), } const localeNamespaceLoaders = { en: { app: () => import('./en/app') + }, + nb: { + app: () => import('./nb/app') } } diff --git a/apps/kit/src/lib/i18n/i18n-util.sync.ts b/apps/kit/src/lib/i18n/i18n-util.sync.ts index 8f749c7..8144fdc 100644 --- a/apps/kit/src/lib/i18n/i18n-util.sync.ts +++ b/apps/kit/src/lib/i18n/i18n-util.sync.ts @@ -6,14 +6,20 @@ import type { Locales, Translations } from './i18n-types' import { loadedFormatters, loadedLocales, locales } from './i18n-util' import en from './en' +import nb from './nb' import en_app from './en/app' +import nb_app from './nb/app' const localeTranslations = { en: { ...en, app: en_app }, + nb: { + ...nb, + app: nb_app + }, } export const loadLocale = (locale: Locales): void => { diff --git a/apps/kit/src/lib/i18n/i18n-util.ts b/apps/kit/src/lib/i18n/i18n-util.ts index 09b0155..35f023c 100644 --- a/apps/kit/src/lib/i18n/i18n-util.ts +++ b/apps/kit/src/lib/i18n/i18n-util.ts @@ -9,7 +9,8 @@ import type { Formatters, Locales, Namespaces, Translations, TranslationFunction export const baseLocale: Locales = 'en' export const locales: Locales[] = [ - 'en' + 'en', + 'nb' ] export const namespaces: Namespaces[] = [ diff --git a/apps/kit/src/lib/i18n/nb/app/index.ts b/apps/kit/src/lib/i18n/nb/app/index.ts new file mode 100644 index 0000000..15d0b9a --- /dev/null +++ b/apps/kit/src/lib/i18n/nb/app/index.ts @@ -0,0 +1,8 @@ +import type { NamespaceAppTranslation } from '../../i18n-types' + +const nb_app: NamespaceAppTranslation = { + // TODO: insert translations + +} + +export default nb_app diff --git a/apps/kit/src/lib/i18n/nb/index.ts b/apps/kit/src/lib/i18n/nb/index.ts new file mode 100644 index 0000000..6ddc6ad --- /dev/null +++ b/apps/kit/src/lib/i18n/nb/index.ts @@ -0,0 +1,50 @@ +import type { Translation } from "../i18n-types"; + +const nb: Translation = { + or: "Eller", + emailAddress: "E-postadresse", + password: "Passord", + pageNotFound: "Fant ikke siden", + noInternet: "Det ser ut som at du ikke tilkoblet internettet, sjekk tilkoblingen din for å fortsette", + reset: "Tilbakestill", + of: "{0} av {1}", + isRequired: "{0} er påkrevd", + submit: "Send", + success: "Suksess", + tryAgainSoon: "Prøv igjen snart", + createANewAccount: "Lag en ny konto", + unexpectedError: "En uventet feil oppstod", + notFound: "Ikke funnet", + documentation: "Dokumentasjon", + tos: "Bruksvilkår", + privacyPolicy: "Personvernerklæring", + signIntoYourAccount: "Logg inn med din konto", + signInPage: { + notMyComputer: "Dette er ikke min datamaskin", + resetPassword: "Tilbakestill passord", + yourPasswordIsUpdated: "Ditt passord er oppdater", + signIn: "Logg inn", + yourNewPasswordIsApplied: "Ditt nye passord er satt", + signInBelow: "Logg inn nedenfor", + yourAccountIsDisabled: "Din konto er deaktivert", + contactYourAdminIfDisabled: "Ta kontakt med din administrator hvis dette føles feil", + youHaveReachedInactivityLimit: "Du har nådd den hemmelige inaktivitetsgrensen", + feelFreeToSignInAgain: "Logg gjerne inn igjen" + }, + signUpPage: { + createYourNewAccount: "Opprett din nye konto", + }, + resetPasswordPage: { + setANewPassword: "Skriv et nytt passord", + expired: "Utgått", + requestHasExpired: "Din forespørsel er utgått", + requestANewReset: "Spør om en ny tilbakestillingslenke", + newPassword: "Nytt passord", + requestSentMessage: "Hvis vi finner e-postadressen din i våre systemer, vil du få en e-post med instrukser for å sette ditt nye passord.", + requestAPasswordReset: "Forespør tilbakestilling av ditt passord", + requestNotFound: "Din forespørsel ble ikke funnet", + submitANewRequestBelow: "Spør om en ny tilbakestillingslenke nedenfor" + } +} + +export default nb;
\ No newline at end of file |
