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 --- .../kconfig_compiler/test_translation_qt.cpp.ref | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 autotests/kconfig_compiler/test_translation_qt.cpp.ref (limited to 'autotests/kconfig_compiler/test_translation_qt.cpp.ref') diff --git a/autotests/kconfig_compiler/test_translation_qt.cpp.ref b/autotests/kconfig_compiler/test_translation_qt.cpp.ref new file mode 100644 index 00000000..f5ae7273 --- /dev/null +++ b/autotests/kconfig_compiler/test_translation_qt.cpp.ref @@ -0,0 +1,23 @@ +// This file is generated by kconfig_compiler_kf5 from test_translation.kcfg. +// All changes you do to this file will be lost. + +#include "test_translation_qt.h" + +using namespace TestNameSpace; + +TestTranslationQt::TestTranslationQt( ) + : KConfigSkeleton( QLatin1String( "test_translation_rc" ) ) +{ + setCurrentGroup( QLatin1String( "General" ) ); + + KConfigSkeleton::ItemBool *itemAutoSave; + itemAutoSave = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Auto Save" ), mAutoSave, false ); + itemAutoSave->setLabel( QCoreApplication::translate("TestTranslationQt", "Enable automatic saving of calendar") ); + itemAutoSave->setWhatsThis( /*: @info:whatsthis */ QCoreApplication::translate("TestTranslationQt", "Enable automatic saving of calendars to have calendars saved automatically.") ); + addItem( itemAutoSave, QLatin1String( "AutoSave" ) ); +} + +TestTranslationQt::~TestTranslationQt() +{ +} + -- cgit v1.2.1