mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2026-05-07 09:04:08 +00:00
refactor: change ui translation mechanism
This commit is contained in:
@@ -30,5 +30,5 @@ add_custom_target(aw_pofiles ALL DEPENDS ${_gmoFiles})
|
||||
|
||||
add_custom_target(
|
||||
translations
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/extract_messages.sh
|
||||
COMMAND env CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/extract_messages.sh
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+470
-258
File diff suppressed because it is too large
Load Diff
+589
-394
File diff suppressed because it is too large
Load Diff
@@ -11,15 +11,17 @@ SCRIPTDIR="$(dirname -- $(readlink -f -- $0))"
|
||||
BASEDIR="$SCRIPTDIR/../"
|
||||
WORKDIR="$(pwd)"
|
||||
|
||||
find "$BASEDIR" \
|
||||
-name '*.cpp' -o -name '*.h' -o -name '*.qml' -o -name '*.ui' -o -name '*.rc' | \
|
||||
sort > "$WORKDIR/infiles.list"
|
||||
find "$BASEDIR" -name '*.cpp' -o -name '*.h' -o -name '*.qml' | sort > "$WORKDIR/infiles.list"
|
||||
if [ -n "$CMAKE_BINARY_DIR" ]; then
|
||||
find "$CMAKE_BINARY_DIR" -name '*.cpp' -o -name '*.h' -o -name '*.qml' | sort >> "$WORKDIR/infiles.list";
|
||||
fi
|
||||
|
||||
xgettext \
|
||||
--from-code=UTF-8 --width=200 --add-location=file \
|
||||
--files-from="$WORKDIR/infiles.list" \
|
||||
-C -kde \
|
||||
-C --kde \
|
||||
-ci18n \
|
||||
-kui_i18n:1 \
|
||||
-ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 \
|
||||
-kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
|
||||
-kxi18n:1 -kxi18nc:1c,2 -kxi18np:1,2 -kxi18ncp:1c,2,3 \
|
||||
@@ -27,15 +29,14 @@ xgettext \
|
||||
-kI18N_NOOP:1 -kI18NC_NOOP:1c,2 \
|
||||
-kI18N_NOOP2:1c,2 -kI18N_NOOP2_NOSTRIP:1c,2 \
|
||||
-ktr2i18n:1 -ktr2xi18n:1 \
|
||||
-kN_:1 \
|
||||
-kaliasLocale \
|
||||
--package-name="$PROJECT" \
|
||||
--msgid-bugs-address="$BUGADDR" \
|
||||
-D "$BASEDIR" \
|
||||
-D "$WORKDIR" \
|
||||
-o "$PROJECT.pot.new"
|
||||
-o "$SCRIPTDIR/$PROJECT.pot.new"
|
||||
|
||||
mv "${PROJECT}.pot"{.new,}
|
||||
mv "$SCRIPTDIR/$PROJECT.pot"{.new,}
|
||||
|
||||
for TR in $(find "$BASEDIR" -name '*.po'); do
|
||||
msgmerge \
|
||||
@@ -43,7 +44,7 @@ for TR in $(find "$BASEDIR" -name '*.po'); do
|
||||
--quiet \
|
||||
--backup=off \
|
||||
"$TR" \
|
||||
"$WORKDIR/$PROJECT.pot"
|
||||
"$SCRIPTDIR/$PROJECT.pot"
|
||||
msgattrib \
|
||||
--no-obsolete \
|
||||
--output-file "$TR" \
|
||||
|
||||
+482
-301
File diff suppressed because it is too large
Load Diff
+466
-271
File diff suppressed because it is too large
Load Diff
+590
-383
File diff suppressed because it is too large
Load Diff
+465
-256
File diff suppressed because it is too large
Load Diff
+589
-394
File diff suppressed because it is too large
Load Diff
+589
-400
File diff suppressed because it is too large
Load Diff
+474
-294
File diff suppressed because it is too large
Load Diff
+590
-377
File diff suppressed because it is too large
Load Diff
+464
-253
File diff suppressed because it is too large
Load Diff
+589
-393
File diff suppressed because it is too large
Load Diff
+589
-400
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user