34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
|
Author: Fabian Vogt <fvogt@suse.com>
|
||
|
Subject: Handle special cases of qt translations correctly
|
||
|
References: boo#1027925
|
||
|
|
||
|
Some KDE frameworks write their translations to files like this:
|
||
|
/usr/share/locale/ca/LC_MESSAGES/libkirigami2plugin_qt.qm
|
||
|
|
||
|
Without this patch it gets detected as %lang(qt), which is obviously
|
||
|
incorrect. This copies two lines from the .mo handling and adjusts
|
||
|
them to handle _qt.qm files as well. "qt" is not an official ISO language
|
||
|
code, so this should not break anything in the past or hopefully the future.
|
||
|
|
||
|
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
||
|
---
|
||
|
scripts/find-lang.sh | 6 ++++--
|
||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
||
|
--- scripts/find-lang.sh.orig
|
||
|
+++ scripts/find-lang.sh
|
||
|
@@ -303,9 +303,11 @@ s:%lang(C) ::
|
||
|
|
||
|
find "$TOP_DIR" -type f -o -type l|sed '
|
||
|
s:'"$TOP_DIR"'::
|
||
|
-'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
|
||
|
+'"$ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\([^/]\+_qt\.qm$\):%lang(\2) \1\2\3\4:
|
||
|
+'"$NO_ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\('"$NAME"'_qt\.qm$\):%lang(\2) \1\2\3\4:
|
||
|
+'"$NO_ALL_NAME$QT"'s:^\([^%].*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
|
||
|
'"$ALL_NAME$QT"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
|
||
|
-'"$ALL_NAME$QT"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
|
||
|
+'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
|
||
|
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
|
||
|
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
|
||
|
s:^[^%].*::
|