Skip to content

Commit

Permalink
fixing merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Continuities committed Dec 7, 2014
2 parents 76098f2 + efe8120 commit d93d2fd
Show file tree
Hide file tree
Showing 7 changed files with 3,302 additions and 63 deletions.
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@ A Minimalist Text Adventure Game

[Click to play](http://adarkroom.doublespeakgames.com/)

[
[Chinese](http://adarkroom.doublespeakgames.com/?lang=zh_cn) |
[French](http://adarkroom.doublespeakgames.com/?lang=fr) |
[German](http://adarkroom.doublespeakgames.com/?lang=de) |
[Italian](http://adarkroom.doublespeakgames.com/?lang=it) |
[Korean](http://adarkroom.doublespeakgames.com/?lang=ko) |
[Polish](http://adarkroom.doublespeakgames.com/?lang=pl) |
[Russian](http://adarkroom.doublespeakgames.com/?lang=ru) |
[Spanish](http://adarkroom.doublespeakgames.com/?lang=es) |
[Swedish](http://adarkroom.doublespeakgames.com/?lang=sv) |
[Turkish](http://adarkroom.doublespeakgames.com/?lang=tr) |
[Ukrainian](http://adarkroom.doublespeakgames.com/?lang=uk)
]

Language | Options
-------- | --------
[Chinese](http://adarkroom.doublespeakgames.com/?lang=cn) | [French](http://adarkroom.doublespeakgames.com/?lang=fr)
[German](http://adarkroom.doublespeakgames.com/?lang=de) | [Italian](http://adarkroom.doublespeakgames.com/?lang=it)
[Japanese](http://adarkroom.doublespeakgames.com/?lang=jp) | [Korean](http://adarkroom.doublespeakgames.com/?lang=kr)
[Polish](http://adarkroom.doublespeakgames.com/?lang=pl) | [Portuguese](http://adarkroom.doublespeakgames.com/?lang=pg)
[Russian](http://adarkroom.doublespeakgames.com/?lang=ru) | [Spanish](http://adarkroom.doublespeakgames.com/?lang=es)
[Swedish](http://adarkroom.doublespeakgames.com/?lang=sv) | [Turkish](http://adarkroom.doublespeakgames.com/?lang=tr)
[Ukrainian](http://adarkroom.doublespeakgames.com/?lang=uk)

[Play on GitHub](http://continuities.github.io/adarkroom)
117 changes: 68 additions & 49 deletions doc/translation.txt
Original file line number Diff line number Diff line change
@@ -1,80 +1,98 @@

HOWTO TRANSLATE
===================
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 :)
** 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 :)


ADDING A NEW LANGUAGE
=====================================================================

ADD A NEW LANGUAGE
======================
Required tools:

ubuntu:
apt-get install gettext
apt-get install poedit
apt-get install python
ubuntu:
apt-get install gettext
apt-get install poedit
apt-get install python

windows:
http://poedit.net/
https://www.python.org/download/windows/

windows:
windows: http://poedit.net/
https://www.python.org/download/windows/
mac:
http://poedit.net
https://www.python.org/downloads/mac-osx/

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
- 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

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

- 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
on windows it could be necessary to run the command prompt as Administrator
Win Vista/7: start > right-click on command prompt > Run as Administrator
Win 8: File panel > mouse over Command prompt > click on Run command prompt as Administrator
python tools/po2js.py lang/{new_language}/strings.po
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
on windows it could be necessary to run the command prompt as Administrator
Win Vista/7: start > right-click on command prompt > Run as Administrator
Win 8: File panel > mouse over Command prompt > click on Run command prompt as Administrator

- 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 TEMPLATEFILE
======================
When new content or changes in the code introduce new strings the file lang/adarkroom.pot must be updated.
UPDATE TEMPLATE FILE
=====================================================================

When new content or changes in the code introduce new strings, the file lang/adarkroom.pot must be updated.

Required tools:

ubuntu:
apt-get install python3-babel
ubuntu:
apt-get install python3-babel

windows:
poedit
windows & mac:
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
===============================
UPDATE LANGUAGE AFTER UPDATE
=====================================================================

Required tools:

ubuntu:
* gettext
windows:
* poedit
ubuntu:
* gettext
windows & mac:
* poedit


- ubuntu:
Expand All @@ -92,8 +110,9 @@ windows:
- Edit in poedit as in "ADD A NEW LANGUAGE"


SETUP POEDIT
=================
SETUP POEDIT
=====================================================================

To update from source without pot file need:

- Create new parser:
Expand Down
1 change: 1 addition & 0 deletions lang/jp/strings.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lang/langs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ var langs = {
'es':'español',
'fr':'français',
'it':'italiano',
'jp':'日本',
'ko':'한국어',
'kr':'한국어',
'pg':'português',
'pl':'polski',
'ru':'русский',
'sv':'svenska',
Expand Down
3 changes: 3 additions & 0 deletions lang/pg/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.button{width: 100px !important;}
#outsidePanel .button{width: 115px !important;}
.eventPanel .button {width: 122px !important;}
1 change: 1 addition & 0 deletions lang/pg/strings.js

Large diffs are not rendered by default.

Loading

0 comments on commit d93d2fd

Please sign in to comment.