aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/kit/src/lib/i18n/en/index.ts57
-rw-r--r--apps/kit/src/lib/i18n/formatters.ts2
-rw-r--r--apps/kit/src/lib/i18n/i18n-types.ts412
-rw-r--r--apps/kit/src/lib/i18n/nb/index.ts31
4 files changed, 272 insertions, 230 deletions
diff --git a/apps/kit/src/lib/i18n/en/index.ts b/apps/kit/src/lib/i18n/en/index.ts
index f3def1b..6a0c3ac 100644
--- a/apps/kit/src/lib/i18n/en/index.ts
+++ b/apps/kit/src/lib/i18n/en/index.ts
@@ -1,14 +1,39 @@
-import type {BaseTranslation} from "../i18n-types";
+import type { BaseTranslation } from "../i18n-types";
const en: BaseTranslation = {
+ common: {
+ or: "Or",
+ logIn: "Log in",
+ password: "Password",
+ active: "Active",
+ reset: "Reset",
+ description: "Description",
+ save: "Save",
+ create: "Create",
+ archived: "Archived",
+ emailAddress: "Email address",
+ name: "Name",
+ color: "Color",
+ profile: "Profile",
+ logout: "Log out",
+ labels: "Labels",
+ categories: "Categories",
+ of: "{0} of {1}",
+ category: "Category",
+ isRequired: "{0} is required",
+ submit: "Submit",
+ send: "Send {0}",
+ request: "Request",
+ success: "Success",
+ tryAgainSoon: "Kindly try again soon",
+ unexpectedError: "An unexpected error occured",
+ },
nav: {
home: "Home",
data: "Data",
settings: "Settings",
usermenu: {
- logout: "Log out",
logoutTitle: "Log out of your profile",
- profile: "Profile",
profileTitle: "Administrate your profile",
toggleTitle: "Toggle user menu",
}
@@ -17,46 +42,28 @@ const en: BaseTranslation = {
dataTablePaginator: {
goToPrevPage: "Go to previous page",
goToNextPage: "Go to next page",
- of: "of",
},
categoryForm: {
- name: "Name",
- color: "Color",
defaultLabels: "Default labels",
labelsPlaceholder: "Search or create"
},
settingsCategoriesTile: {
deleteAllConfirm: "Are you sure you want to delete this category?\nThis will delete all relating entries!",
- active: "Active",
- archived: "Archived",
- name: "Name",
- color: "Color",
editEntry: "Edit entry",
deleteEntry: "Delete entry",
noCategories: "No categories",
- categories: "Categories"
},
settingsLabelsTile: {
deleteAllConfirm: "Are you sure you want to delete this label?\nIt will be removed from all related entries!",
- active: "Active",
- archived: "Archived",
- name: "Name",
- color: "Color",
editEntry: "Edit label",
deleteEntry: "Delete label",
noLabels: "No labels",
- labels: "Labels"
},
entryForm: {
entryUpdateError: "An error occured while updating the entry, try again soon.",
entryCreateError: "An error occured while creating the entry, try again soon.",
errDescriptionReq: "Description is required",
- reset: "Reset",
- description: "Description",
- save: "Save",
- create: "Create",
category: {
- category: "Category",
placeholder: "Search or create",
noResults: "No categories available (Create a new one by searching for it)",
errisRequired: "Category is required",
@@ -123,14 +130,16 @@ const en: BaseTranslation = {
},
login: {
loginToYourAccount: "Log in to your account",
- or: "Or",
createANewAccount: "create a new account",
- emailAddress: "Email address",
password: "Password",
notMyComputer: "This is not my computer",
forgotPassword: "Forgot your password?",
- logIn: "Log in"
},
+ reset: {
+ resetPassword: "Request a password reset",
+ gotoLoginPage: "Go to login page",
+ requestSentMessage: "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."
+ }
};
export default en;
diff --git a/apps/kit/src/lib/i18n/formatters.ts b/apps/kit/src/lib/i18n/formatters.ts
index 78734f9..5232b7d 100644
--- a/apps/kit/src/lib/i18n/formatters.ts
+++ b/apps/kit/src/lib/i18n/formatters.ts
@@ -1,3 +1,4 @@
+import { capitalise } from '$lib/helpers'
import type { FormattersInitializer } from 'typesafe-i18n'
import type { Locales, Formatters } from './i18n-types'
@@ -5,6 +6,7 @@ export const initFormatters: FormattersInitializer<Locales, Formatters> = (local
const formatters: Formatters = {
// add your formatter functions here
+ capitalise: (value: string) => capitalise(value)
}
return formatters
diff --git a/apps/kit/src/lib/i18n/i18n-types.ts b/apps/kit/src/lib/i18n/i18n-types.ts
index f3e0f80..3efe059 100644
--- a/apps/kit/src/lib/i18n/i18n-types.ts
+++ b/apps/kit/src/lib/i18n/i18n-types.ts
@@ -14,6 +14,112 @@ export type Translation = RootTranslation
export type Translations = RootTranslation
type RootTranslation = {
+ common: {
+ /**
+ * Or
+ */
+ or: string
+ /**
+ * Log in
+ */
+ logIn: string
+ /**
+ * Password
+ */
+ password: string
+ /**
+ * Active
+ */
+ active: string
+ /**
+ * Reset
+ */
+ reset: string
+ /**
+ * Description
+ */
+ description: string
+ /**
+ * Save
+ */
+ save: string
+ /**
+ * Create
+ */
+ create: string
+ /**
+ * Archived
+ */
+ archived: string
+ /**
+ * Email address
+ */
+ emailAddress: string
+ /**
+ * Name
+ */
+ name: string
+ /**
+ * Color
+ */
+ color: string
+ /**
+ * Profile
+ */
+ profile: string
+ /**
+ * Log out
+ */
+ logout: string
+ /**
+ * Labels
+ */
+ labels: string
+ /**
+ * Categories
+ */
+ categories: string
+ /**
+ * {0} of {1}
+ * @param {unknown} 0
+ * @param {unknown} 1
+ */
+ of: RequiredParams<'0' | '1'>
+ /**
+ * Category
+ */
+ category: string
+ /**
+ * {0} is required
+ * @param {unknown} 0
+ */
+ isRequired: RequiredParams<'0'>
+ /**
+ * Submit
+ */
+ submit: string
+ /**
+ * Send {0}
+ * @param {unknown} 0
+ */
+ send: RequiredParams<'0'>
+ /**
+ * Request
+ */
+ request: string
+ /**
+ * Success
+ */
+ success: string
+ /**
+ * Kindly try again soon
+ */
+ tryAgainSoon: string
+ /**
+ * An unexpected error occured
+ */
+ unexpectedError: string
+ }
nav: {
/**
* Home
@@ -29,18 +135,10 @@ type RootTranslation = {
settings: string
usermenu: {
/**
- * Log out
- */
- logout: string
- /**
* Log out of your profile
*/
logoutTitle: string
/**
- * Profile
- */
- profile: string
- /**
* Administrate your profile
*/
profileTitle: string
@@ -60,21 +158,9 @@ type RootTranslation = {
* Go to next page
*/
goToNextPage: string
- /**
- * of
- */
- of: string
}
categoryForm: {
/**
- * Name
- */
- name: string
- /**
- * Color
- */
- color: string
- /**
* Default labels
*/
defaultLabels: string
@@ -90,22 +176,6 @@ type RootTranslation = {
*/
deleteAllConfirm: string
/**
- * Active
- */
- active: string
- /**
- * Archived
- */
- archived: string
- /**
- * Name
- */
- name: string
- /**
- * Color
- */
- color: string
- /**
* Edit entry
*/
editEntry: string
@@ -117,10 +187,6 @@ type RootTranslation = {
* No categories
*/
noCategories: string
- /**
- * Categories
- */
- categories: string
}
settingsLabelsTile: {
/**
@@ -129,22 +195,6 @@ type RootTranslation = {
*/
deleteAllConfirm: string
/**
- * Active
- */
- active: string
- /**
- * Archived
- */
- archived: string
- /**
- * Name
- */
- name: string
- /**
- * Color
- */
- color: string
- /**
* Edit label
*/
editEntry: string
@@ -156,10 +206,6 @@ type RootTranslation = {
* No labels
*/
noLabels: string
- /**
- * Labels
- */
- labels: string
}
entryForm: {
/**
@@ -174,28 +220,8 @@ type RootTranslation = {
* Description is required
*/
errDescriptionReq: string
- /**
- * Reset
- */
- reset: string
- /**
- * Description
- */
- description: string
- /**
- * Save
- */
- save: string
- /**
- * Create
- */
- create: string
category: {
/**
- * Category
- */
- category: string
- /**
* Search or create
*/
placeholder: string
@@ -422,18 +448,10 @@ type RootTranslation = {
*/
loginToYourAccount: string
/**
- * Or
- */
- or: string
- /**
* create a new account
*/
createANewAccount: string
/**
- * Email address
- */
- emailAddress: string
- /**
* Password
*/
password: string
@@ -445,14 +463,126 @@ type RootTranslation = {
* Forgot your password?
*/
forgotPassword: string
+ }
+ reset: {
/**
- * Log in
+ * Request a password reset
*/
- logIn: string
+ resetPassword: string
+ /**
+ * Go to login page
+ */
+ gotoLoginPage: 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.
+ */
+ requestSentMessage: string
}
}
export type TranslationFunctions = {
+ common: {
+ /**
+ * Or
+ */
+ or: () => LocalizedString
+ /**
+ * Log in
+ */
+ logIn: () => LocalizedString
+ /**
+ * Password
+ */
+ password: () => LocalizedString
+ /**
+ * Active
+ */
+ active: () => LocalizedString
+ /**
+ * Reset
+ */
+ reset: () => LocalizedString
+ /**
+ * Description
+ */
+ description: () => LocalizedString
+ /**
+ * Save
+ */
+ save: () => LocalizedString
+ /**
+ * Create
+ */
+ create: () => LocalizedString
+ /**
+ * Archived
+ */
+ archived: () => LocalizedString
+ /**
+ * Email address
+ */
+ emailAddress: () => LocalizedString
+ /**
+ * Name
+ */
+ name: () => LocalizedString
+ /**
+ * Color
+ */
+ color: () => LocalizedString
+ /**
+ * Profile
+ */
+ profile: () => LocalizedString
+ /**
+ * Log out
+ */
+ logout: () => LocalizedString
+ /**
+ * Labels
+ */
+ labels: () => LocalizedString
+ /**
+ * Categories
+ */
+ categories: () => LocalizedString
+ /**
+ * {0} of {1}
+ */
+ of: (arg0: unknown, arg1: unknown) => LocalizedString
+ /**
+ * Category
+ */
+ category: () => LocalizedString
+ /**
+ * {0} is required
+ */
+ isRequired: (arg0: unknown) => LocalizedString
+ /**
+ * Submit
+ */
+ submit: () => LocalizedString
+ /**
+ * Send {0}
+ */
+ send: (arg0: unknown) => LocalizedString
+ /**
+ * Request
+ */
+ request: () => LocalizedString
+ /**
+ * Success
+ */
+ success: () => LocalizedString
+ /**
+ * Kindly try again soon
+ */
+ tryAgainSoon: () => LocalizedString
+ /**
+ * An unexpected error occured
+ */
+ unexpectedError: () => LocalizedString
+ }
nav: {
/**
* Home
@@ -468,18 +598,10 @@ export type TranslationFunctions = {
settings: () => LocalizedString
usermenu: {
/**
- * Log out
- */
- logout: () => LocalizedString
- /**
* Log out of your profile
*/
logoutTitle: () => LocalizedString
/**
- * Profile
- */
- profile: () => LocalizedString
- /**
* Administrate your profile
*/
profileTitle: () => LocalizedString
@@ -499,21 +621,9 @@ export type TranslationFunctions = {
* Go to next page
*/
goToNextPage: () => LocalizedString
- /**
- * of
- */
- of: () => LocalizedString
}
categoryForm: {
/**
- * Name
- */
- name: () => LocalizedString
- /**
- * Color
- */
- color: () => LocalizedString
- /**
* Default labels
*/
defaultLabels: () => LocalizedString
@@ -529,22 +639,6 @@ export type TranslationFunctions = {
*/
deleteAllConfirm: () => LocalizedString
/**
- * Active
- */
- active: () => LocalizedString
- /**
- * Archived
- */
- archived: () => LocalizedString
- /**
- * Name
- */
- name: () => LocalizedString
- /**
- * Color
- */
- color: () => LocalizedString
- /**
* Edit entry
*/
editEntry: () => LocalizedString
@@ -556,10 +650,6 @@ export type TranslationFunctions = {
* No categories
*/
noCategories: () => LocalizedString
- /**
- * Categories
- */
- categories: () => LocalizedString
}
settingsLabelsTile: {
/**
@@ -568,22 +658,6 @@ export type TranslationFunctions = {
*/
deleteAllConfirm: () => LocalizedString
/**
- * Active
- */
- active: () => LocalizedString
- /**
- * Archived
- */
- archived: () => LocalizedString
- /**
- * Name
- */
- name: () => LocalizedString
- /**
- * Color
- */
- color: () => LocalizedString
- /**
* Edit label
*/
editEntry: () => LocalizedString
@@ -595,10 +669,6 @@ export type TranslationFunctions = {
* No labels
*/
noLabels: () => LocalizedString
- /**
- * Labels
- */
- labels: () => LocalizedString
}
entryForm: {
/**
@@ -613,28 +683,8 @@ export type TranslationFunctions = {
* Description is required
*/
errDescriptionReq: () => LocalizedString
- /**
- * Reset
- */
- reset: () => LocalizedString
- /**
- * Description
- */
- description: () => LocalizedString
- /**
- * Save
- */
- save: () => LocalizedString
- /**
- * Create
- */
- create: () => LocalizedString
category: {
/**
- * Category
- */
- category: () => LocalizedString
- /**
* Search or create
*/
placeholder: () => LocalizedString
@@ -857,18 +907,10 @@ export type TranslationFunctions = {
*/
loginToYourAccount: () => LocalizedString
/**
- * Or
- */
- or: () => LocalizedString
- /**
* create a new account
*/
createANewAccount: () => LocalizedString
/**
- * Email address
- */
- emailAddress: () => LocalizedString
- /**
* Password
*/
password: () => LocalizedString
@@ -880,10 +922,20 @@ export type TranslationFunctions = {
* Forgot your password?
*/
forgotPassword: () => LocalizedString
+ }
+ reset: {
/**
- * Log in
+ * Request a password reset
*/
- logIn: () => LocalizedString
+ resetPassword: () => LocalizedString
+ /**
+ * Go to login page
+ */
+ gotoLoginPage: () => LocalizedString
+ /**
+ * 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: () => LocalizedString
}
}
diff --git a/apps/kit/src/lib/i18n/nb/index.ts b/apps/kit/src/lib/i18n/nb/index.ts
index b350994..4329f14 100644
--- a/apps/kit/src/lib/i18n/nb/index.ts
+++ b/apps/kit/src/lib/i18n/nb/index.ts
@@ -1,4 +1,4 @@
-import type {Translation} from "../i18n-types";
+import type { Translation } from "../i18n-types";
const nb: Translation = {
nav: {
@@ -6,57 +6,37 @@ const nb: Translation = {
data: "Data",
settings: "Innstillinger",
usermenu: {
- logout: "Logg ut",
logoutTitle: "Logg ut av din profil",
- profile: "Profil",
profileTitle: "Administrer din profil",
toggleTitle: "Vis brukermeny"
}
},
views: {
categoryForm: {
- name: "Navn",
- color: "Farge",
defaultLabels: "Standard merknader",
labelsPlaceholder: "Søk eller opprett"
},
dataTablePaginator: {
goToPrevPage: "Gå til forrige side",
goToNextPage: "Gå til neste side",
- of: "av",
},
settingsCategoriesTile: {
deleteAllConfirm: "Er du sikker på at du vil slette denne kategorien?\nDette vil slette alle tilhørende rader!",
- active: "Aktive",
- archived: "Arkiverte",
- name: "Navn",
- color: "Farge",
editEntry: "Rediger kategori",
deleteEntry: "Slett kategori",
noCategories: "Ingen kategorier",
- categories: "Kategorier"
},
settingsLabelsTile: {
deleteAllConfirm: "Er du sikker på at du vil slette denne merknaden?\nDen vil bli slette fra alle relaterte rader!",
- active: "Aktive",
- archived: "Arkiverte",
- name: "Navn",
- color: "Farge",
editEntry: "Rediger merknad",
deleteEntry: "Slett merknad",
noLabels: "Ingen merknader",
- labels: "Merknader"
},
entryForm: {
entryUpdateError: "En feil oppstod med lagringen av din rad, prøv igjen snart.",
entryCreateError: "En feil oppstod med opprettelsen av din rad, prøv igjen snart.",
errDescriptionReq: "Beskrivelse er påkrevd",
- reset: "Tilbakestill",
- description: "Beskrivelse",
- save: "Lagre",
- create: "Opprett",
category: {
- category: "Kategori",
placeholder: "Søk eller opprett",
noResults: "Ingen kategorier tilgjengelig (Opprett en ny ved å skrive navnet i søkefeltet).",
errisRequired: "Kategori er påkrevd",
@@ -83,7 +63,7 @@ const nb: Translation = {
}
},
data: {
- durationSummary: "Viser {entryCountString:string}, Tilsammen {totalHourMin:string}",
+ // durationSummary: "Viser {entryCountString:string}, Tilsammen {totalHourMin:string}",
hourSingleChar: "t",
minSingleChar: "m",
entry: "rad",
@@ -123,14 +103,13 @@ const nb: Translation = {
},
login: {
loginToYourAccount: "Logg inn i din konto",
- or: "Eller",
createANewAccount: "lag en ny konto",
- emailAddress: "E-postadresse",
password: "Passord",
notMyComputer: "Dette er ikke min datamaskin",
- forgotPassword: "Glem passord?",
- logIn: "Logg inn"
+ forgotPassword: "Glemt passord?",
},
+ reset: {
+ }
};
export default nb;