Permalink
Browse files

Translate data type categories not too early, but after activating th…

…e user-wanted language. Closes #533
  • Loading branch information...
ansgarbecker committed Feb 10, 2019
1 parent f72a2b7 commit c9f00734dfc352df59cf2e26897c7547cbfe1070
Showing with 7 additions and 6 deletions.
  1. +6 −0 source/main.pas
  2. +1 −6 source/mysql_structures.pas
@@ -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;

@@ -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);
@@ -1,4 +1,4 @@
unit mysql_structures;
unit mysql_structures;

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

);

dti: TDBDatatypeCategoryIndex;


function GetFunctionCategories: TStringList;
@@ -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.