mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 07:03:25 +00:00
feat: use existing translation on all pages
This commit is contained in:
@@ -12,6 +12,7 @@ import frResourceLogin from './locales/fr/login.json';
|
||||
import frResourcePrivacy from './locales/fr/privacy.json';
|
||||
import frResourceTerms from './locales/fr/terms.json';
|
||||
|
||||
import { LS_LANG_KEY } from '~/constants';
|
||||
import enResourceAbout from './locales/en/about.json';
|
||||
import enResourceAdmin from './locales/en/admin.json';
|
||||
import enResourceCommon from './locales/en/common.json';
|
||||
@@ -51,9 +52,16 @@ export const resources = {
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const languages = ['en', 'fr'] as const;
|
||||
|
||||
const lng =
|
||||
typeof window !== 'undefined'
|
||||
? localStorage.getItem(LS_LANG_KEY) || undefined
|
||||
: undefined;
|
||||
i18n.use(initReactI18next).init({
|
||||
returnNull: false,
|
||||
resources,
|
||||
lng,
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"slogan": "Manage your links in the best possible way",
|
||||
"confirm": "Confirm",
|
||||
"cancel": "Cancel",
|
||||
"back-home": "← Back to home page",
|
||||
"back-home": "← Back to home",
|
||||
"logout": "Logout",
|
||||
"login": "Login",
|
||||
"link": {
|
||||
@@ -12,25 +12,29 @@
|
||||
"description": "Link description",
|
||||
"create": "Create a link",
|
||||
"edit": "Edit a link",
|
||||
"remove": "Delete a link",
|
||||
"remove-confirm": "Confirm deletion?"
|
||||
"delete": "Delete a link",
|
||||
"delete-confirm": "Confirm deletion?"
|
||||
},
|
||||
"collection": {
|
||||
"collections": "Collections",
|
||||
"collection": "Collection",
|
||||
"collections": "Collection",
|
||||
"collections_other": "Collections",
|
||||
"name": "Collection name",
|
||||
"description": "Collection description",
|
||||
"no-description": "No description",
|
||||
"visibility": "Public",
|
||||
"create": "Create a collection",
|
||||
"edit": "Edit a collection",
|
||||
"remove": "Delete a collection",
|
||||
"remove-confirm": "Confirm deletion?",
|
||||
"remove-description": "You must delete all links in this collection before you can delete this collection."
|
||||
"delete": "Delete a collection",
|
||||
"delete-confirm": "Confirm deletion?",
|
||||
"delete-description": "You must delete all links in this collection before you can delete this collection."
|
||||
},
|
||||
"favorite": "Favorite",
|
||||
"add-favorite": "Add to favorites",
|
||||
"remove-favorite": "Remove from favorites",
|
||||
"favorites-appears-here": "Your favorites will appear here",
|
||||
"no-item-found": "No item found",
|
||||
"search": "Search",
|
||||
"admin": "Administrator",
|
||||
"avatar": "{{name}}'s avatar",
|
||||
"generic-error": "Something went wrong",
|
||||
"generic-error-description": "An error has occurred, if this happens again please <a href=\"https://github.com/Sonny93/my-links\" target=\"_blank\">create an issue</a> with as much detail as possible.",
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"description": "Description du lien",
|
||||
"create": "Créer un lien",
|
||||
"edit": "Modifier un lien",
|
||||
"remove": "Supprimer un lien",
|
||||
"remove-confirm": "Confirmer la suppression ?"
|
||||
"delete": "Supprimer un lien",
|
||||
"delete-confirm": "Confirmer la suppression ?"
|
||||
},
|
||||
"collection": {
|
||||
"collections": "Collection",
|
||||
@@ -25,12 +25,16 @@
|
||||
"no-description": "Aucune description",
|
||||
"create": "Créer une collection",
|
||||
"edit": "Modifier une collection",
|
||||
"remove": "Supprimer une collection",
|
||||
"remove-confirm": "Confirmer la suppression ?",
|
||||
"remove-description": "Vous devez supprimer tous les liens de cette collection avant de pouvoir supprimer cette collection"
|
||||
"delete": "Supprimer une collection",
|
||||
"delete-confirm": "Confirmer la suppression ?",
|
||||
"delete-description": "Vous devez supprimer tous les liens de cette collection avant de pouvoir supprimer cette collection"
|
||||
},
|
||||
"favorite": "Favoris",
|
||||
"add-favorite": "Ajouter aux favoris",
|
||||
"remove-favorite": "Retirer des favoris",
|
||||
"favorites-appears-here": "Vos favoris apparaîtront ici",
|
||||
"no-item-found": "Aucun élément trouvé",
|
||||
"admin": "Administrateur",
|
||||
"search": "Rechercher",
|
||||
"avatar": "Avatar de {{name}}",
|
||||
"generic-error": "Une erreur est survenue",
|
||||
|
||||
Reference in New Issue
Block a user