From 2fff683110385047bd20fb5f0b68a008b48320dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chusslove=20Illich=20=28=D0=A7=D0=B0=D1=81=D0=BB=D0=B0?= =?UTF-8?q?=D0=B2=20=D0=98=D0=BB=D0=B8=D1=9B=29?= Date: Mon, 22 Jun 2015 15:12:58 +0200 Subject: 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 --- .../test_translation_kde_domain_main.cpp | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 autotests/kconfig_compiler/test_translation_kde_domain_main.cpp (limited to 'autotests/kconfig_compiler/test_translation_kde_domain_main.cpp') 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 + +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 + +int main(int argc, char **argv) +{ + QGuiApplication app(argc, argv); + Q_UNUSED(app); + TestNameSpace::TestTranslationKdeDomain *t = new TestNameSpace::TestTranslationKdeDomain(); + delete t; + return 0; +} -- cgit v1.2.1