diff options
author | Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net> | 2015-06-22 15:12:58 +0200 |
---|---|---|
committer | Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net> | 2015-06-22 15:12:58 +0200 |
commit | 2fff683110385047bd20fb5f0b68a008b48320dd (patch) | |
tree | 36c47220c0c69c6096515284a4d5750014d6edc1 /autotests/kconfig_compiler/test_translation_kde_domain_main.cpp | |
parent | 173b33592739f9a671f34eb816499ef32fe65c06 (diff) | |
download | kconfig-2fff683110385047bd20fb5f0b68a008b48320dd.tar.gz kconfig-2fff683110385047bd20fb5f0b68a008b48320dd.tar.bz2 |
Support translation domain in 'kde' translation system
In applications translations can be looked up in the globally set
translation domain, but in libraries it is necessary to link every
i18n call to the library's own translation domain. A new code
generation option TranslationDomain= is added to enable this.
It has effect only if TranslationSystem=kde is set.
Added unit tests to check generated translation calls.
CHANGELOG: New code generation option TranslationDomain=, for use with TranslationSystem=kde; normally needed in libraries.
REVIEW: 123872
Diffstat (limited to 'autotests/kconfig_compiler/test_translation_kde_domain_main.cpp')
-rw-r--r-- | autotests/kconfig_compiler/test_translation_kde_domain_main.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test_translation_kde_domain_main.cpp b/autotests/kconfig_compiler/test_translation_kde_domain_main.cpp new file mode 100644 index 00000000..64f8d59d --- /dev/null +++ b/autotests/kconfig_compiler/test_translation_kde_domain_main.cpp @@ -0,0 +1,32 @@ +/* +Copyright (c) 2015 Chusslove Illich <caslav.ilic@gmx.net> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "test_translation_kde_domain.h" +#include <QGuiApplication> + +int main(int argc, char **argv) +{ + QGuiApplication app(argc, argv); + Q_UNUSED(app); + TestNameSpace::TestTranslationKdeDomain *t = new TestNameSpace::TestTranslationKdeDomain(); + delete t; + return 0; +} |