diff --git a/kexi_xgettext.sh b/kexi_xgettext.sh deleted file mode 100644 index 8e668ace5..000000000 --- a/kexi_xgettext.sh +++ /dev/null @@ -1,81 +0,0 @@ -# -# Helper function for extracting translatable messages from Kexi source code. -# Usage: kexi_xgettext -# If there are no messages or the is empty, the pot file is deleted. -# -# Example usage that creates $podir/myapp.pot file: -# xgettext_xgettext myapp.pot `find . -name \*.cpp -o -name \*.h` -# -function kexi_xgettext() { - POTFILE="$podir/$1" - shift - if test -n "$*"; then - kexi_xgettext_internal $* | tee "${POTFILE}" | tail -n1 | grep "^msgstr \"\"\$" > /dev/null \ - || rm -f "${POTFILE}" 2> /dev/null - fi -} - -function kexi_xgettext_internal() { - SRC_FILES="$*" - POT_PART_NORMAL="`mktemp $podir/_normal_XXXXXXXX.pot`" - POT_PART_QUNDOFORMAT="`mktemp $podir/_qundoformat_XXXXXXXX.pot`" - POT_PART_QUNDOFORMAT2="`mktemp $podir/_qundoformat2_XXXXXXXX.pot`" - POT_MERGED="`mktemp $podir/_merged_XXXXXXXX.pot`" - - $XGETTEXT ${CXG_EXTRA_ARGS} ${SRC_FILES} -o "${POT_PART_NORMAL}" --force-po - $XGETTEXT_PROGRAM --from-code=UTF-8 -C --kde -kkundo2_i18n:1 -kkundo2_i18np:1,2 -kkundo2_i18nc:1c,2 -kkundo2_i18ncp:1c,2,3 ${CXG_EXTRA_ARGS} ${SRC_FILES} -o "${POT_PART_QUNDOFORMAT}" - - if [ $(cat ${POT_PART_NORMAL} ${POT_PART_QUNDOFORMAT} | grep -c \(qtundo-format\)) != 0 ]; then - echo "ERROR: Context '(qtundo-format)' should not be added manually. Use kundo2_i18n*() calls instead." 1>&2 - exit 17 - fi - - if [ -s "${POT_PART_QUNDOFORMAT}" ]; then - # Prepend "(qtundo-format)" to existing msgctxt properties of messages - sed -i -e 's/^msgctxt "/msgctxt "(qtundo-format) /' "${POT_PART_QUNDOFORMAT}" - - # Add msgctxt "(qtundo-format)" to messages not having msgctxt yet - # - # lastLine != "#, fuzzy" is the check for the .pot header. - mv "${POT_PART_QUNDOFORMAT}" "${POT_PART_QUNDOFORMAT2}" - cat "${POT_PART_QUNDOFORMAT2}" | awk ' - /^msgid "/ { - if (lastLine !~ /^msgctxt/ && lastLine != "#, fuzzy") { - print "msgctxt \"(qtundo-format)\"" - } - } - { print ; lastLine = $0 }' > "${POT_PART_QUNDOFORMAT}" - fi - - if [ -s "${POT_PART_NORMAL}" -a -s "${POT_PART_QUNDOFORMAT}" ]; then - ${MSGCAT} -F "${POT_PART_NORMAL}" "${POT_PART_QUNDOFORMAT}" > ${POT_MERGED} - MERGED_HEADER_LINE_COUNT=$(cat ${POT_MERGED} | grep "^$" -B 100000 --max-count=1 | wc -l) - - KDE_HEADER="$(cat ${POT_PART_NORMAL} | grep "^$" -B 100000 --max-count=1)" - MERGED_TAIL="$(cat ${POT_MERGED} | tail -n +$MERGED_HEADER_LINE_COUNT)" - - # Print out the resulting .pot - echo "$KDE_HEADER" - echo "$MERGED_TAIL" - elif [ -s "${POT_PART_NORMAL}" ]; then - cat "${POT_PART_NORMAL}" - elif [ -s "${POT_PART_QUNDOFORMAT}" ]; then - cat "${POT_PART_QUNDOFORMAT}" - fi - - rm -f "${POT_PART_NORMAL}" "${POT_PART_QUNDOFORMAT}" "${POT_PART_QUNDOFORMAT2}" "${POT_MERGED}" -} - -# Sets EXCLUDE variable to excludes compatible with the find(1) command, e.g. '-path a -o -path b'. -# To unconditionally exclude dir (with subdirs) just put an empty file .i18n in it. -# To disable excluding for given file, e.g. foo.pot, add "foo.pot" line to the .i18n file. -function find_exclude() { - EXCLUDE="" - for f in `find . -name .i18n | sed 's/\/\.i18n$//g' | sort`; do - if ! grep -q "^${1}$" "$f/.i18n" ; then - if [ -n "$EXCLUDE" ] ; then EXCLUDE="$EXCLUDE -o " ; fi - EXCLUDE="$EXCLUDE -path $f" - fi - done - if [ -z "$EXCLUDE" ] ; then EXCLUDE="-path __dummy__" ; fi # needed because -prune in find needs args -} diff --git a/kundo2_aware_xgettext.sh b/kundo2_aware_xgettext.sh new file mode 100644 index 000000000..99cb4cd77 --- /dev/null +++ b/kundo2_aware_xgettext.sh @@ -0,0 +1,113 @@ +# +# Helper function for extracting translatable messages from Calligra/Krita/Kexi source code. +# Usage: kundo2_aware_xgettext +# If there are no messages or the is empty, the pot file is deleted. +# +# Example usage that creates $podir/myapp.pot file: +# kundo2_aware_xgettext myapp.pot `find . -name \*.cpp -o -name \*.h` +# +function kundo2_aware_xgettext() { + POTFILE="$podir/$1" + shift + if test -n "$*"; then + # we rely on last line being a 'msgstr' signaling that strings has been extracted (a header is always present) + # normally it ends with 'msgstr ""' but if plural it can end with eg 'msgstr[1] ""' + kundo2_aware_xgettext_internal $* | tee "${POTFILE}" | tail -n1 | grep "^msgstr" > /dev/null \ + || rm -f "${POTFILE}" 2> /dev/null + fi +} + +# How to unit test: +# export podir=. +# cp init-sample.pot sample.pot +# source krita_xgettext.sh +# add_ctxt_qtundo sample.pot +# +# Then check that all messages in sample.pot have "(qtundo-format)" in msgctxt. +function add_ctxt_qtundo() { + POT_PART_QUNDOFORMAT="$1" + POT_PART_QUNDOFORMAT2="`mktemp $podir/_qundoformat2_XXXXXXXX.pot`" + + # Prepend "(qtundo-format)" to existing msgctxt properties of messages + sed -i -e 's/^msgctxt "/msgctxt "(qtundo-format) /' "${POT_PART_QUNDOFORMAT}" + + # Add msgctxt "(qtundo-format)" to messages not having msgctxt yet + # + # lastLine != "#, fuzzy" is the check for the .pot header. + # If lastLine starts with '"' the msgctxt has been split on several lines and is treated by sed above, so skip it + mv "${POT_PART_QUNDOFORMAT}" "${POT_PART_QUNDOFORMAT2}" + cat "${POT_PART_QUNDOFORMAT2}" | awk ' + /^msgid "/ { + if (lastLine !~ /^\"/ && lastLine !~ /^msgctxt/ && lastLine != "#, fuzzy") { + print "msgctxt \"(qtundo-format)\"" + } + } + { print ; lastLine = $0 }' > "${POT_PART_QUNDOFORMAT}" + + rm -f "${POT_PART_QUNDOFORMAT2}" +} + +function kundo2_aware_xgettext_internal() { + SRC_FILES="$*" + POT_PART_NORMAL="`mktemp $podir/_normal_XXXXXXXX.pot`" + POT_PART_QUNDOFORMAT="`mktemp $podir/_qundoformat_XXXXXXXX.pot`" + POT_MERGED="`mktemp $podir/_merged_XXXXXXXX.pot`" + + $XGETTEXT ${CXG_EXTRA_ARGS} ${SRC_FILES} -o "${POT_PART_NORMAL}" --force-po + + XGETTEXT_FLAGS_KUNDO2="\ +--copyright-holder=This_file_is_part_of_KDE \ +--msgid-bugs-address=http://bugs.kde.org \ +--from-code=UTF-8 +-C -k --kde \ +-kkundo2_i18n:1 -kkundo2_i18np:1,2 -kkundo2_i18nc:1c,2 -kkundo2_i18ncp:1c,2,3 \ +" + + $XGETTEXT_PROGRAM ${XGETTEXT_FLAGS_KUNDO2} ${CXG_EXTRA_ARGS} ${SRC_FILES} -o "${POT_PART_QUNDOFORMAT}" + + if [ $(cat ${POT_PART_NORMAL} ${POT_PART_QUNDOFORMAT} | grep -c \(qtundo-format\)) != 0 ]; then + echo "ERROR: Context '(qtundo-format)' should not be added manually. Use kundo2_i18n*() calls instead." 1>&2 + exit 17 + fi + + if [ -s "${POT_PART_QUNDOFORMAT}" ]; then + add_ctxt_qtundo "${POT_PART_QUNDOFORMAT}" + fi + + if [ -s "${POT_PART_NORMAL}" -a -s "${POT_PART_QUNDOFORMAT}" ]; then + # ensure an empty line or else KDE_HEADER search will fail + # in case POT_PART_NORMAL only contains header + echo "" >>${POT_PART_NORMAL} + + ${MSGCAT} -F "${POT_PART_NORMAL}" "${POT_PART_QUNDOFORMAT}" > ${POT_MERGED} + MERGED_HEADER_LINE_COUNT=$(cat ${POT_MERGED} | grep "^$" -B 100000 --max-count=1 | wc -l) + KDE_HEADER="$(cat ${POT_PART_NORMAL} | grep "^$" -B 100000 --max-count=1)" + MERGED_TAIL="$(cat ${POT_MERGED} | tail -n +$MERGED_HEADER_LINE_COUNT)" + + # Print out the resulting .pot + echo "$KDE_HEADER" + echo "$MERGED_TAIL" + elif [ -s "${POT_PART_NORMAL}" ]; then + echo "# POT_PART_NORMAL only" + cat "${POT_PART_NORMAL}" + elif [ -s "${POT_PART_QUNDOFORMAT}" ]; then + echo "# POT_PART_QUNDOFORMAT only" + cat "${POT_PART_QUNDOFORMAT}" + fi + + rm -f "${POT_PART_NORMAL}" "${POT_PART_QUNDOFORMAT}" "${POT_MERGED}" +} + +# Sets EXCLUDE variable to excludes compatible with the find(1) command, e.g. '-path a -o -path b'. +# To unconditionally exclude dir (with subdirs) just put an empty file .i18n in it. +# To disable excluding for given file, e.g. foo.pot, add "foo.pot" line to the .i18n file. +function find_exclude() { + EXCLUDE="" + for f in `find . -name .i18n | sed 's/\/\.i18n$//g' | sort`; do + if ! grep -q "^${1}$" "$f/.i18n" ; then + if [ -n "$EXCLUDE" ] ; then EXCLUDE="$EXCLUDE -o " ; fi + EXCLUDE="$EXCLUDE -path $f" + fi + done + if [ -z "$EXCLUDE" ] ; then EXCLUDE="-path __dummy__" ; fi # needed because -prune in find needs args +} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d385fe2d2..114225d97 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,96 +1,96 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) option(KEXI_MOBILE "Compile a mobile version of Kexi" OFF) check_function_exists("uname" HAVE_UNAME) option(KEXI_SHOW_UNFINISHED "Show unfinished features in Kexi. Thus is useful for testing but may confuse end-user." OFF) option(KEXI_SHOW_UNIMPLEMENTED "Forces to show menu entries and dialogs just to give impression about development plans for Kexi. Only recommended for test/development versions." OFF) # Extra GUI features option(KEXI_AUTORISE_TABBED_TOOLBAR "Experimental: Autorise the main tabbed toolbar in Kexi" OFF) # Experimental: option(KEXI_SCRIPTS_SUPPORT "Experimental: Enable scripting in Kexi" ON) # Broken: option(KEXI_FORM_CURSOR_PROPERTY_SUPPORT "Broken: Enable \"cursor\" property in the form designer" OFF) option(KEXI_SHOW_CONTEXT_HELP "Broken: Enable context help in Kexi main window" OFF) option(KEXI_QUICK_PRINTING_SUPPORT "Broken: Enable print/print preview/print setup for tables/queries in the project navigator" OFF) option(KEXI_AUTOFIELD_FORM_WIDGET_SUPPORT "Broken: Enable \"auto field\" form widget in the form designer" OFF) # OFF because we need to replace it with QTreeWidget which uses very different API compared to Q3ListView. Re-add QTreeWidget? option(KEXI_LIST_FORM_WIDGET_SUPPORT "Broken: Enable \"list\" form widget in the form designer" OFF) option(KEXI_PIXMAP_COLLECTIONS_SUPPORT "Broken: Enable support for pixmap collections" OFF) # Not available: option(KEXI_MACROS_SUPPORT "Experimental: Enable macros in Kexi" OFF) if(KEXI_MACROS_SUPPORT) # temp. message(FATAL_ERROR "Macros are not yet available.") endif() option(KEXI_TABLE_PRINT_SUPPORT "Experimental: Enable printing of tabular view in Kexi" OFF) # broken since Kexi 2 if(KEXI_TABLE_PRINT_SUPPORT) # temp. message(FATAL_ERROR "Table printing is not yet available.") endif() option(KEXI_PROJECT_TEMPLATES "Experimental: Enable support for project templates in Kexi" OFF) # broken since Kexi 2 if(KEXI_PROJECT_TEMPLATES) # temp. message(FATAL_ERROR "Project templates are not yet available.") endif() #See commit 1e433a54cd9, left here for reference #option(KEXI_SQLITE_MIGRATION "If defined, SQLite3 migration to some newer format is possible. Users can see a suitable question on app's startup." OFF) add_definitions(-DTRANSLATION_DOMAIN=\"kexi\") #no default: add_definitions(-DKDE_DEFAULT_DEBUG_AREA=44010) configure_file(config-kexi.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kexi.h ) configure_file(KexiVersion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/KexiVersion.h) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/core ) add_subdirectory( kexiutils ) add_subdirectory( core ) add_subdirectory( widget ) add_subdirectory( data ) add_subdirectory( plugins ) if (BUILD_TESTING) #TODO KEXI3 add_subdirectory( tests ) endif() if(KEXI_MOBILE) else() add_subdirectory( main ) add_subdirectory( formeditor ) add_subdirectory( migration ) endif() ########### next target ############### if(KEXI_MOBILE) add_subdirectory( mobile ) else() set(kexi_SRCS main.cpp Messages.sh # non-source: - ${CMAKE_SOURCE_DIR}/kexi_xgettext.sh + ${CMAKE_SOURCE_DIR}/kundo2_aware_xgettext.sh Mainpage.dox Messages.sh ) kexi_add_app_icons(kexi_SRCS) kexi_add_app_metadata_files(kexi_SRCS) kexi_add_executable(kexi ${kexi_SRCS}) target_link_libraries(kexi PRIVATE keximain ) install(TARGETS kexi ${INSTALL_TARGETS_DEFAULT_ARGS}) endif() add_subdirectory( pics ) diff --git a/src/Messages.sh b/src/Messages.sh index 8ffde14fa..dc91425b7 100755 --- a/src/Messages.sh +++ b/src/Messages.sh @@ -1,18 +1,18 @@ #! /bin/sh -source ../kexi_xgettext.sh +source ../kundo2_aware_xgettext.sh potfile=kexi.pot find_exclude $potfile LIST="`find . \( $EXCLUDE \) -prune -o \( -name \*.ui \) -type f -print | grep -v -e '/\.'`" if test -n "$LIST"; then $EXTRACTRC $LIST >> rc.cpp fi # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/mdb/Messages.sh b/src/migration/mdb/Messages.sh index 9fdd5cec0..3597c5be4 100755 --- a/src/migration/mdb/Messages.sh +++ b/src/migration/mdb/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_mdb.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/mysql/Messages.sh b/src/migration/mysql/Messages.sh index 4a65b8948..8b3935dd4 100644 --- a/src/migration/mysql/Messages.sh +++ b/src/migration/mysql/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_mysql.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/odb/Messages.sh b/src/migration/odb/Messages.sh index 8be27823e..3d25da7f5 100755 --- a/src/migration/odb/Messages.sh +++ b/src/migration/odb/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_odb.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/postgresql/Messages.sh b/src/migration/postgresql/Messages.sh index 6c85c141a..448a5a6a9 100644 --- a/src/migration/postgresql/Messages.sh +++ b/src/migration/postgresql/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_postgresql.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/spreadsheet/Messages.sh b/src/migration/spreadsheet/Messages.sh index 6dc5a0fe5..ad64ec492 100755 --- a/src/migration/spreadsheet/Messages.sh +++ b/src/migration/spreadsheet/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_spreadsheet.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/sybase/Messages.sh b/src/migration/sybase/Messages.sh index 0dddfd302..74682f0f0 100644 --- a/src/migration/sybase/Messages.sh +++ b/src/migration/sybase/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_sybase.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/tsv/Messages.sh b/src/migration/tsv/Messages.sh index 224cdd2b4..2b6326975 100755 --- a/src/migration/tsv/Messages.sh +++ b/src/migration/tsv/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_tsv.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/migration/xbase/Messages.sh b/src/migration/xbase/Messages.sh index cef17473e..7fcd2112e 100644 --- a/src/migration/xbase/Messages.sh +++ b/src/migration/xbase/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../kexi_xgettext.sh +source ../../../kundo2_aware_xgettext.sh potfile=keximigrate_xbase.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/plugins/forms/widgets/mapbrowser/Messages.sh b/src/plugins/forms/widgets/mapbrowser/Messages.sh index 85c8d0d13..10b3335ef 100755 --- a/src/plugins/forms/widgets/mapbrowser/Messages.sh +++ b/src/plugins/forms/widgets/mapbrowser/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../../../kexi_xgettext.sh +source ../../../../../kundo2_aware_xgettext.sh potfile=kexiforms_mapwidgetplugin.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp diff --git a/src/plugins/forms/widgets/webbrowser/Messages.sh b/src/plugins/forms/widgets/webbrowser/Messages.sh index da67727df..da679f649 100755 --- a/src/plugins/forms/widgets/webbrowser/Messages.sh +++ b/src/plugins/forms/widgets/webbrowser/Messages.sh @@ -1,13 +1,13 @@ #! /bin/sh -source ../../../../../kexi_xgettext.sh +source ../../../../../kundo2_aware_xgettext.sh potfile=kexiforms_webbrowserwidgetplugin.pot find_exclude $potfile # Exclude files containing "#warning noi18n" LIST=`find . \( $EXCLUDE \) -prune -o \( -name \*.h -o -name \*.cpp -o -name \*.cc -o -name \*.hxx -o -name \*.cxx \) -type f -print | sort | while read f ; do \ if ! grep -q '^#warning noi18n ' $f ; then echo $f; fi \ done \ ` -kexi_xgettext $potfile $LIST +kundo2_aware_xgettext $potfile $LIST rm -f rc.cpp