teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame SOURCES/rpm-4.16.1.3-Support-long-languages-names-for-QT.patch

fa6a06
From 35739c2a2298e61caacb45157706bf342ffcd20e Mon Sep 17 00:00:00 2001
fa6a06
From: Florian Festi <ffesti@redhat.com>
fa6a06
Date: Tue, 27 Apr 2021 10:09:41 +0200
fa6a06
Subject: [PATCH] find-lang.sh: Support long languages names for QT
fa6a06
fa6a06
Most language abbreviations are just two characters but some are longer.
fa6a06
Allow an arbiraty number of character instead of exactly two in the names
fa6a06
of .qm files (QT translations). This brings the handling of .qm files in
fa6a06
line with all other file types.
fa6a06
fa6a06
Resolves: #1642
fa6a06
---
fa6a06
 scripts/find-lang.sh | 14 +++++++-------
fa6a06
 1 file changed, 7 insertions(+), 7 deletions(-)
fa6a06
fa6a06
diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh
fa6a06
index f2aa7d8951..b97210b117 100755
fa6a06
--- a/scripts/find-lang.sh
fa6a06
+++ b/scripts/find-lang.sh
fa6a06
@@ -249,13 +249,13 @@ s:%lang(C) ::
fa6a06
 
fa6a06
 find "$TOP_DIR" -type f -o -type l|sed '
fa6a06
 s:'"$TOP_DIR"'::
fa6a06
-'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
fa6a06
-'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
fa6a06
-'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
fa6a06
-'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
fa6a06
-'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
fa6a06
-'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
fa6a06
-'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\+\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1:
fa6a06
+'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1:
fa6a06
 s:^[^%].*::
fa6a06
 s:%lang(C) ::
fa6a06
 /^$/d' >> $MO_NAME