Add cli command to compare locales + cleanup translation files

This commit is contained in:
Frederic Guillot
2015-06-21 15:45:26 -04:00
parent ff7189971e
commit 9b78126289
22 changed files with 1285 additions and 864 deletions

View File

@@ -36,6 +36,9 @@ export
export:subtasks Subtasks CSV export
export:tasks Tasks CSV export
export:transitions Task transitions CSV export
locale
locale:compare Compare application translations with the fr_FR locale
locale:sync Synchronize all translations based on the fr_FR locale
notification
notification:overdue-tasks Send notifications for overdue tasks
projects

View File

@@ -6,7 +6,7 @@ How to translate Kanboard to a new language?
- Translations are stored inside the directory `app/Locale`
- There is sub-directory for each language, by example for the French we have `fr_FR`, Italian `it_IT` etc...
- A translation is a PHP file that return an Array with a key-value pairs
- A translation is a PHP file that returns an Array with a key-value pairs
- The key is the original text in english and the value is the translation for the corresponding language
- **French translations are always up to date**
- Always use the last version (branch master)
@@ -58,13 +58,14 @@ All formats are available in the [PHP documentation](http://php.net/sprintf).
How to find missing translations in the applications?
-----------------------------------------------------
From a Unix shell run:
From a terminal, run the following command:
```bash
./scripts/find-strings.sh
./kanboard locale:compare
```
All missing translations are displayed on the screen. Put that in the french locale and sync other locales (see below).
All missing and unused translations are displayed on the screen.
Put that in the French locale and sync other locales (see below).
How to synchronize translation files?
-------------------------------------