hedgewars/uLocale.pas
changeset 6453 11c578d30bd3
parent 4976 088d40d8aba2
child 6528 fb2918089225
equal deleted inserted replaced
6452:7c6f9b6672dc 6453:11c578d30bd3
    56    begin
    56    begin
    57    while not eof(f) do
    57    while not eof(f) do
    58        begin
    58        begin
    59        readln(f, s);
    59        readln(f, s);
    60        if Length(s) = 0 then continue;
    60        if Length(s) = 0 then continue;
    61        if not (s[1] in ['0'..'9']) then continue;
    61        if (s[1] < '0') or (s[1] > '9') then continue;
    62        TryDo(Length(s) > 6, 'Load locale: empty string', true);
    62        TryDo(Length(s) > 6, 'Load locale: empty string', true);
    63        val(s[1]+s[2], a, c);
    63        val(s[1]+s[2], a, c);
    64        TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);
    64        TryDo(c = 0, 'Load locale: numbers should be two-digit: ' + s, true);
    65        TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    65        TryDo(s[3] = ':', 'Load locale: ":" expected', true);
    66        val(s[4]+s[5], b, c);
    66        val(s[4]+s[5], b, c);