From 24ae4aee33fef450bb241058e50e86b10c0f1f4d Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 17 Sep 2024 10:18:29 -0400 Subject: updatelang: Expand suspicius character tests. * dest: < > * voice: [ ] < > { } Change-Id: I97701e52807db996037b7542fb0b01f9db0dbc0f --- tools/updatelang | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/updatelang b/tools/updatelang index 28f259bdbb..1fb594d596 100755 --- a/tools/updatelang +++ b/tools/updatelang @@ -402,9 +402,9 @@ foreach my $id (@langorder) { my $sane = $lang{$id}{'dest'}{$tgt}; $sane =~ s/^~?(.*)/$1/; # Strip off leading ~ if it's there as it's not a legal character otherwise - if ($sane =~ tr/"~//) { + if ($sane =~ tr/"~<>//) { # If it has suspicious characters that are not allowed - $lang{$id}{'notes'} .= "### The section for '$id:$tgt' has some suspicious characters (eg '~'), please double-check!\n"; + $lang{$id}{'notes'} .= "### The section for '$id:$tgt' has some suspicious characters (eg \",~,<,>), please double-check!\n"; # print "#!! '$id:$tgt' suspicious characters\n"; } } @@ -476,9 +476,9 @@ foreach my $id (@langorder) { } my $sane = $lang{$id}{'voice'}{$tgt}; $sane =~ s/^~?(.*)/$1/; # Strip off leading ~ if it's there as it's not a legal character otherwise - if ($sane =~ tr/%"~://) { + if ($sane =~ tr/%"~:\[\]<>{}//) { # Suspicious characters that are not typically voiced.. - $lang{$id}{'notes'} .= "### The section for '$id:$tgt' has some suspicious characters (eg '%' or '~' or ':'), please correct!\n"; + $lang{$id}{'notes'} .= "### The section for '$id:$tgt' has some suspicious characters (eg %,\",~,:,<,>,[,],{,}), please correct!\n"; # print "#!! '$id:$tgt' suspicious characters\n"; } if ($lang{$id}{'voice'}{$tgt} =~ /\.\.\./) { -- cgit v1.2.3