Skip to content

Commit

Permalink
Translate data type categories not too early, but after activating th…
Browse files Browse the repository at this point in the history
…e user-wanted language. Closes #533
  • Loading branch information
ansgarbecker committed Feb 10, 2019
1 parent f72a2b7 commit c9f0073
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions source/main.pas
Expand Up @@ -1595,6 +1595,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
wine_nt_to_unix_file_name: procedure(p1:pointer; p2:pointer); stdcall;
OldSnippetsDir, CurrentSnippetsDir, TargetSnippet: String;
Files: TStringDynArray;
dti: TDBDatatypeCategoryIndex;
begin
caption := APPNAME;

Expand All @@ -1617,6 +1618,11 @@ procedure TMainForm.FormCreate(Sender: TObject);
menuQueryHelpersGenerateUpdate.Caption := f_('Generate %s ...', ['UPDATE']);
menuQueryHelpersGenerateDelete.Caption := f_('Generate %s ...', ['DELETE']);

// Translate data type categories
for dti:=Low(DatatypeCategories) to High(DatatypeCategories) do begin
DatatypeCategories[dti].Name := _(DatatypeCategories[dti].Name);
end;

// Detect version
dwInfoSize := GetFileVersionInfoSize(PChar(Application.ExeName), dwWnd);
GetMem(ptrVerBuf, dwInfoSize);
Expand Down
7 changes: 1 addition & 6 deletions source/mysql_structures.pas
@@ -1,4 +1,4 @@
unit mysql_structures;
unit mysql_structures;

// -------------------------------------
// MySQL Constants, Variables and Types
Expand Down Expand Up @@ -7504,7 +7504,6 @@ TServerVariable = record

);

dti: TDBDatatypeCategoryIndex;


function GetFunctionCategories: TStringList;
Expand Down Expand Up @@ -7644,10 +7643,6 @@ initialization
'151=Cannot add a child row,'+
'152=Cannot delete a parent row');

// Translate data type categories
for dti:=Low(DatatypeCategories) to High(DatatypeCategories) do begin
DatatypeCategories[dti].Name := _(DatatypeCategories[dti].Name);
end;


end.

0 comments on commit c9f0073

Please sign in to comment.