From 11de4d59ea0c87b31b660025d3b21fab66c48621 Mon Sep 17 00:00:00 2001 From: Jonathan Cross Date: Sun, 4 Jun 2017 13:44:45 +0200 Subject: Converting README.i18n to Markdown --- README.i18n | 45 --------------------------------------------- README.i18n.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 README.i18n create mode 100644 README.i18n.md diff --git a/README.i18n b/README.i18n deleted file mode 100644 index 755c5cf38..000000000 --- a/README.i18n +++ /dev/null @@ -1,45 +0,0 @@ -The Monero command line tools can be translated in various languages. -In order to use the same translation workflow as the future GUI, they -use Qt Linguist translation files. However, to avoid the dependencies -on Qt this normally implies, they use a custom loader to read those -files at runtime. In order to update, or build translations files, you -do need to have Qt tools installed, however. For translating, you need -either the Qt Linguist GUI, or another tool that supports Qt ts files, -such as Transifex. To run, you do not need anything Qt. - -To update ts files after changing source code: - - ./utils/translations/update-translations.sh - -To add a new language, eg Spanish (ISO code es): - - cp translations/monero.ts translations/monero_es.ts - -To edit translations for Spanish: - - linguist translations/monero_es.ts - -To build translations after modifying them: - - ./utils/translations/build-translations.sh - -To test a translation: - - LANG=es ./build/release/bin/monero-wallet-cli - -To add new translatable sources in the source: - - Use the tr(string) function if possible. If the code is in a class, - and this class doesn't already have a tr() static function, add one, - which uses a context named after what lupdate uses for the context, - usually the fully qualified class name (eg, cryptonote::simple_wallet). - If you need to use tr in code that's not in a class, you can use the - fully qualified version (eg, simple_wallet::tr) of the one matching - the context you want. - Use QT_TRANSLATE_NOOP(string) if you want to specify a context manually. - -If you're getting messages of the form: - - Class 'cryptonote::simple_wallet' lacks Q_OBJECT macro - -all is fine, we don't actually need that here. diff --git a/README.i18n.md b/README.i18n.md new file mode 100644 index 000000000..755c5cf38 --- /dev/null +++ b/README.i18n.md @@ -0,0 +1,45 @@ +The Monero command line tools can be translated in various languages. +In order to use the same translation workflow as the future GUI, they +use Qt Linguist translation files. However, to avoid the dependencies +on Qt this normally implies, they use a custom loader to read those +files at runtime. In order to update, or build translations files, you +do need to have Qt tools installed, however. For translating, you need +either the Qt Linguist GUI, or another tool that supports Qt ts files, +such as Transifex. To run, you do not need anything Qt. + +To update ts files after changing source code: + + ./utils/translations/update-translations.sh + +To add a new language, eg Spanish (ISO code es): + + cp translations/monero.ts translations/monero_es.ts + +To edit translations for Spanish: + + linguist translations/monero_es.ts + +To build translations after modifying them: + + ./utils/translations/build-translations.sh + +To test a translation: + + LANG=es ./build/release/bin/monero-wallet-cli + +To add new translatable sources in the source: + + Use the tr(string) function if possible. If the code is in a class, + and this class doesn't already have a tr() static function, add one, + which uses a context named after what lupdate uses for the context, + usually the fully qualified class name (eg, cryptonote::simple_wallet). + If you need to use tr in code that's not in a class, you can use the + fully qualified version (eg, simple_wallet::tr) of the one matching + the context you want. + Use QT_TRANSLATE_NOOP(string) if you want to specify a context manually. + +If you're getting messages of the form: + + Class 'cryptonote::simple_wallet' lacks Q_OBJECT macro + +all is fine, we don't actually need that here. diff --git a/README.md b/README.md index e6450b53c..4ab203671 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,7 @@ monero-wallet-cli, and possibly monerod, if you get crashes refreshing. ## Internationalization -See [README.i18n](README.i18n). +See [README.i18n.md](README.i18n.md). ## Using Tor -- cgit v1.2.3