You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-06 09:19:22 +02:00
Support for RN localisation
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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\""
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user