From: Jo-Philipp Wich Date: Fri, 17 Apr 2020 14:11:34 +0000 (+0200) Subject: build: i18n-scan.pl: make ACL descriptions translatable X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0bc29706408c4cf8746917a6e4d4045397adca64;p=oweals%2Fluci.git build: i18n-scan.pl: make ACL descriptions translatable Signed-off-by: Jo-Philipp Wich --- diff --git a/build/i18n-scan.pl b/build/i18n-scan.pl index 879cbe6a9..0374b6d87 100755 --- a/build/i18n-scan.pl +++ b/build/i18n-scan.pl @@ -170,7 +170,7 @@ sub preprocess_json($$) { my ($path, $source) = @_; my ($file) = $path =~ m!([^/]+)$!; - $source =~ s/("(?:title)")\s*:\s*("(?:[^"\\]|\\.)*")/$1: _($2)/sg; + $source =~ s/("(?:title|description)")\s*:\s*("(?:[^"\\]|\\.)*")/$1: _($2)/sg; return ($source); } @@ -181,7 +181,7 @@ my $msguniq_pid = open2($msguniq_out, $msguniq_in, 'msguniq', '-s'); print $msguniq_in "msgid \"\"\nmsgstr \"Content-Type: text/plain; charset=UTF-8\"\n"; -if (open F, "find @ARGV -type f '(' -name '*.htm' -o -name '*.lua' -o -name '*.js' -o -path '*/menu.d/*.json' -o -path '*/statistics/plugins/*.json' ')' |") +if (open F, "find @ARGV -type f '(' -name '*.htm' -o -name '*.lua' -o -name '*.js' -o -path '*/menu.d/*.json' -o -path '*/acl.d/*.json' -o -path '*/statistics/plugins/*.json' ')' |") { while (defined( my $file = readline F)) {