summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2019-05-02 14:10:21 +0200
committerEike Rathke <erack@redhat.com>2019-05-02 14:10:31 +0200
commit85cdb6804cc141a05638494cea7cd59d299eb53e (patch)
tree8e913611bb4aedaf5566f449df1da7d520fa9227 /i18nlangtag
parent48c558a7c7ce94ff22e9f8e4181f98617ec5c6c3 (diff)
Comment stuff and @addregex
Change-Id: Ia998176e193a98739b445f245f7cf8e8252f50eb
Diffstat (limited to 'i18nlangtag')
-rwxr-xr-xi18nlangtag/source/isolang/langid.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/i18nlangtag/source/isolang/langid.pl b/i18nlangtag/source/isolang/langid.pl
index dd89a2860911..65333956ab20 100755
--- a/i18nlangtag/source/isolang/langid.pl
+++ b/i18nlangtag/source/isolang/langid.pl
@@ -85,6 +85,10 @@ sub makeLangID($$)
}
+# Note that a regex needs a duplicated pair of backslashes to produce a literal
+# \\ like in \\\\* to search for zero or more \ backslashes.
+# @addregex can be an optional "block to grep" definition
+# (regex-to-start-block, regex-to-end-block, regex-to-find-in-block)
sub grepFile($$$$$@)
{
my( $regex, $path, $module, $name, $printmsg, @addregex) = @_;
@@ -447,7 +451,7 @@ sub main()
grepFile(
'^\s*completelangiso\s*=\s*(\s*([a-z]{2,3})(-[A-Z][A-Z])?)*' . $langtag . '',
"$SRC_ROOT", "solenv", "inc/langlist.mk", 1,
- # needs a duplicated pair of backslashes to produce a literal \\
+ # Also grep the list of tags, one per line, \ backslash continued.
('^\s*completelangiso\s*=', '^\s*$', '^\s*' . $langtag . '\s*\\\\*$'));
# af 1252 1078 # Afrikaans