mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Conversion and Translation.txt updates
Converted portugese strings.po into .js file
This commit is contained in:
+39
-24
@@ -1,14 +1,19 @@
|
||||
|
||||
HOW TO TRANSLATE
|
||||
===================
|
||||
=====================================================================
|
||||
|
||||
** NOTE TO DEVELOPERS **:
|
||||
- all strings sent to the page must go through the javascript function _() which will translate it. so please, if you add new strings, wrap them with _('') function.
|
||||
- if you want to add some strings in the css (using content), please, edit /script/localization.js too
|
||||
- thank you :)
|
||||
|
||||
ADD A NEW LANGUAGE
|
||||
======================
|
||||
All strings sent to the page must go through the javascript function _() which will translate it. So please if you add new strings, wrap them with _('') function.
|
||||
|
||||
If you want to add some strings in the css (using content), please edit /script/localization.js too.
|
||||
|
||||
Thank you :)
|
||||
|
||||
|
||||
ADDING A NEW LANGUAGE
|
||||
=====================================================================
|
||||
|
||||
Required tools:
|
||||
|
||||
ubuntu:
|
||||
@@ -16,38 +21,44 @@ ubuntu:
|
||||
apt-get install poedit
|
||||
apt-get install python
|
||||
|
||||
|
||||
windows:
|
||||
windows: http://poedit.net/
|
||||
https://www.python.org/download/windows/
|
||||
|
||||
Steps:
|
||||
1) Create a new directory lang/{new_language_code}
|
||||
2) Download the file adarkroom.pot in the lang folder as translation template
|
||||
3) Create the new po file:
|
||||
|
||||
- create a new directory lang/{new_language_code}
|
||||
- download the file adarkroom.pot in the lang folder as translation template
|
||||
- create the new po file:
|
||||
ubuntu:
|
||||
msginit --locale {locale for new language eg: en_US} -i lang/adarkroom.pot -o lang/{new_language}/strings.po
|
||||
windows:
|
||||
open application interface > File > New... > [select language for translation] > Save as... > lang/{new_language_code}/strings.po
|
||||
[update from POT file] > select lang/adarkroom.pot
|
||||
|
||||
- copy lang/main.css to lang/{new_language}
|
||||
- open lang/{new_language}/strings.po with a software poedit
|
||||
- translate ...
|
||||
- keep translating ...
|
||||
- finished ? sure ?
|
||||
- use the python script (/tools/po2js.py) to convert the po file to a js file
|
||||
4) Copy lang/main.css to lang/{new_language}
|
||||
5) Open lang/{new_language}/strings.po with a software poedit
|
||||
6) Translate ...
|
||||
7) Keep translating ...
|
||||
8) Finished? Sure?
|
||||
9) Use the python script (/tools/po2js.py) to convert the po file to a js file
|
||||
|
||||
run from command line/terminal:
|
||||
python tools/po2js.py lang/{new_language}/strings.po
|
||||
Note:
|
||||
make sure to have polib module installed or the command line/terminal will give you an error
|
||||
polib can be downloaded and installed via the command line/terminal from the python website
|
||||
|
||||
- edit README.md and add the following string: [{new_language_name}](http://adarkroom.doublespeakgames.com/?lang={new_language_code})
|
||||
- edit lang/langs.js and add the new language
|
||||
10) Edit README.md and add the following string: [{new_language_name}](http://adarkroom.doublespeakgames.com/?lang={new_language_code})
|
||||
11) Edit lang/langs.js and add the new language
|
||||
|
||||
- if your sentence are too big and you need to update some css, overload it in /lang/{new_language}/main.css
|
||||
Note: If your sentence are too big and you need to update some css, overload it in /lang/{new_language}/main.css
|
||||
|
||||
|
||||
UPDATE TEMPLATE FILE
|
||||
======================
|
||||
When new content or changes in the code introduce new strings the file lang/adarkroom.pot must be updated.
|
||||
=====================================================================
|
||||
|
||||
When new content or changes in the code introduce new strings, the file lang/adarkroom.pot must be updated.
|
||||
|
||||
Required tools:
|
||||
|
||||
@@ -57,15 +68,18 @@ ubuntu:
|
||||
windows:
|
||||
poedit
|
||||
|
||||
- ubuntu:
|
||||
Steps:
|
||||
ubuntu:
|
||||
pybabel extract -F babel.cfg -c "TRANSLATORS" script > lang/adarkroom.pot
|
||||
|
||||
windows:
|
||||
use poedit
|
||||
Use menu "Cataloge"-> "New Catalog from POT file..."
|
||||
|
||||
|
||||
UPDATE LANGUAGE AFTER UPDATE
|
||||
===============================
|
||||
=====================================================================
|
||||
|
||||
Required tools:
|
||||
|
||||
ubuntu:
|
||||
@@ -90,7 +104,8 @@ windows:
|
||||
|
||||
|
||||
SETUP POEDIT
|
||||
=================
|
||||
=====================================================================
|
||||
|
||||
To update from source without pot file need:
|
||||
|
||||
- Create new parser:
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user