Allow extraction of strings for rotations in tderandr

so that strings can be translated.

This resolves issue #96.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 99ddb86155)
r14.0.x
Slávek Banko 4 years ago
parent 4da21068f8
commit 879b8a1c05
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -40,6 +40,14 @@ if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp )
endif( ) endif( )
##### prepare tderandr/libtderandr.h #############
# hide "#define" to allow strings to be extracted using xgettext
file( READ ${CMAKE_CURRENT_SOURCE_DIR}/tderandr/libtderandr.h _tderandr_h )
string( REGEX REPLACE "\n(#define[^\n]*)(I18N_NOOP)" "\n/*\\1*/\\2" _tderandr_h ${_tderandr_h} )
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/tderandr/libtderandr.h.tde_l10n "${_tderandr_h}" )
##### prepare tdeabc/addressee strings ########## ##### prepare tdeabc/addressee strings ##########
# read file # read file
@ -104,6 +112,7 @@ tde_l10n_create_template(
"." "."
"tdeabc/scripts/entrylist.tde_l10n" "tdeabc/scripts/entrylist.tde_l10n"
"tdecore/tde-config.cpp.cmake" "tdecore/tde-config.cpp.cmake"
"tderandr/libtderandr.h.tde_l10n"
"../dependencies/tqt3/src" "../dependencies/tqt3/src"
"../dependencies/tqt3/src/xml/qxml.cpp.tde_l10n" "../dependencies/tqt3/src/xml/qxml.cpp.tde_l10n"
EXCLUDES EXCLUDES
@ -121,8 +130,9 @@ tde_l10n_create_template(
"^tdeio/" "^tdeio/"
"^tdeioslave/" "^tdeioslave/"
"^tdeprint/" "^tdeprint/"
"^tdeui/colors/" "^tderandr/libtderandr.h$"
"^tdestyles/.*/config/" "^tdestyles/.*/config/"
"^tdeui/colors/"
"/dependencies/tqt3/src/xml/qxml.cpp$" "/dependencies/tqt3/src/xml/qxml.cpp$"
KEYWORDS KEYWORDS
tr tr:1,2 tr tr:1,2

@ -35,10 +35,10 @@
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
#include <tdelibs_export.h> #include <tdelibs_export.h>
#define ROTATION_0_DEGREES_STRING "0 degrees" #define ROTATION_0_DEGREES_STRING I18N_NOOP("0 degrees")
#define ROTATION_90_DEGREES_STRING "90 degrees" #define ROTATION_90_DEGREES_STRING I18N_NOOP("90 degrees")
#define ROTATION_180_DEGREES_STRING "180 degrees" #define ROTATION_180_DEGREES_STRING I18N_NOOP("180 degrees")
#define ROTATION_270_DEGREES_STRING "270 degrees" #define ROTATION_270_DEGREES_STRING I18N_NOOP("270 degrees")
/** /**
* Simple API covering most of the uses of libtderandr. * Simple API covering most of the uses of libtderandr.

Loading…
Cancel
Save