Skip to content

Commit

Permalink
Added internationalization using po files. Already English, Russian, …
Browse files Browse the repository at this point in the history
…French, German, Dutch, Spanish, Portuguese, Polish, Indonesian, Greek, Esperanto, Hebrew and Arabic languages. (18)
  • Loading branch information
fredvs committed Feb 16, 2022
1 parent d0091a6 commit dfb2dce
Show file tree
Hide file tree
Showing 13 changed files with 9,143 additions and 1,614 deletions.
12 changes: 6 additions & 6 deletions src/filelistform.mfm
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ object filelistfo: tfilelistfo
face.template = mainfo.tfaceplayerlight
taborder = 4
hint = 'Number of files in the list'
bounds_x = 184
bounds_x = 210
bounds_y = 102
bounds_cx = 69
bounds_cx = 43
bounds_cy = 24
anchors = [an_left, an_bottom]
textflags = [tf_xcentered, tf_ycentered]
value = '0 files'
value = '1000'
reffontheight = 15
end
object tbutton11: tbutton
Expand Down Expand Up @@ -942,7 +942,7 @@ object filelistfo: tfilelistfo
hint = 'History of Directories'
bounds_x = 27
bounds_y = 102
bounds_cx = 156
bounds_cx = 182
bounds_cy = 24
anchors = [an_left, an_right, an_bottom]
statfile = mainfo.tstatfile1
Expand Down Expand Up @@ -1060,8 +1060,8 @@ object filelistfo: tfilelistfo
face.template = mainfo.tfaceorange
taborder = 6
visible = False
bounds_x = 2
bounds_y = 97
bounds_x = 4
bounds_y = 33
bounds_cx = 431
bounds_cy = 32
anchors = [an_left, an_bottom]
Expand Down
26 changes: 14 additions & 12 deletions src/filelistform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,11 @@ procedure tfilelistfo.onchangpath(const Sender: TObject; findex: integer);
end;

edfilescount.Value := list_files.rowcount;
if edfilescount.Value > 1 then
filescount.Value := msestring(IntToStr(edfilescount.Value) + ' files')
else
filescount.Value := msestring(IntToStr(edfilescount.Value) + ' file');
// if edfilescount.Value > 1 then
filescount.Value := msestring(IntToStr(edfilescount.Value));
// lang_filelistfo[Ord(fi_filelistfodragdock)]);
// else
// filescount.Value := msestring(IntToStr(edfilescount.Value) + ' file');

finally
datalist_files.Free;
Expand Down Expand Up @@ -723,16 +724,16 @@ procedure tfilelistfo.onbefdrop(const Sender: TObject);

procedure tfilelistfo.onaftdrop(const Sender: TObject);
begin
historyfn.Width := 156;
historyfn.Width := 182;
historyfn.Value := tosysfilepath(extractfilepath(historyfn.Value));
end;

procedure tfilelistfo.onchangecount(const Sender: TObject);
begin
if edfilescount.Value > 1 then
filescount.Value := msestring(IntToStr(edfilescount.Value) + ' files')
else
filescount.Value := msestring(IntToStr(edfilescount.Value) + ' file');
// if edfilescount.Value > 1 then
filescount.Value := intToStr(edfilescount.Value) ;
// else
// filescount.Value := msestring(IntToStr(edfilescount.Value) + ' file');
end;

procedure tfilelistfo.ondestr(const Sender: TObject);
Expand Down Expand Up @@ -820,7 +821,7 @@ procedure tfilelistfo.addfile(const Sender: TObject);
thestrnum, thestrx, thestrext, thestrfract: msestring;
begin

tfiledialog1.controller.captionopen := 'Open Audio File';
tfiledialog1.controller.captionopen := lang_filelistfo[Ord(fi_filelistfo)];

tfiledialog1.controller.fontcolor := cl_black;
if mainfo.typecolor.Value = 2 then
Expand Down Expand Up @@ -957,7 +958,8 @@ procedure tfilelistfo.opendir(const Sender: TObject);
x: integer;
ara, arb: msestringarty;
begin
tfiledialog1.controller.captiondir := 'Open Audio Directory';
tfiledialog1.controller.captiondir :=
lang_filelistfo[Ord(fi_tbutton6_hint)];
tfiledialog1.controller.nopanel := False;
tfiledialog1.controller.compact := False;

