Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[transfer-engine] Document better the example plugin translations. Co…
…ntributes to JB#44014

That is, plugins should really handle translations themselves.
Also renamed finnish example translations to have '-' separator for
locale which the code was really trying to use and is the common
naming.
  • Loading branch information
pvuorela committed Nov 29, 2018
1 parent 2474510 commit af8fd47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions example/example.pro
Expand Up @@ -26,6 +26,14 @@ shareui.path = /usr/share/nemo-transferengine/plugins
target.path = /usr/lib/nemo-transferengine/plugins
INSTALLS += target shareui

# NOTE: the translations here assume that generic sharing UI system will pick up the
# translations from specific /usr/share/translations/nemotransferengine/ with
# specific name where '-' separates locale code at the end.
# It might work for time being, but it's preferred if plugins take the responsibility
# for loading translations in sharing plugin if that uses translations, and/or from
# qml code. Latter commonly by importing an own module where c++ side instantiates
# and installs QTranslator(s) to the qApp on initializeEngine().

TS_FILE = $$OUT_PWD/example_share_plugin.ts
EE_QM = $$OUT_PWD/example_share_plugin_eng_en.qm

Expand All @@ -49,8 +57,8 @@ engineering_english_install.path = /usr/share/translations/nemotransferengine
engineering_english_install.files = $$EE_QM
engineering_english_install.CONFIG += no_check_exist

TS_FI_FILE = translations/example_share_plugin_fi.ts
QM_FI_FILE = example_share_plugin_fi.qm
TS_FI_FILE = translations/example_share_plugin-fi.ts
QM_FI_FILE = example_share_plugin-fi.qm

finnish.commands += lrelease -idbased $$TS_FI_FILE -qm $$QM_FI_FILE
finnish.CONFIG += no_check_exist no_link
Expand Down

0 comments on commit af8fd47

Please sign in to comment.