--- a/hedgewars/uLocale.pas Thu Oct 25 17:02:56 2018 +0300
+++ b/hedgewars/uLocale.pas Thu Oct 25 16:44:00 2018 +0200
@@ -159,14 +159,14 @@
8: curArg:= arg9;
end;
+ repeat
p:= Pos('%'+IntToStr(i+1), tempstr);
- if (p = 0) then
- break
- else
+ if (p <> 0) then
begin
delete(tempstr, p, 2);
insert(curArg, tempstr, p);
end;
+ until (p = 0);
end;
Format:= tempstr;
end;
@@ -191,14 +191,14 @@
8: curArg:= arg9;
end;
+ repeat
p:= Pos('%'+IntToStr(i+1), tempstr);
- if (p = 0) then
- break
- else
+ if (p <> 0) then
begin
delete(tempstr, p, 2);
insert(curArg, tempstr, p);
end;
+ until (p = 0);
end;
FormatA:= tempstr;
end;
--- a/tools/check_engine_locale_files.sh Thu Oct 25 17:02:56 2018 +0300
+++ b/tools/check_engine_locale_files.sh Thu Oct 25 16:44:00 2018 +0200
@@ -88,18 +88,6 @@
MISSING_STRINGS=0;
HAS_PROBLEMS=0;
- # Find duplicate placeholders
- for i in 0 1 2 3 4 5 6 7 8 9
- do
- grep -G "%$i.*%$i" $CHECKED_LANG_FILE > $TEMP_CHECK;
- if [ -s $TEMP_CHECK ]
- then
- echo "ERROR! Duplicate placeholders found:";
- cat $TEMP_CHECK;
- HAS_PROBLEMS=1;
- fi
- done;
-
if [ $CHECKED_LANG_FILE != en.txt ]
then
grep -o "^[0-9][0-9]:[0-9][0-9]=" $CHECKED_LANG_FILE | cut -c1-5 | sort | uniq > $TEMP_SYMBOLS;