Translate data type categories not too early, but after activating the user-wanted language. Closes #533

This commit is contained in:
Ansgar Becker
2019-02-10 12:49:14 +01:00
parent f72a2b70c2
commit c9f00734df
2 changed files with 7 additions and 6 deletions

View File

@@ -1595,6 +1595,7 @@ var
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 @@ begin
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);

View File

@@ -1,4 +1,4 @@
unit mysql_structures;
unit mysql_structures;
// -------------------------------------
// MySQL Constants, Variables and Types
@@ -7504,7 +7504,6 @@ var
);
dti: TDBDatatypeCategoryIndex;
function GetFunctionCategories: TStringList;
@@ -7644,10 +7643,6 @@ MySQLErrorCodes := Explode(',', '0=No error,'+
'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.