# HG changeset patch # User unc0rr # Date 1241806806 0 # Node ID 3001445b45000065e8230dbd2ec48af5e4ef8c39 # Parent 8dd780e3023fab8f2e7c0cd98cbaf7a11b0d6339 Try to prevent locale problems: - Consider only strings starting from numbers - Fill strings with en locale first diff -r 8dd780e3023f -r 3001445b4500 hedgewars/hwengine.dpr --- a/hedgewars/hwengine.dpr Fri May 08 18:18:39 2009 +0000 +++ b/hedgewars/hwengine.dpr Fri May 08 18:20:06 2009 +0000 @@ -361,6 +361,8 @@ if recordFileName = '' then InitIPC; WriteLnToConsole(msgGettingConfig); +if cLocaleFName <> 'en.txt' then + LoadLocale(Pathz[ptLocale] + '/en.txt'); LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); if recordFileName = '' then diff -r 8dd780e3023f -r 3001445b4500 hedgewars/uLocale.pas --- a/hedgewars/uLocale.pas Fri May 08 18:18:39 2009 +0000 +++ b/hedgewars/uLocale.pas Fri May 08 18:20:06 2009 +0000 @@ -53,7 +53,7 @@ begin readln(f, s); if Length(s) = 0 then continue; - if s[1] = ';' then continue; + if not (s[1] in ['0'..'9']) then continue; TryDo(Length(s) > 6, 'Load locale: empty string', true); val(s[1]+s[2], a, c); TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);