summaryrefslogtreecommitdiff
path: root/docs/translations.txt
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-11-16 22:59:16 +0900
committerkali <kali@leap.se>2012-12-20 02:51:18 +0900
commitd04c93134ad3daaee0ca280824ab3288bfc5029c (patch)
treef00606c24c2efc7fcc15ec327d50a35a2a585572 /docs/translations.txt
parente98c3cc5fad75bea038dc67238e5ce85d701b1e1 (diff)
initial translation example.
Diffstat (limited to 'docs/translations.txt')
-rw-r--r--docs/translations.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/translations.txt b/docs/translations.txt
new file mode 100644
index 00000000..8cdb2e40
--- /dev/null
+++ b/docs/translations.txt
@@ -0,0 +1,22 @@
+Translations steps
+==================
+
+1. Use .tr() on labels to be translated.
+
+Note about this: there seems to be some problems with the .tr method
+on QObjects. Investigate this.
+
+I still believe we can use a generic _ method which is smart enough to
+fallback to QObject.tr methods or lookup our own tr implementation (for our
+multilungual objects, like in exceptions or provider labels that came from json objects).
+
+2. Add source files to the project file, data/leap_client.pro (Note: investigate if we can use some form of expansion here; it's tedious to add source files one by one).
+
+3. Still in data/leap_client.pro, add a translation per each language. Translations live in data/translations.
+
+4. exec ``pylupdate4`` data/leap_client.pro to generate initial .ts file
+5. Use QtLinguist (* or whatever web service we end up using *) to translate stuff. We expect the ts to follow Qt xml format, which seems standard enough to allow some fair degree of play.
+6. Execute ``lrelease data/leap_client.pro`` to generate .qm files.
+7. Check that the .qm for the language you're working with is listed in data/resources/locale.qrc file.
+
+8. Execute ``make resources`` to re-generate locale_qrc (in src/leap/gui). This is the compiled resource file that we load in the main app entry point; and from where we load the data for the qt translator object.