Expand All @@ -970,7 +972,7 @@ procedure tfilelistfo.opendir(const Sender: TObject);
setlength(ara, 6);
setlength(arb, 6);

ara[0] := 'All Audio';
ara[0] := lang_mainfo[Ord(ma_tmainmenu1_parentitem_showall)]; {'Show All'}
ara[1] := 'Mp3"';
ara[2] := 'Wav';
ara[3] := 'Ogg';
Expand Down
2,518 changes: 1,259 additions & 1,259 deletions src/filelistform_mfm.pas

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/findmessage.mfm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ object findmessagefo: tfindmessagefo
taborder = 2
bounds_x = 6
bounds_y = 32
bounds_cx = 218
bounds_cx = 190
bounds_cy = 22
anchors = [an_left, an_top, an_right]
statfile = mainfo.tstatfile1
Expand All @@ -158,9 +158,9 @@ object findmessagefo: tfindmessagefo
2
)
taborder = 3
bounds_x = 242
bounds_y = 32
bounds_cx = 102
bounds_x = 207
bounds_y = 34
bounds_cx = 104
bounds_cy = 17
anchors = [an_top, an_right]
statfile = mainfo.tstatfile1
Expand Down
6 changes: 3 additions & 3 deletions src/findmessage_mfm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ implementation
0,17,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,49,11,
0,0,0,8,116,97,98,111,114,100,101,114,2,2,8,98,111,117,110,100,
115,95,120,2,6,8,98,111,117,110,100,115,95,121,2,32,9,98,111,117,
110,100,115,95,99,120,3,218,0,9,98,111,117,110,100,115,95,99,121,2,
110,100,115,95,99,120,3,190,0,9,98,111,117,110,100,115,95,99,121,2,
22,7,97,110,99,104,111,114,115,11,7,97,110,95,108,101,102,116,6,97,
110,95,116,111,112,8,97,110,95,114,105,103,104,116,0,8,115,116,97,116,
102,105,108,101,7,17,109,97,105,110,102,111,46,116,115,116,97,116,102,105,
Expand All @@ -205,8 +205,8 @@ implementation
115,11,0,17,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,
49,11,0,16,102,114,97,109,101,46,111,117,116,101,114,102,114,97,109,101,
1,2,0,2,2,2,89,2,2,0,8,116,97,98,111,114,100,101,114,2,
3,8,98,111,117,110,100,115,95,120,3,242,0,8,98,111,117,110,100,115,
95,121,2,32,9,98,111,117,110,100,115,95,99,120,2,102,9,98,111,117,
3,8,98,111,117,110,100,115,95,120,3,207,0,8,98,111,117,110,100,115,
95,121,2,34,9,98,111,117,110,100,115,95,99,120,2,104,9,98,111,117,
110,100,115,95,99,121,2,17,7,97,110,99,104,111,114,115,11,6,97,110,
95,116,111,112,8,97,110,95,114,105,103,104,116,0,8,115,116,97,116,102,
105,108,101,7,17,109,97,105,110,102,111,46,116,115,116,97,116,102,105,108,
Expand Down
12 changes: 12 additions & 0 deletions src/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ tmainfo = class(tmainform)
implementation

uses
findmessage,
infos,
conflang,
config,
Expand Down Expand Up @@ -619,6 +620,17 @@ procedure tmainfo.setlangstrumpract(thelang: string);

end;

with findmessagefo do
begin
tbutton3.caption := lang_stockcaption[Ord(sc_close)];
end;

with statusfo do
begin
ok.caption := lang_stockcaption[Ord(sc_close)];
cancel.caption := lang_stockcaption[Ord(sc_cancel)];
end;

with infosfo do
begin
caption := lang_commanderfo[Ord(co_nameplayers_hint)] + ' ' +
Expand Down
Loading

0 comments on commit dfb2dce

Please sign in to comment.