From 92d5c28cf0cff9aded6cdda05e625fd956667e07 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 9 May 2015 14:11:33 -0400 Subject: [PATCH] Updated Translator Guide (markdown) --- Translator-Guide.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Translator-Guide.md b/Translator-Guide.md index a39ede8..eeb5192 100644 --- a/Translator-Guide.md +++ b/Translator-Guide.md @@ -76,6 +76,33 @@ All these rules in the previous section are rather complex, but the fact of the If your text editor lets you choose an encoding to save your file to, make sure that you use UTF-8. It will make my life much easier. +## See the results live + +To see the results of you translation, you have to be able to [build dupeGuru from source](https://github.com/hsoft/dupeguru#how-to-build-dupeguru-from-source). Then, the steps to follow depend on the situation. + +### Transifex + +If you've done the translation on Transifex, you'll have to pull those translations into dupeGuru using the [transifex client](http://docs.transifex.com/client/). You can install it with those steps: + +1. Make sure that dupeGuru's virtualenv is active: `. env/bin/activate`. +2. `pip install transifex-client` + +Then, you can pull translations update with `tx pull -a` + +### Existing language + +If the language you're working on is already present in dupeGuru, things are simple. You simply have to build dupeGuru with `python build.py` followed by `python run.py` and you'll be able to see your changes live. + +### New language + +If the language you're working on is new, things are a bit more complicated. You'll have to add that language in the code. You'll have to add references to your new language in these files: + +* hscommon/trans.py +* qtlib/preferences.py +* qt/base/preferences_dialog.py + +To help you, you can look at [this commit](https://github.com/hsoft/dupeguru/commit/0068e7b85a93d7032e7a381f54178f7708a7ab24) where the Korean language was added. + # Help File translation Help file translation is much simpler to do than application translation, but it's much longer and more boring. I'd understand if you don't want to do it, or do it partially (I personally hate to do it). dupeGuru help is built using [Sphinx](http://sphinx.pocoo.org/), so it's better if you're familiar with its syntax.