Skip to content

Commit

Permalink
fin des trads, un peu de ménage & de doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vanadar committed Feb 8, 2014
1 parent 5dd42bc commit cc2f374
Show file tree
Hide file tree
Showing 10 changed files with 1,651 additions and 1,568 deletions.
29 changes: 29 additions & 0 deletions doc/translation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

HOWTO TRANSLATE
===================

for people who doesn't need translation :
- 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
======================

- copy the /lang/fr folder to /lang/{new_language}
- open /lang/{new_language}/strings.po with a software like PoEdit (available on linux/mac/windows, no excuses)
- translate ...
- keep translating ...
- finished ? sure ?
- use the python script (/tools/po2js.py) to convert the po file to a js file
- edit index.html and add the following script after '<script src="lib/translate.js"></script>' (replace the path with your language)

<script>
//load language
document.write('<script src="lang/fr/strings.js"><\/script>');
document.write('<link rel="stylesheet" type="text/css" href="lang/fr/main.css" \/>');
</script>

- if your sentence are too big and you need to update some css, overload it in /lang/{new_language}/main.css


4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

<script>
//load language
document.write('<script src="lang/fr.js"><\/script>');
document.write('<link rel="stylesheet" type="text/css" href="lang/fr.css" \/>');
document.write('<script src="lang/fr/strings.js"><\/script>');
document.write('<link rel="stylesheet" type="text/css" href="lang/fr/main.css" \/>');
</script>

<script src="script/Button.js"></script>
Expand Down
1 change: 0 additions & 1 deletion lang/fr.js

This file was deleted.

Binary file removed lang/fr.mo
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions lang/fr/strings.js

Large diffs are not rendered by default.

Binary file added lang/fr/strings.mo
Binary file not shown.
Loading

0 comments on commit cc2f374

Please sign in to comment.