From 942d39d7554240ad05e39b0d79151670e50895ab Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sun, 22 Sep 2024 18:39:11 +0200 Subject: [PATCH] Translate application's messages with english as default and add french translation --- .codespell-exclusions | 6 + .pre-commit-config.yaml | 7 + includes/core.php | 2 +- locales/fr_FR.UTF8.js | 1 + locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo | Bin 0 -> 14800 bytes locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po | 657 ++++++++++++++++++++++ locales/messages.pot | 597 ++++++++++++++++++++ static/main.js | 301 +++++----- static/mysc_objects.js | 39 +- templates/index.tpl | 170 +++--- templates/support_info.tpl | 6 +- templates/support_info_content.tpl | 8 +- 12 files changed, 1543 insertions(+), 251 deletions(-) create mode 100644 .codespell-exclusions create mode 100644 locales/fr_FR.UTF8.js create mode 100644 locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo create mode 100644 locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po create mode 100644 locales/messages.pot diff --git a/.codespell-exclusions b/.codespell-exclusions new file mode 100644 index 0000000..fb7a64a --- /dev/null +++ b/.codespell-exclusions @@ -0,0 +1,6 @@ +.git +./static/lib +./vendor +./locales/*/LC_MESSAGES/*.po +./locales/*.js +./locales/*.pot diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3728d2..c33f6ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,6 +2,13 @@ # See https://pre-commit.com for more information --- repos: + - repo: https://github.com/codespell-project/codespell + rev: v2.2.2 + hooks: + - id: codespell + exclude: static/lib/|locales/.*\.js$|\.pot$ + #args: ["--write-changes"] + exclude_types: [csv, json, pofile] - repo: https://github.com/adrienverge/yamllint rev: v1.32.0 hooks: diff --git a/includes/core.php b/includes/core.php index 6a53590..b8ebfef 100644 --- a/includes/core.php +++ b/includes/core.php @@ -20,7 +20,7 @@ else { if (basename($script) == 'core.php') break; } -if (!$script) die('Fail to detect root directory path'); +if (!$script) die('Failed to detect root directory path'); $root_dir_path = realpath(dirname($script).'/../'); // Include App's includes and vendor directories to PHP include paths diff --git a/locales/fr_FR.UTF8.js b/locales/fr_FR.UTF8.js new file mode 100644 index 0000000..663a5a8 --- /dev/null +++ b/locales/fr_FR.UTF8.js @@ -0,0 +1 @@ +translations_data = {"messages":{"Invalid username or password.":"Nom d'utilisateur ou not de passe invalid.","Invalid authentication token.":"Jeton d'authentification invalide.","Authentication token expired.":"Jeton d'authentification expir\u00e9.","Your account appears to have been deleted.":"Votre compte semble avoir \u00e9t\u00e9 supprim\u00e9.","Confirmation":"Confirmation","OK":"OK","Cancel":"Annuler","You have to enter the name of the suitcase!":"Vous devez saisir le nom de la valise !","A suitcase exist with this name exist in the trash.":"Une valise portant ce nom existe d\u00e9j\u00e0 dans la corbeille.","This suitcase already exist!":"Cette valise existe d\u00e9j\u00e0 !","You have to enter the new name of the suitcase!":"Vous devez saisir le nouveau nom de la valise !","A suitcase with this name already exist!":"Une valise portant ce nom existe d\u00e9j\u00e0 !","An error occurred renaming this suitcase.":"Une erreur est survenue en renommant cette valise.","You have to enter the new suitcase name.":"Vous devez saisir le nom de la nouvelle valise.","An error occurred copying the suitcase.":"Une erreur est survenue en copiant cette valise.","Reset the %s suitcase":"R\u00e9initialiser la valise %s","Are-you sure you want to reset the suitcase %s?":"\u00cates-vous s\u00fbre de vouloir r\u00e9initialiser la valise %s ?","Delete the %s suitcase":"Supprimer la valise %s","Are-you sure you want to delete the suitcase %s?":"\u00cates-vous s\u00fbre de vouloir supprimer la valise %s ?","Restaure the %s suitcase":"Restaurer la valise %s","Are-you sure you want to restaure the suitcase %s?":"\u00cates-vous s\u00fbre de vouloir restaurer la valise %s ?","You have to enter the category name!":"Vous devez saisir le nom de la cat\u00e9gorie !","A category with this name already exist in the trash!":"Une cat\u00e9gorie portant ce nom existe d\u00e9j\u00e0 dans la corbeille !","A category with this name already exist!":"Une cat\u00e9gorie portant ce nom existe d\u00e9j\u00e0 !","You have to enter the new name of the category!":"Vous devez saisir le nouveau nom de la cat\u00e9gorie !","A category with this name already!":"Une cat\u00e9gorie portant ce nom existe d\u00e9j\u00e0 !","Delete the category %s":"Supprimer la cat\u00e9gorie %s","Are-you sure you want to delete the category %s?":"\u00cates-vous s\u00fbre de vouloir supprimer la cat\u00e9gorie %s ?","Restore the category %s":"Restaurer la cat\u00e9gorie %s","Are-you sure you want to restore the category %s?":"\u00cates-vous s\u00fbre de vouloir restaurer la cat\u00e9gorie %s ?","Tow elements can't have the same name!":"Deux \u00e9l\u00e9ments ne peuvent pas porter le m\u00eame nom !","The element '%s' already exist!":"Un \u00e9l\u00e9ment portant le nom '%s' existe d\u00e9j\u00e0 !","You have to enter at least one element name!":"Vous devez saisir au moins un nom d'\u00e9l\u00e9ment !","Another?":"Un autre ?","Nb":"Nb","You have to enter the new element name!":"Vous devez saisir le nom du nouvel \u00e9l\u00e9ment !","An element with this name already exist in the trash!":"Un \u00e9l\u00e9ment portant ce nom existe d\u00e9j\u00e0 dans la corbeille !","An element with this name already exist!":"Un \u00e9l\u00e9ment portant ce nom existe d\u00e9j\u00e0 !","Delete the element %s":"Supprimer l'\u00e9l\u00e9ment %s","Are-you sure you want to delete the element %s?":"\u00cates-vous s\u00fbre de vouloir supprimer l'\u00e9l\u00e9ment %s ?","Restore the element %s":"Restaurer l'\u00e9l\u00e9ment %s","Are-you sure you want to restore the element %s?":"\u00cates-vous s\u00fbre de vouloir restaurer l'\u00e9l\u00e9ment %s ?","Add an element":"Ajouter un \u00e9l\u00e9ment","Trash":"Corbeille","The trash is empty.":"La corbeille est vide.","Your suitcases":"Vos valises","No suitcase in the trash.":"Aucune valise dans la corbeille.","Delete all local data":"Purger les donn\u00e9es locales","Are-you sure you want to delete all local data (irreversible action)?":"\u00cates-vous s\u00fbre de vouloir supprimer toutes les donn\u00e9es locales (action irr\u00e9versible) ?","Loading example data":"Charger les donn\u00e9es d'exemple","Are-you sure you want to load example data in place of your own local data (irreversible action)?":"\u00cates-vous s\u00fbre de vouloir charger les donn\u00e9es d'exemple \u00e0 la place de vos donn\u00e9es locales (action irr\u00e9versible) ?","Failed to decode JSON file.":"Impossible de d\u00e9coder le fichier JSON.","Import from file":"Import depuis un fichier","Are-you sure you want to overwrite your local data with the data from this file (irreversible action)?":"\u00cates-vous s\u00fbre de vouloir \u00e9craser vos donn\u00e9es locales par celles issues de ce fichier (action irr\u00e9versible) ?","The file has been imported successfully.":"Le fichier as bien \u00e9t\u00e9 import\u00e9.","An error occurred loading this file. Restoring previous data...":"Une erreur est survenue en chargeant ce fichier. Restauration des donn\u00e9es pr\u00e9c\u00e9dentes...","Previous data has been restored successfully.":"Les donn\u00e9es pr\u00e9c\u00e9dentes ont bien \u00e9t\u00e9 restaur\u00e9es.","An error occurred restoring previous data.":"Une erreur est survenue en restaurant les donn\u00e9es pr\u00e9c\u00e9dentes.","You have to enter your username and password!":"Vous devez saisir votre nom d'utilisateur et votre mot de passe !","Connected.":"Connect\u00e9.","An error occurred logging in. Please try again later.":"Une erreur est survenue durant la connexion. Merci de r\u00e9essayer ult\u00e9rieurement.","Logout":"D\u00e9connexion","Do you really want to log out?":"Voulez-vous vraiment vous d\u00e9connecter ?","Logged out":"D\u00e9connect\u00e9","An error occurred logging you out. Please try again later.":"Une erreur est survenue durant la d\u00e9connexion. Merci de r\u00e9essayer ult\u00e9rieurement.","Data synchronized.":"Donn\u00e9es synchronis\u00e9es.","An error occurred loading data from the server. Restoring previous data...":"Une erreur est survenue en chargeant les donn\u00e9es depuis le serveur. Restauration des donn\u00e9es pr\u00e9c\u00e9dentes...","An error occurred synchronizing your data. Please try again later.":"Une erreur est survenue durant la synchronisation de vos donn\u00e9es. Merci de r\u00e9essayer ult\u00e9rieurement.","Your session appears to have expired, please re-authenticate.":"Votre session semble avoir expir\u00e9e, merci de vous r\u00e9identifier.","You must sign in before you can sync your data.":"Vous devez vous connecter avant de synchroniser vos donn\u00e9es.","Synchronize your suitcases from server":"Synchronisation de vos valises avec les serveurs","Are-you sure you want to synchronize your suitcases from server?":"\u00cates-vous s\u00fbre de vouloir synchroniser vos valises avec le serveur ?","An example of a suitcase?":"Un exemple de valise ?","Would you like to load a sample suitcase to get started?":"Voulez-vous chargeant un exemple de valise pour commencer ?","Your internet browser does not support local data storage. Therefore, unfortunately you cannot use this application.":"Votre navigateur internet ne semble pas supporter le stockage de donn\u00e9es locales. Malheureusement, vous ne pouvez donc pas utiliser cette application.","Error loading local data":"Une erreur est survenue en chargeant les donn\u00e9es locales","An error occurred while loading local data. Should we purge it?":"Une erreur est survenue en chargeant vos donn\u00e9es locales. Devons-nous les purger ?","White paper":"Papier blanc","Pen":"Stylo","ID card\/passport":"Carte d'identit\u00e9 \/ passeport","Watch":"Montre","Watch charger":"Chargeur montre","Laptop":"PC portable","Laptop charger":"Chargeur PC portable","An error occurred while loading the %s suitcase from the cache.":"Une erreur est survenue en chargeant la valise %s depuis le cache.","An error occurred while loading the category list from the cache.":"Une erreur est survenue en chargeant la liste de cat\u00e9gories depuis le cache.","An error occurred while loading the %s category from the cache.":"Une erreur est survenue en chargeant la cat\u00e9gorie %s depuis le cache.","Error loading your login information. Please log in again.":"Erreur en chargeant vos donn\u00e9es d'authentification. Merci de vous r\u00e9identifier.","Helpdesk page":"Page d'assistance aux utilisateurs","Upon request, please download and forward the following information to the support service:":"\u00c0 leur demande, merci de t\u00e9l\u00e9charger et transmettre les informations ci-dessous au service support :","Download":"T\u00e9l\u00e9charger","Application URL:":"URL de l'application :","Current page URL:":"URL de la page courante :","Connected user:":"Utilisateur connect\u00e9 :","Extra user information:":"Informations suppl\u00e9mentaires de l'utilisateur :","Add a suitcase":"Ajouter une valise","Show trash":"Voir la corbeille","Suitcases list":"Liste des valises","Manage the suitcase":"G\u00e9rer les valises","Add a category":"Ajouter une cat\u00e9gorie","Rename the suitcase":"Renommer la valise","Copy the suitcase":"Copier la valise","Reset the suitcase":"R\u00e9initialiser la valise","Delete the suitcase":"Supprimer la valise","Show suitcase's trash":"Voir la corbeille de la valise","Manage data":"G\u00e9rer les donn\u00e9es","Backup your data":"Sauvegarder vos donn\u00e9es","Restaure your data":"Restaurer vos donn\u00e9es","Synchronize local data":"Synchroniser les donn\u00e9es locales","Purge local data":"Purger les donn\u00e9es locales","Load example data":"Charger les donn\u00e9es d'exemple","Login":"Connexion","Suitcase name":"Nom de la valise","Add":"Ajouter","Name of the new suitcase":"Nom de la nouvelle valise","Copy":"Copier","New suitcase name":"Nouveau nom de la valise","Rename":"Renommer","Category name":"Nom de la cat\u00e9gorie","Rename the category":"Renommer la cat\u00e9gorie","New category's name":"Nouveau nom de la cat\u00e9gorie","Element name":"Nom de l'\u00e9l\u00e9ment","Edit the element":"Modifier l'\u00e9l\u00e9ment","Modify":"Modifier","Loading...":"Chargement...","Connection":"Connection","Username":"Nom d'utilisateur","Password":"Not de passe","Connect":"Connexion","Welcome":"Bienvenu","

\n This application allows you to manage lists of things not to forget to pack in your\n suitcase before your departure:\n