diff --git a/CliClient/app/build-translation.js b/CliClient/app/build-translation.js index c0d834f4f..2c86a690f 100644 --- a/CliClient/app/build-translation.js +++ b/CliClient/app/build-translation.js @@ -98,6 +98,17 @@ async function mergePotToPo(potFilePath, poFilePath) { await removePoHeaderDate(poFilePath); } +function buildIndex(locales) { + let output = []; + output.push('var locales = {};'); + for (let i = 0; i < locales.length; i++) { + const locale = locales[i]; + output.push("locales['" + locale + "'] = require('./" + locale + ".json');"); + } + output.push('module.exports = { locales: locales };'); + return output.join("\n"); +} + async function main() { let potFilePath = cliLocalesDir + '/joplin.pot'; let jsonLocalesDir = cliDir + '/build/locales'; @@ -108,6 +119,8 @@ async function main() { rnDir + '/lib/*.js', rnDir + '/lib/models/*.js', rnDir + '/lib/services/*.js', + rnDir + '/lib/components/*.js', + rnDir + '/lib/components/screens/*.js', ]); await execCommand('cp "' + potFilePath + '" ' + '"' + cliLocalesDir + '/' + defaultLocale + '.po"'); @@ -123,7 +136,10 @@ async function main() { buildLocale(poFilePäth, jsonFilePath); } - saveToFile(jsonLocalesDir + '/index.json', JSON.stringify(locales)); + saveToFile(jsonLocalesDir + '/index.js', buildIndex(locales)); + + const rnJsonLocaleDir = rnDir + '/locales'; + await execCommand('rsync -a "' + jsonLocalesDir + '/" "' + rnJsonLocaleDir + '"'); } main().catch((error) => { diff --git a/CliClient/locales/en_GB.po b/CliClient/locales/en_GB.po index 7b480fd9e..8b8ed6eab 100644 --- a/CliClient/locales/en_GB.po +++ b/CliClient/locales/en_GB.po @@ -477,3 +477,91 @@ msgstr "" #, javascript-format msgid "%s: %d notes" msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:66 +msgid "New todo" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:73 +msgid "New note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:81 +msgid "New folder" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screen-header.js:145 +msgid "Log" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screen-header.js:150 +msgid "Status" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/folder.js:73 +#, javascript-format +msgid "The folder could not be saved: %s" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/folders.js:21 +msgid "" +"There is currently no notebook. Create one by clicking on the (+) button." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:153 +msgid "Untitled" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:169 +msgid "Delete note?" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:200 +msgid "Attach file" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:201 +msgid "Delete note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:202 +msgid "Convert to regular note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:202 +msgid "Convert to todo" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:203 +msgid "Toggle metadata" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:362 +msgid "Edit" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:23 +msgid "Delete notebook?" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:46 +msgid "Delete notebook" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:47 +msgid "Edit notebook" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:66 +msgid "There are currently no notes. Create one by clicking on the (+) button." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/welcome.js:24 +msgid "" +"Click on the (+) button to create a new note or notebook. Click on the side " +"menu to access your existing notebooks." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/welcome.js:24 +msgid "You currently have no notebook. Create one by clicking on (+) button." +msgstr "" diff --git a/CliClient/locales/fr_FR.po b/CliClient/locales/fr_FR.po index 7b248a81b..285ecb456 100644 --- a/CliClient/locales/fr_FR.po +++ b/CliClient/locales/fr_FR.po @@ -513,6 +513,100 @@ msgstr "Carnets" msgid "%s: %d notes" msgstr "%s : %d notes" +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:66 +msgid "New todo" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:73 +msgid "New note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:81 +msgid "New folder" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screen-header.js:145 +msgid "Log" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screen-header.js:150 +#, fuzzy +msgid "Status" +msgstr "Etat : %s." + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/folder.js:73 +#, javascript-format +msgid "The folder could not be saved: %s" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/folders.js:21 +msgid "" +"There is currently no notebook. Create one by clicking on the (+) button." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:153 +msgid "Untitled" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:169 +#, fuzzy +msgid "Delete note?" +msgstr "Supprimer le carnet \"%s\" ?" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:200 +msgid "Attach file" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:201 +#, fuzzy +msgid "Delete note" +msgstr "Supprime le carnet." + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:202 +msgid "Convert to regular note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:202 +msgid "Convert to todo" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:203 +msgid "Toggle metadata" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:362 +msgid "Edit" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:23 +#, fuzzy +msgid "Delete notebook?" +msgstr "Supprimer le carnet \"%s\" ?" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:46 +#, fuzzy +msgid "Delete notebook" +msgstr "Supprime le carnet." + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:47 +#, fuzzy +msgid "Edit notebook" +msgstr "Editer la note." + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:66 +msgid "There are currently no notes. Create one by clicking on the (+) button." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/welcome.js:24 +msgid "" +"Click on the (+) button to create a new note or notebook. Click on the side " +"menu to access your existing notebooks." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/welcome.js:24 +msgid "You currently have no notebook. Create one by clicking on (+) button." +msgstr "" + #, fuzzy #~ msgid "Invalid command. Showing help:" #~ msgstr "Commande invalie : \"%s\"" diff --git a/CliClient/locales/joplin.pot b/CliClient/locales/joplin.pot index 7b480fd9e..8b8ed6eab 100644 --- a/CliClient/locales/joplin.pot +++ b/CliClient/locales/joplin.pot @@ -477,3 +477,91 @@ msgstr "" #, javascript-format msgid "%s: %d notes" msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:66 +msgid "New todo" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:73 +msgid "New note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/action-button.js:81 +msgid "New folder" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screen-header.js:145 +msgid "Log" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screen-header.js:150 +msgid "Status" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/folder.js:73 +#, javascript-format +msgid "The folder could not be saved: %s" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/folders.js:21 +msgid "" +"There is currently no notebook. Create one by clicking on the (+) button." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:153 +msgid "Untitled" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:169 +msgid "Delete note?" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:200 +msgid "Attach file" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:201 +msgid "Delete note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:202 +msgid "Convert to regular note" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:202 +msgid "Convert to todo" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:203 +msgid "Toggle metadata" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/note.js:362 +msgid "Edit" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:23 +msgid "Delete notebook?" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:46 +msgid "Delete notebook" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:47 +msgid "Edit notebook" +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/notes.js:66 +msgid "There are currently no notes. Create one by clicking on the (+) button." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/welcome.js:24 +msgid "" +"Click on the (+) button to create a new note or notebook. Click on the side " +"menu to access your existing notebooks." +msgstr "" + +#: /mnt/d/Web/www/joplin/ReactNativeClient/lib/components/screens/welcome.js:24 +msgid "You currently have no notebook. Create one by clicking on (+) button." +msgstr "" diff --git a/ReactNativeClient/lib/locale.js b/ReactNativeClient/lib/locale.js index 0d6f91bf3..d86478a28 100644 --- a/ReactNativeClient/lib/locale.js +++ b/ReactNativeClient/lib/locale.js @@ -181,9 +181,14 @@ let loadedLocales_ = {}; let currentLocale_ = 'en_GB'; function supportedLocales() { - if (supportedLocales_) return supportedLocales_; - supportedLocales_ = require('../locales/index.json'); - return supportedLocales_; + if (!supportedLocales_) supportedLocales_ = require('../locales/index.js').locales; + + let output = []; + for (let n in supportedLocales_) { + if (!supportedLocales_.hasOwnProperty(n)) continue; + output.push(n); + } + return output; } function closestSupportedLocale(canonicalName, defaultToEnglish = true) { @@ -257,7 +262,7 @@ function localeStrings(canonicalName) { if (loadedLocales_[locale]) return loadedLocales_[locale]; - loadedLocales_[locale] = require('../locales/' + locale + '.json'); + loadedLocales_[locale] = Object.assign({}, supportedLocales_[locale]); return loadedLocales_[locale]; } @@ -269,9 +274,7 @@ function setLocale(canonicalName) { function _(s, ...args) { let strings = localeStrings(currentLocale_); - let result = strings[s]; - if (result === '' || result === undefined) result = s; return sprintf(result, ...args); } diff --git a/ReactNativeClient/locales/en_GB.json b/ReactNativeClient/locales/en_GB.json new file mode 100644 index 000000000..e041d58e9 --- /dev/null +++ b/ReactNativeClient/locales/en_GB.json @@ -0,0 +1 @@ +{"No notebook selected.":"","No notebook has been specified.":"","Usage: --profile ":"","Usage: --env ":"","Usage: --log-level ":"","Unknown flag: %s":"","Command line argument \"%s\" contains both quotes and double-quotes - aborting.":"","Provides help for a given command.":"","Exits the application.":"","Synchronizing with directory \"%s\"":"","No notebook is defined. Create one with `mkbook `.":"","Creates a new command alias which can then be used as a regular command (eg. `alias ll \"ls -l\"`).":"","Displays the given note.":"","Displays the complete information about note.":"","Cannot find \"%s\".":"","Gets or sets a config value. If [value] is not provided, it will show the value of [name]. If neither [name] nor [value] is provided, it will list the current configuration.":"","Duplicates the notes matching to [notebook]. If no notebook is specified the note is duplicated in the current notebook.":"","Edit note.":"","Done editing.":"","No text editor is defined. Please set it using `config editor `":"","No active notebook.":"","Starting to edit note. Close the editor to get back to the prompt.":"","Displays a geolocation URL for the note.":"","Imports an Evernote notebook file (.enex file).":"","Do not ask for confirmation.":"","Folder does not exists: \"%s\". Create it?":"","Imported - %s":"","File \"%s\" will be imported into notebook \"%s\". Continue?":"","Found: %d.":"","Created: %d.":"","Updated: %d.":"","Skipped: %d.":"","Resources: %d.":"","Tagged: %d.":"","Importing notes...":"","Displays the notes in [notebook]. Use `ls /` to display the list of notebooks.":"","Displays only the first top notes.":"","Sorts the item by (eg. title, updated_time, created_time).":"","Reverses the sorting order.":"","Displays only the items of the specific type(s). Can be `n` for notes, `t` for todos, or `nt` for notes and todos (eg. `-tt` would display only the todos, while `-ttd` would display notes and todos.":"","Either \"text\" or \"json\"":"","Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for todos), TITLE":"","Please select a notebook first.":"","Creates a new notebook.":"","Creates a new note.":"","Notes can only be created within a notebook.":"","Moves the notes matching to . If is a note, it will be moved to the notebook . If is a notebook, it will be renamed to .":"","Deletes the items matching .":"","Deletes the items without asking for confirmation.":"","Deletes a notebook.":"","Delete notebook \"%s\"?":"","%d notes match this pattern. Delete them?":"","Searches for the given in all the notes.":"","Sets the property of the given to the given [value].":"","Displays summary about the notes and notebooks.":"","Synchronizes with remote storage.":"","Sync to provided target (defaults to sync.target config value)":"","For \"filesystem\" target only: Path to sync to.":"","Synchronisation is already in progress.":"","Synchronization target: %s":"","Cannot initialize synchronizer.":"","Starting synchronization...":"","Done.":"","Cancelling...":""," can be \"add\", \"remove\" or \"list\" to assign or remove [tag] from [note], or to list the notes associated with [tag]. The command `tag list` can be used to list all the tags.":"","Invalid command: \"%s\"":"","Switches to [notebook] - all further operations will happen within this notebook.":"","Displays version information":"","%s %s (%s)":"","Fatal error:":"","All potential ports are in use - please report the issue at %s":"","The application has been authorised - you may now close this browser tab.":"","The application has been successfully authorised.":"","Please open this URL in your browser to authenticate the application:":"","Created local items: %d.":"","Updated local items: %d.":"","Created remote items: %d.":"","Updated remote items: %d.":"","Deleted local items: %d.":"","Deleted remote items: %d.":"","State: %s.":"","Last error: %s (stacktrace in log).":"","Completed: %s":"","Conflicts":"","A notebook with this title already exists: \"%s\"":"","Notebooks cannot be named \"%s\", which is a reserved title.":"","This note does not have geolocation information.":"","Cannot copy note to \"%s\" notebook":"","Cannot move note to \"%s\" notebook":"","Sync status (synced items / total items)":"","%s: %d/%d":"","Total: %d/%d":"","Conflicted: %d":"","To delete: %d":"","Folders":"","%s: %d notes":"","New todo":"","New note":"","New folder":"","Log":"","Status":"","The folder could not be saved: %s":"","There is currently no notebook. Create one by clicking on the (+) button.":"","Untitled":"","Delete note?":"","Attach file":"","Delete note":"","Convert to regular note":"","Convert to todo":"","Toggle metadata":"","Edit":"","Delete notebook?":"","Delete notebook":"","Edit notebook":"","There are currently no notes. Create one by clicking on the (+) button.":"","Click on the (+) button to create a new note or notebook. Click on the side menu to access your existing notebooks.":"","You currently have no notebook. Create one by clicking on (+) button.":""} \ No newline at end of file diff --git a/ReactNativeClient/locales/fr_FR.json b/ReactNativeClient/locales/fr_FR.json new file mode 100644 index 000000000..26b0d2594 --- /dev/null +++ b/ReactNativeClient/locales/fr_FR.json @@ -0,0 +1 @@ +{"No notebook selected.":"Aucun carnet n'est sélectionné.","No notebook has been specified.":"Aucun carnet n'est spécifié.","Usage: --profile ":"Utilisation: --profile ","Usage: --env ":"Utilisation : --env ","Usage: --log-level ":"Utilisation: --log-level ","Unknown flag: %s":"Paramètre inconnu : %s","Command line argument \"%s\" contains both quotes and double-quotes - aborting.":"Paramètre de ligne de command \"%s\" contient à la fois des guillemets simples et doubles - impossible de continuer.","Provides help for a given command.":"Affiche l'aide pour la commande donnée.","Exits the application.":"Quitter le logiciel.","Synchronizing with directory \"%s\"":"Synchronisation avec dossier \"%s\"","No notebook is defined. Create one with `mkbook `.":"Aucun carnet n'est défini. Créez-en un avec `mkbook `.","Creates a new command alias which can then be used as a regular command (eg. `alias ll \"ls -l\"`).":"","Displays the given note.":"Affiche la note.","Displays the complete information about note.":"Affiche tous les détails de la note.","Cannot find \"%s\".":"Impossible de trouver \"%s\".","Gets or sets a config value. If [value] is not provided, it will show the value of [name]. If neither [name] nor [value] is provided, it will list the current configuration.":"Obtient ou modifie une valeur de configuration. Si la [valeur] n'est pas fournie, la valeur de [nom] est affichée. Si ni le [nom] ni la [valeur] ne sont fournies, la configuration complète est affichée.","Duplicates the notes matching to [notebook]. If no notebook is specified the note is duplicated in the current notebook.":"Copie les notes correspondant à [nom] vers [carnet]. Si aucun carnet n'est spécifié, la note est dupliqué sur place.","Edit note.":"Editer la note.","Done editing.":"Edition terminée.","No text editor is defined. Please set it using `config editor `":"Aucun éditeur de texte n'est défini. Veuillez le définir en utilisant la commande `config editor `","No active notebook.":"Aucun carnet actif.","Starting to edit note. Close the editor to get back to the prompt.":"Edition de la note en cours. Fermez l'éditeur de texte pour retourner à l'invite de commande.","Displays a geolocation URL for the note.":"Displays a geolocation URL for the note.","Imports an Evernote notebook file (.enex file).":"Importer un carnet Evernote (fichier .enex).","Do not ask for confirmation.":"Ne pas demander de confirmation.","Folder does not exists: \"%s\". Create it?":"Ce carnet n'existe pas : \"%s\". Le créer ?","Imported - %s":"Importé - %s","File \"%s\" will be imported into notebook \"%s\". Continue?":"Le fichier \"%s\" va être importé dans le carnet \"%s\". Continuer ?","Found: %d.":"Trouvés : %d.","Created: %d.":"Créés : %d.","Updated: %d.":"Mise à jour : %d.","Skipped: %d.":"Ignorés : %d.","Resources: %d.":"Ressources : %d.","Tagged: %d.":"Etiquettes : %d.","Importing notes...":"Importation des notes...","Displays the notes in [notebook]. Use `ls /` to display the list of notebooks.":"Affiche les notes dans le carnet. Utilisez `ls /` pour afficher la liste des carnets.","Displays only the first top notes.":"Affiche uniquement les premières notes.","Sorts the item by (eg. title, updated_time, created_time).":"Trier les notes par (par exemple, title, updated_time, created_time).","Reverses the sorting order.":"Inverser l'ordre.","Displays only the items of the specific type(s). Can be `n` for notes, `t` for todos, or `nt` for notes and todos (eg. `-tt` would display only the todos, while `-ttd` would display notes and todos.":"Affiche uniquement les notes du ou des types spécifiés. Le type peut-être `n` pour les notes, `t` pour les tâches (par exemple, `-tt` affiche uniquement les tâches, tandis que `-ttd` affiche les notes et les tâches).","Either \"text\" or \"json\"":"Soit \"text\" soit \"json\"","Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for todos), TITLE":"Utilise le format de liste longue. Le format est ID, NOMBRE_DE_NOTES (pour les carnets), DATE, TACHE_TERMINE (pour les tâches), TITRE","Please select a notebook first.":"Veuillez sélectionner un carnet d'abord.","Creates a new notebook.":"Créer un carnet.","Creates a new note.":"Créer une note.","Notes can only be created within a notebook.":"Les notes ne peuvent être créées que dans un carnet.","Moves the notes matching to . If is a note, it will be moved to the notebook . If is a notebook, it will be renamed to .":"Déplacer les notes correspondantes à vers . Si est une note, elle sera déplacée vers le carnet . Si est un carnet, il sera renommé .","Deletes the items matching .":"Supprime les objets correspondants à .","Deletes the items without asking for confirmation.":"Supprime les objets sans demander la confirmation.","Deletes a notebook.":"Supprime le carnet.","Delete notebook \"%s\"?":"Supprimer le carnet \"%s\" ?","%d notes match this pattern. Delete them?":"%d notes correspondent à ce motif. Les supprimer ?","Searches for the given in all the notes.":"Chercher le motif dans toutes les notes.","Sets the property of the given to the given [value].":"Assigner la valeur [value] à la propriété de la donnée.","Displays summary about the notes and notebooks.":"Afficher un résumé des notes et carnets.","Synchronizes with remote storage.":"Synchroniser les notes et carnets.","Sync to provided target (defaults to sync.target config value)":"Synchroniser avec la cible donnée (par défaut, la valeur de configuration `sync.target`).","For \"filesystem\" target only: Path to sync to.":"","Synchronisation is already in progress.":"Synchronisation est déjà en cours.","Synchronization target: %s":"Cible de la synchronisation : %s","Cannot initialize synchronizer.":"Impossible d'initialiser le synchroniseur.","Starting synchronization...":"Commencement de la synchronisation...","Done.":"Terminé.","Cancelling...":"Annulation..."," can be \"add\", \"remove\" or \"list\" to assign or remove [tag] from [note], or to list the notes associated with [tag]. The command `tag list` can be used to list all the tags.":" peut être \"add\", \"remove\" ou \"list\" pour assigner ou enlever l'étiquette [tag] de la [note], our pour lister les notes associées avec l'étiquette [tag]. La commande `tag list` peut être utilisée pour lister les étiquettes.","Invalid command: \"%s\"":"Commande invalie : \"%s\"","Switches to [notebook] - all further operations will happen within this notebook.":"Changer de carnet - toutes les opérations à venir se feront dans ce carnet.","Displays version information":"Affiche les informations de version.","%s %s (%s)":"%s %s (%s)","Fatal error:":"Erreur fatale :","All potential ports are in use - please report the issue at %s":"Tous les ports sont en cours d'utilisation. Veuillez signaler ce problème sur %s","The application has been authorised - you may now close this browser tab.":"Le logiciel a été autorisé. Vous pouvez maintenant fermer cet onglet.","The application has been successfully authorised.":"Le logiciel a été autorisé.","Please open this URL in your browser to authenticate the application:":"Please open this URL in your browser to authenticate the application:","Created local items: %d.":"Objets créés localement : %d.","Updated local items: %d.":"Objets mis à jour localement : %d.","Created remote items: %d.":"Objets distants créés : %d.","Updated remote items: %d.":"Objets distants mis à jour : %d.","Deleted local items: %d.":"Objets supprimés localement : %d.","Deleted remote items: %d.":"Objets distants supprimés : %d.","State: %s.":"Etat : %s.","Last error: %s (stacktrace in log).":"Dernière erreur : %s (Plus d'information dans le journal d'erreurs)","Completed: %s":"Terminé : %s","Conflicts":"Conflits","A notebook with this title already exists: \"%s\"":"Un carnet avec ce titre existe déjà : \"%s\"","Notebooks cannot be named \"%s\", which is a reserved title.":"Les carnets ne peuvent être nommés \"%s\" car c'est un nom réservé.","This note does not have geolocation information.":"","Cannot copy note to \"%s\" notebook":"Impossible de copier la note dans le carnet \"%s\"","Cannot move note to \"%s\" notebook":"Impossible de déplacer la note vers le carnet \"%s\"","Sync status (synced items / total items)":"Status de la synchronisation (objets synchro. / total)","%s: %d/%d":"%s: %d/%d","Total: %d/%d":"Total : %d/%d","Conflicted: %d":"Conflits : %d","To delete: %d":"A supprimer : %d","Folders":"Carnets","%s: %d notes":"%s : %d notes","New todo":"","New note":"","New folder":"","Log":"","Status":"Status","The folder could not be saved: %s":"","There is currently no notebook. Create one by clicking on the (+) button.":"","Untitled":"","Delete note?":"Delete note?","Attach file":"","Delete note":"Delete note","Convert to regular note":"","Convert to todo":"","Toggle metadata":"","Edit":"","Delete notebook?":"Delete notebook?","Delete notebook":"Delete notebook","Edit notebook":"Edit notebook","There are currently no notes. Create one by clicking on the (+) button.":"","Click on the (+) button to create a new note or notebook. Click on the side menu to access your existing notebooks.":"","You currently have no notebook. Create one by clicking on (+) button.":""} \ No newline at end of file diff --git a/ReactNativeClient/locales/index.js b/ReactNativeClient/locales/index.js new file mode 100644 index 000000000..86d824b8a --- /dev/null +++ b/ReactNativeClient/locales/index.js @@ -0,0 +1,4 @@ +var locales = {}; +locales['en_GB'] = require('./en_GB.json'); +locales['fr_FR'] = require('./fr_FR.json'); +module.exports = { locales: locales }; \ No newline at end of file diff --git a/ReactNativeClient/locales/index.json b/ReactNativeClient/locales/index.json new file mode 100644 index 000000000..5209737de --- /dev/null +++ b/ReactNativeClient/locales/index.json @@ -0,0 +1 @@ +["en_GB","fr_FR"] \ No newline at end of file diff --git a/ReactNativeClient/root.js b/ReactNativeClient/root.js index 6f8a66668..4ec18481c 100644 --- a/ReactNativeClient/root.js +++ b/ReactNativeClient/root.js @@ -32,6 +32,7 @@ import { SideMenu } from 'lib/components/side-menu.js'; import { SideMenuContent } from 'lib/components/side-menu-content.js'; import { DatabaseDriverReactNative } from 'lib/database-driver-react-native'; import { reg } from 'lib/registry.js'; +import { _, setLocale } from 'lib/locale.js'; import RNFetchBlob from 'react-native-fetch-blob'; let defaultState = { @@ -370,6 +371,9 @@ async function initialize(dispatch, backButtonHandler) { reg.logger().info('Loading settings...'); await Setting.load(); + // Setting.setValue('locale', 'fr_FR'); + // setLocale(Setting.value('locale')); + reg.logger().info('Loading folders...'); await FoldersScreenUtils.refreshFolders();