hedgewars/uLocale.pas
branchwebgl
changeset 8850 ae8a957c69fd
parent 8444 75db7bb8dce8
child 9127 e350500c4edb
equal deleted inserted replaced
8847:ff7fbab7cd56 8850:ae8a957c69fd
    60         if Length(s) = 0 then
    60         if Length(s) = 0 then
    61             continue;
    61             continue;
    62         if (s[1] < '0') or (s[1] > '9') then
    62         if (s[1] < '0') or (s[1] > '9') then
    63             continue;
    63             continue;
    64         TryDo(Length(s) > 6, 'Load locale: empty string', true);
    64         TryDo(Length(s) > 6, 'Load locale: empty string', true);
    65         val(s[1]+s[2], a, c);
    65         val(s[1]+s[2], a{$IFNDEF PAS2C}, c{$ENDIF});
    66         TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);
    66         TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);
    67         TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    67         TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    68         val(s[4]+s[5], b, c);
    68         val(s[4]+s[5], b{$IFNDEF PAS2C}, c{$ENDIF});
    69         TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true);
    69         TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true);
    70         TryDo(s[6] = '=', 'Load locale: "=" expected', true);
    70         TryDo(s[6] = '=', 'Load locale: "=" expected', true);
    71         Delete(s, 1, 6);
    71         Delete(s, 1, 6);
    72         case a of
    72         case a of
    73             0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then
    73             0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then