-
Notifications
You must be signed in to change notification settings - Fork 11
CLI scripts syntax
- add_tags
- export_surveys
- import_po
- import_transvision_id
- import_transvision_string
- lang_update
- mark_active
- mark_not_active
- untracked_files
Add missing tag to a specific file (only mozilla.org)
./app/scripts/add_tags [lang_filename]
Export completely localized survey files to Excel format (.xls). These files can be manually imported in SurveyGizmo (only surveys)
./app/scripts/export_surveys [lang_filename] [export_path]
Import a local .po file into a .lang file
./app/scripts/import_po [po_filename] [lang_filename]
Use Transvision API to read a specific string ID, store translation in the .lang file if not already translated.
./app/scripts/import_transvision_id [lang_filename] [repo] [string_id]
./app/scripts/import_transvision_id main.lang aurora mobile/android/base/sync_strings.dtd:fxaccount_status_legal
Import translation for the requested string ID from Aurora into main.lang
Use Transvision API to get a translation for a string, store translation in the .lang file if not already translated.
./app/scripts/import_transvision_string [lang_filename] [repo] [string]
./app/scripts/import_transvision_string main.lang aurora "Legal"
Import translation for "Legal" from Aurora into main.lang
Update lang files: adding new strings from reference locales, removing tags, etc.
./app/scripts/lang_update [lang_filename] [website_id] [locale_code]
./app/scripts/lang_update mozorg/home.lang 0 all
One file, all locales. 2nd and 3rd parameters are optional for mozilla.org, element 0 in $sites.
./app/scripts/lang_update mozorg/home.lang 0 fr
One file, one locale (French in this case).
./app/scripts/lang_update all 0 fr
All files, one locale (French in this case).
./app/scripts/lang_update all 0 all
All files, all locales.
./app/scripts/mark_active [lang_filename]
Mark active a file, if completely translated, for all locales. Supports only mozilla.org
./app/scripts/mark_not_active [lang_filename]
Remove the active tag from a file, for all locales. Supports only mozilla.org
./app/scripts/untracked_files [websiteid] [locale] [absolute]
This script can be used to list, and potentially delete, untracked files from a repository. If called without parameters, it will display a list of all untracked files for mozilla.org, for all locales, with relative paths.
The output can be run from the root of the repository, and piped to actually delete the files. For example:
cd /path/to/www.mozilla.org
/path/to/langchecker/app/scripts/untracked_files | xargs git rm $1