[Libreoffice-commits] core.git: i18nlangtag/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Thu May 2 12:12:08 UTC 2019


 i18nlangtag/source/isolang/langid.pl |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 85cdb6804cc141a05638494cea7cd59d299eb53e
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Thu May 2 14:10:21 2019 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Thu May 2 14:10:31 2019 +0200

    Comment stuff and @addregex
    
    Change-Id: Ia998176e193a98739b445f245f7cf8e8252f50eb

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


More information about the Libreoffice-commits mailing list