This tool translates your PSK(Polymer-Starter-Kit) App into 50 different languages, using a translation engine such as Google Translate and depends on Translate Shell(formerly Google Translate CLI). It is based on the amazing <i18n-msg> polymer element created by Eric Bidelman, for translation purposes.
I highly recommend checking out this element(<i18n-msg>) on Ebidel's Github Page, if you still have troubles translating your App or using polytrans.
en' (English)
If your App's original or main language is in a different language other than English, say Spanish ('es'),
just use the --set-orig-lang option, to update it.
Let's say you want to change your current original language from English(en) to french(fr):
$ ./polytrans.sh --set-orig-lang fr
- Go to polytrans home directory located in you PSK App
$ cd app/bower_components/polytrans
- Open the
.config.xmlfile using your prefered editor. I recommend nano.
$ nano .config.xmlYour modified .config.xml file should look like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<polytrans-config>
<version>0.0.3</version>
<original-language>fr</original-language>
</polytrans-config>
$ ./polytrans.sh
Translates your PSK App into at least 50 languages and opens a file manager(nautilus) containing all translated files, when done. (default:yes)
$ ./polytrans.sh es
Translates App from your original language into Spanish(es))
$ ./polytrans.sh {es:fr:it}
Translate App into Spanish(es), French(fr) and italian(it)
$ bower install --save Abilasco/polytrans
Saves polytrans files in bower_components folder of your PSK App.
$ cd app/bower_components/polytrans
Sends you to polytrans main(home) directory
$ chmod +x polytrans.sh
Makes polytrans an executable program(file)
Translated files are saved in your app/locales/polytrans-updates/[<current-date>] directory, by default. This folder will be created automatically, if it doesn't exist. To save the current translated files in different directory, run:
$ ./polytrans.sh /home/name/Desktop
- Translate Shell - Translate Shell (formerly Google Translate CLI) is a command-line translator powered by Google Translate (default), Bing Translator, and Yandex.Translate. It gives you easy access to one of these translation engines your terminal - Github link
-
--set-orig-lang Set a new original language and exit.
-
--show-cur-orig-lang Print the current original language and exit.
-
-v, -V, --version Print version and exit.
-
-?, -h, -H, --help Print help message and exit.
-
-m, -M, --man Show man page and exit.
-
-l, -L, --languages Print all supported 50 languages and codes, in a reference table and exit. Names of languages are displayed in their endonyms (language name in the language itself) and the current selected original language is
highlighted.
- Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
- polymig (1)