Begin translation and finish i18n system
This commit is contained in:
40
src/lib/locales/en.json
Normal file
40
src/lib/locales/en.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"layout": {
|
||||
"update_done": "Update completed.",
|
||||
"wait_new_version_startup": "Waiting for the new version to start...",
|
||||
"new_version": "New version reachable. Reloading...",
|
||||
"switch_to_a_different_team": "Switch to a different team...",
|
||||
"update_available": "Update available"
|
||||
},
|
||||
"error": {
|
||||
"you_can_find_your_way_back": "You can find your way back",
|
||||
"here": "here"
|
||||
},
|
||||
"index": {
|
||||
"dashboard": "Dashboard",
|
||||
"applications": "Applications",
|
||||
"destinations": "Destinations",
|
||||
"git_sources": "Git Sources",
|
||||
"databases": "Databases",
|
||||
"services": "Services",
|
||||
"teams": "Teams"
|
||||
},
|
||||
"login": {
|
||||
"already_logged_in": "Already logged in...",
|
||||
"authenticating": "Authenticating...",
|
||||
"login": "Login"
|
||||
},
|
||||
"forms": {
|
||||
"password": "Password",
|
||||
"email": "Email",
|
||||
"passwords_not_match": "Passwords do not match.",
|
||||
"password_again": "Password again"
|
||||
},
|
||||
"register": {
|
||||
"register": "Register",
|
||||
"first_user": "You are registering the first user. It will be the administrator of your Coolify instance."
|
||||
},
|
||||
"reset": {
|
||||
"reset_password": "Reset password"
|
||||
}
|
||||
}
|
||||
40
src/lib/locales/fr.json
Normal file
40
src/lib/locales/fr.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"index": {
|
||||
"dashboard": "Tableau de bord",
|
||||
"applications": "Applications",
|
||||
"databases": "Bases de données",
|
||||
"destinations": "Destinations",
|
||||
"git_sources": "Sources Git",
|
||||
"services": "Prestations de service",
|
||||
"teams": "Équipes"
|
||||
},
|
||||
"error": {
|
||||
"here": "ici",
|
||||
"you_can_find_your_way_back": "Tu peux retrouver ton chemin"
|
||||
},
|
||||
"forms": {
|
||||
"email": "E-mail",
|
||||
"password": "Mot de passe",
|
||||
"password_again": "Retaper le mot de passe",
|
||||
"passwords_not_match": "Les mots de passe ne correspondent pas."
|
||||
},
|
||||
"layout": {
|
||||
"new_version": "Nouvelle version disponible. \nActualisation...",
|
||||
"switch_to_a_different_team": "Changer d'équipe...",
|
||||
"update_available": "Mise à jour disponible",
|
||||
"update_done": "Mise à jour terminée.",
|
||||
"wait_new_version_startup": "Attente du lancement de la nouvelle version..."
|
||||
},
|
||||
"login": {
|
||||
"already_logged_in": "Déjà connecté...",
|
||||
"authenticating": "Authentification...",
|
||||
"login": "Connexion"
|
||||
},
|
||||
"register": {
|
||||
"first_user": "Vous enregistrez le premier utilisateur. \nCe sera l'administrateur de votre instance Coolify.",
|
||||
"register": "S'inscrire"
|
||||
},
|
||||
"reset": {
|
||||
"reset_password": "Réinitialiser le mot de passe"
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import lang from './lang.json';
|
||||
|
||||
/** @type {import('sveltekit-i18n').Config} */
|
||||
const config = {
|
||||
defaultLocale: 'en',
|
||||
fallbackLocale: 'en',
|
||||
translations: {
|
||||
en: { lang },
|
||||
@@ -13,16 +12,16 @@ const config = {
|
||||
{
|
||||
locale: 'en',
|
||||
key: '',
|
||||
loader: async () => (await import('../../static/locales/en.json')).default
|
||||
loader: async () => (await import('./locales/en.json')).default
|
||||
},
|
||||
{
|
||||
locale: 'fr',
|
||||
key: '',
|
||||
loader: async () => (await import('../../static/locales/fr.json')).default
|
||||
loader: async () => (await import('./locales/fr.json')).default
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const { t, locale, locales, loading, loadTranslations } = new i18n(config);
|
||||
export const { t, loading, locales, locale, loadTranslations } = new i18n(config);
|
||||
|
||||
loading.subscribe(($loading) => $loading && console.log('Loading translations...'));
|
||||
loading.subscribe(($loading) => $loading);
|
||||
|
||||
Reference in New Issue
Block a user