From 9d8b4cd83ae5141dfd5636cb0290d9b670cecb38 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 28 Nov 2012 23:27:31 +0000 Subject: [PATCH] Make more inline strings translatable. --- out/locale/en/LC_MESSAGES/default.po | 258 +++++++++++++++++++-------- source/copytable.dfm | 4 +- source/copytable.pas | 2 +- source/dbconnection.pas | 20 +-- source/grideditlinks.pas | 10 +- source/helpers.pas | 4 +- source/main.pas | 22 +-- source/searchreplace.pas | 4 +- source/syncdb.pas | 2 +- source/table_editor.pas | 4 +- source/tabletools.pas | 26 +-- source/usermanager.pas | 6 +- 12 files changed, 239 insertions(+), 123 deletions(-) diff --git a/out/locale/en/LC_MESSAGES/default.po b/out/locale/en/LC_MESSAGES/default.po index 7dce37e7..5ce735e5 100644 --- a/out/locale/en/LC_MESSAGES/default.po +++ b/out/locale/en/LC_MESSAGES/default.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: HeidiSQL\n" "POT-Creation-Date: 2012-11-05 21:40\n" -"PO-Revision-Date: 2012-11-28 06:52+0100\n" +"PO-Revision-Date: 2012-11-29 00:24+0100\n" "Last-Translator: Ansgar Becker \n" "Language-Team: English (http://www.transifex.com/projects/p/heidisql/" "language/en/)\n" @@ -456,8 +456,8 @@ msgstr "Copy Table..." #. CopyTableForm..lblNewTablename..Caption #: copytable.dfm:32 -msgid "Copy .. to new db.table:" -msgstr "Copy .. to new db.table:" +msgid "Copy \"%s\" to new db.table:" +msgstr "Copy \"%s\" to new db.table:" #. CopyTableForm..lblItems..Caption #: copytable.dfm:39 @@ -850,11 +850,6 @@ msgid "" msgstr "" "Column values (Hint: Assign \"%filecontent%\" value to a BLOB or TEXT column)" -#. frmInsertFiles..grpSelectObject..ListColumns......WideText -#: insertfiles.dfm:129 -msgid "Column" -msgstr "Column" - #. frmInsertFiles..grpSelectObject..ListColumns......WideText #. frmRoutineEditor..PageControlMain..tabParameters..listParameters......WideText #. frmTableEditor..listColumns......WideText @@ -1227,37 +1222,6 @@ msgstr "Items" msgid "Last modification" msgstr "Last modification" -#. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText -#. MainForm..ActionList1..actFlushTables..Caption -#: main.dfm:667 main.dfm:2204 -msgid "Tables" -msgstr "Tables" - -#. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText -#: main.dfm:671 -msgid "Views" -msgstr "Views" - -#. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText -#: main.dfm:675 -msgid "Functions" -msgstr "Functions" - -#. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText -#: main.dfm:679 -msgid "Procedures" -msgstr "Procedures" - -#. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText -#: main.dfm:683 -msgid "Triggers" -msgstr "Triggers" - -#. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText -#: main.dfm:687 -msgid "Events" -msgstr "Events" - #. MainForm..panelTop..pnlRight..PageControlMain..tabHost..PageControlHost..tabDatabases..ListDatabases......WideText #: main.dfm:692 msgid "Default collation" @@ -1447,12 +1411,6 @@ msgstr "Create options" msgid "Type" msgstr "Type" -#. MainForm..panelTop..pnlRight..PageControlMain..tabEditor..Caption -#. MainForm..ActionList1..actCreateTable..Caption -#: main.dfm:1210 main.dfm:2121 -msgid "Table" -msgstr "Table" - #. MainForm..panelTop..pnlRight..PageControlMain..tabData..lblSorryNoData..Caption #: main.dfm:1223 msgid "No data available for this item." @@ -1463,12 +1421,6 @@ msgstr "No data available for this item." msgid "Sorting" msgstr "Sorting" -#. MainForm..panelTop..pnlRight..PageControlMain..tabData..pnlDataTop..tlbDataButtons..tbtnDataColumns..Caption -#. frmTableEditor..PageControlMain..tabForeignKeys..pnlNoForeignKeys..listForeignKeys......WideText -#: main.dfm:1298 table_editor.dfm:587 copytable.pas:254 -msgid "Columns" -msgstr "Columns" - #. MainForm..panelTop..pnlRight..PageControlMain..tabData..pnlDataTop..tlbDataButtons..tbtnDataFilter..Caption #. frmSQLhelp..pnlMain..pnlLeft..editFilter..TextHint #: main.dfm:1307 sqlhelp.dfm:93 @@ -1848,11 +1800,6 @@ msgstr "Drop ..." msgid "Deletes tables, views, procedures and functions" msgstr "Deletes tables, views, procedures and functions" -#. MainForm..ActionList1..actCreateView..Caption -#: main.dfm:2053 -msgid "View" -msgstr "View" - #. MainForm..ActionList1..actCreateView..Hint #: main.dfm:2055 msgid "Create view ..." @@ -2174,11 +2121,6 @@ msgstr "Activates the filter panel" msgid "Bulk table editor" msgstr "Bulk table editor" -#. MainForm..ActionList1..actCreateTrigger..Caption -#: main.dfm:2446 -msgid "Trigger" -msgstr "Trigger" - #. MainForm..ActionList1..actCreateTrigger..Hint #: main.dfm:2447 msgid "Create a trigger" @@ -2234,11 +2176,6 @@ msgstr "Show all rows" msgid "Run routine(s) ..." msgstr "Run routine(s) ..." -#. MainForm..ActionList1..actCreateEvent..Caption -#: main.dfm:2509 -msgid "Event" -msgstr "Event" - #. MainForm..ActionList1..actCreateEvent..Hint #: main.dfm:2511 msgid "Create new event in selected database" @@ -3421,11 +3358,6 @@ msgstr "Change table engine:" msgid "Convert to charset:" msgstr "Convert to charset:" -#. frmTableTools..btnExecute..Caption -#: tabletools.dfm:534 -msgid "Execute" -msgstr "Execute" - #. frmTableTools..btnSeeResults..Caption #: tabletools.dfm:544 msgid "See results" @@ -5290,3 +5222,187 @@ msgstr "Unhandled privilege object: %s" #: usermanager.pas:1297 msgid "Delete user %s@%s?" msgstr "Delete user %s@%s?" + +#. dbconnection.pas +msgid "experimental" +msgstr "experimental" + +#. dbconnection.pas +msgid "Yes" +msgstr "Yes" + +#. dbconnection.pas +msgid "No" +msgstr "No" + +#. dbconnection.pas +msgid "Connected" +msgstr "Connected" + +#. dbconnection.pas +msgid "Threads" +msgstr "Threads" + +#. dbconnection.pas +msgid "Open tables" +msgstr "Open tables" + +#. dbconnection.pas +msgid "Slow queries" +msgstr "Slow queries" + +#. dbconnection.pas +msgid "Queries per second avg" +msgstr "Queries per second avg" + +#. searchreplace.pas +msgid "Replace" +msgstr "Replace" + +#. searchreplace.pas +msgid "Find" +msgstr "Find" + +#. dbconnection.pas +msgid "Table" +msgstr "Table" + +#. dbconnection.pas +msgid "Tables" +msgstr "Tables" + +#. dbconnection.pas +msgid "table" +msgstr "table" + +#. dbconnection.pas +msgid "tables" +msgstr "tables" + +#. dbconnection.pas +msgid "View" +msgstr "View" + +#. dbconnection.pas +msgid "Views" +msgstr "Views" + +#. dbconnection.pas +msgid "view" +msgstr "view" + +#. dbconnection.pas +msgid "views" +msgstr "views" + +#. dbconnection.pas +msgid "Function" +msgstr "Function" + +#. dbconnection.pas +msgid "Functions" +msgstr "Functions" + +#. dbconnection.pas +msgid "function" +msgstr "function" + +#. dbconnection.pas +msgid "functions" +msgstr "functions" + +#. dbconnection.pas +msgid "Procedure" +msgstr "Procedure" + +#. dbconnection.pas +msgid "Procedures" +msgstr "Procedures" + +#. dbconnection.pas +msgid "procedure" +msgstr "procedure" + +#. dbconnection.pas +msgid "procedures" +msgstr "procedures" + +#. dbconnection.pas +msgid "Trigger" +msgstr "Trigger" + +#. dbconnection.pas +msgid "Triggers" +msgstr "Triggers" + +#. dbconnection.pas +msgid "trigger" +msgstr "trigger" + +#. dbconnection.pas +msgid "triggers" +msgstr "triggers" + +#. dbconnection.pas +msgid "Event" +msgstr "Event" + +#. dbconnection.pas +msgid "Events" +msgstr "Events" + +#. dbconnection.pas +msgid "event" +msgstr "event" + +#. dbconnection.pas +msgid "events" +msgstr "events" + +#. dbconnection.pas +msgid "column" +msgstr "column" + +#. dbconnection.pas +msgid "columns" +msgstr "columns" + +#. dbconnection.pas +msgid "Column" +msgstr "Column" + +#. dbconnection.pas +msgid "Columns" +msgstr "Columns" + +#. helpers.pas +msgid "UnknownTable" +msgstr "UnknownTable" + +#. tabletools.pas +msgid "Execute" +msgstr "Execute" + +#. tabletools.pas +msgid "Export" +msgstr "Export" + +#. tabletools.pas +msgid "Update" +msgstr "Update" + +#. tabletools.pas +msgid "Directory" +msgstr "Directory" + +#. usermanager.pas +msgid "Unnamed" +msgstr "Unnamed" + +#. main.pas +msgid "Snippets" +msgstr "Snippets" + +#. table_editor.pas +msgid "Index" +msgstr "Index" diff --git a/source/copytable.dfm b/source/copytable.dfm index 6014ea2a..1747274c 100644 --- a/source/copytable.dfm +++ b/source/copytable.dfm @@ -27,9 +27,9 @@ object CopyTableForm: TCopyTableForm object lblNewTablename: TLabel Left = 8 Top = 8 - Width = 119 + Width = 135 Height = 13 - Caption = 'Copy .. to new db.table:' + Caption = 'Copy "%s" to new db.table:' end object lblItems: TLabel Left = 8 diff --git a/source/copytable.pas b/source/copytable.pas index afe6b450..2386b3a9 100644 --- a/source/copytable.pas +++ b/source/copytable.pas @@ -118,7 +118,7 @@ begin FDBObj := Obj^; editNewTablename.Text := FDBObj.Name + '_copy'; editNewTablename.SetFocus; - lblNewTablename.Caption := 'Copy ''' + FDBObj.Name + ''' to new db.table:'; + lblNewTablename.Caption := f_('Copy "%s" to new db.table:', [FDBObj.Name]); editNewTablename.SetFocus; // Select TargetDatabase diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 00a398cb..8d654835 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -791,15 +791,15 @@ begin ntMySQL_SSHtunnel: Result := My+' (SSH tunnel)'; ntMSSQL_NamedPipe: - Result := 'Microsoft SQL Server (named pipe, experimental)'; + Result := 'Microsoft SQL Server (named pipe, '+_('experimental')+')'; ntMSSQL_TCPIP: - Result := 'Microsoft SQL Server (TCP/IP, experimental)'; + Result := 'Microsoft SQL Server (TCP/IP, '+_('experimental')+')'; ntMSSQL_SPX: - Result := 'Microsoft SQL Server (SPX/IPX, experimental)'; + Result := 'Microsoft SQL Server (SPX/IPX, '+_('experimental')+')'; ntMSSQL_VINES: - Result := 'Microsoft SQL Server (Banyan VINES, experimental)'; + Result := 'Microsoft SQL Server (Banyan VINES, '+_('experimental')+')'; ntMSSQL_RPC: - Result := 'Microsoft SQL Server (Windows RPC, experimental)'; + Result := 'Microsoft SQL Server (Windows RPC, '+_('experimental')+')'; end else case NetType of ntMySQL_TCPIP, ntMySQL_NamedPipe, ntMySQL_SSHtunnel: Result := My; @@ -1926,7 +1926,7 @@ begin Msg := rx.Match[1]; rx.Free; end else - Msg := 'unknown'; + Msg := _('unknown'); Result := Format(MsgSQLError, [LastErrorCode, Msg]); end; @@ -3056,15 +3056,15 @@ var function EvalBool(B: Boolean): String; begin - if B then Result := 'Yes' else Result := 'No'; + if B then Result := _('Yes') else Result := _('No'); end; begin Log(lcDebug, 'Get connection details ...'); Result := TStringList.Create; if Assigned(Parameters) then - Result.Values['Hostname'] := Parameters.Hostname; + Result.Values[_('Host')] := Parameters.Hostname; Ping(False); - Result.Values['Connected'] := EvalBool(FActive); + Result.Values[_('Connected')] := EvalBool(FActive); if FActive then begin Result.Values[_('Real Hostname')] := FRealHostname; Result.Values[_('Server OS')] := ServerOS; @@ -3088,7 +3088,7 @@ begin Val := FormatTimeNumber(StrToIntDef(Val, 0), True) else Val := FormatNumber(Val); - Result.Values[rx.Match[1]] := Val; + Result.Values[_(rx.Match[1])] := Val; if not rx.ExecNext then break; end; diff --git a/source/grideditlinks.pas b/source/grideditlinks.pas index 9bf532cb..990294a5 100644 --- a/source/grideditlinks.pas +++ b/source/grideditlinks.pas @@ -895,12 +895,12 @@ begin FBtnOk := TButton.Create(FPanel); FBtnOk.Parent := FPanel; - FBtnOk.Caption := 'OK'; + FBtnOk.Caption := _('OK'); FBtnOk.OnClick := DoEndEdit; FBtnCancel := TButton.Create(FPanel); FBtnCancel.Parent := FPanel; - FBtnCancel.Caption := 'Cancel'; + FBtnCancel.Caption := _('Cancel'); FBtnCancel.OnClick := DoCancelEdit; end; @@ -1162,7 +1162,7 @@ begin FRadioText.Width := FRadioText.Parent.Width - 2 * FRadioText.Left; FRadioText.OnClick := RadioClick; FRadioText.OnKeyDown := DoKeyDown; - FRadioText.Caption := 'Custom:'; + FRadioText.Caption := _('Custom')+':'; FMemoText := TMemo.Create(FPanel); FMemoText.Parent := FPanel; @@ -1216,7 +1216,7 @@ begin FBtnOk.Left := FPanel.Width - 2*m - 2*FBtnOk.Width; FBtnOk.OnClick := DoEndEdit; FBtnOk.Default := True; - FBtnOk.Caption := 'OK'; + FBtnOk.Caption := _('OK'); FBtnCancel := TButton.Create(FPanel); FBtnCancel.Parent := FPanel; @@ -1225,7 +1225,7 @@ begin FBtnCancel.Left := FBtnOk.Left + FBtnOk.Width + m; FBtnCancel.OnClick := DoCancelEdit; FBtnCancel.Cancel := True; - FBtnCancel.Caption := 'Cancel'; + FBtnCancel.Caption := _('Cancel'); FPanel.Height := FBtnOk.Top + FBtnOk.Height + m; FRadioNothing.Anchors := [akLeft, akTop, akRight]; diff --git a/source/helpers.pas b/source/helpers.pas index 9fbda203..ba67a278 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -494,7 +494,7 @@ begin try Result := Data.TableName; except - Result := 'UnknownTable'; + Result := _('UnknownTable'); end; end; @@ -1959,7 +1959,7 @@ begin // Ask for saving modifications Result := mrOk; if Modified then begin - ObjType := LowerCase(DBObject.ObjType); + ObjType := _(LowerCase(DBObject.ObjType)); if DBObject.Name <> '' then Msg := f_('Save modified %s "%s"?', [ObjType, DBObject.Name]) else diff --git a/source/main.pas b/source/main.pas index 21d2259c..12a889c6 100644 --- a/source/main.pas +++ b/source/main.pas @@ -3630,7 +3630,7 @@ begin // Snippets SetSnippetFilenames; snippetsfolder := TMenuItem.Create( popupQueryLoad ); - snippetsfolder.Caption := 'Snippets'; + snippetsfolder.Caption := _('Snippets'); popupQueryLoad.Items.Add(snippetsfolder); for i:=0 to FSnippetFilenames.Count-1 do begin menuitem := TMenuItem.Create( snippetsfolder ); @@ -4852,7 +4852,7 @@ var var DisplayText: String; begin - DisplayText := Format(SYNCOMPLETION_PATTERN, [Obj.ImageIndex, LowerCase(Obj.ObjType), Obj.Name]); + DisplayText := Format(SYNCOMPLETION_PATTERN, [Obj.ImageIndex, LowerCase(_(Obj.ObjType)), Obj.Name]); Proposal.AddItem(DisplayText, Obj.Name); end; @@ -7053,12 +7053,12 @@ begin Item^ := TDBObject.Create(ParentObj.Connection); Item.NodeType := lntGroup; case Node.Index of - 0: begin Item.GroupType := lntTable; Item.Name := 'Tables'; end; - 1: begin Item.GroupType := lntView; Item.Name := 'Views'; end; - 2: begin Item.GroupType := lntProcedure; Item.Name := 'Procedures'; end; - 3: begin Item.GroupType := lntFunction; Item.Name := 'Functions'; end; - 4: begin Item.GroupType := lntTrigger; Item.Name := 'Triggers'; end; - 5: begin Item.GroupType := lntEvent; Item.Name := 'Events'; end; + 0: begin Item.GroupType := lntTable; Item.Name := _('Tables'); end; + 1: begin Item.GroupType := lntView; Item.Name := _('Views'); end; + 2: begin Item.GroupType := lntProcedure; Item.Name := _('Procedures'); end; + 3: begin Item.GroupType := lntFunction; Item.Name := _('Functions'); end; + 4: begin Item.GroupType := lntTrigger; Item.Name := _('Triggers'); end; + 5: begin Item.GroupType := lntEvent; Item.Name := _('Events'); end; end; Item.Database := ParentObj.Database; NodeStates := [ivsHasChildren]; @@ -8867,9 +8867,9 @@ var Cap: String; begin tabEditor.ImageIndex := ActiveObjectEditor.DBObject.ImageIndex; - Cap := ActiveObjectEditor.DBObject.ObjType+': '; + Cap := _(ActiveObjectEditor.DBObject.ObjType)+': '; if ActiveObjectEditor.DBObject.Name = '' then - Cap := Cap + '[Untitled]' + Cap := Cap + '['+_('Unnamed')+']' else Cap := sstr(Cap + ActiveObjectEditor.DBObject.Name, 30); SetTabCaption(tabEditor.PageIndex, Cap); @@ -10364,7 +10364,7 @@ begin 0: case Sender.GetNodeLevel(Node) of 0: case Node.Index of HELPERNODE_COLUMNS: begin - CellText := 'Columns'; + CellText := _('Columns'); if ActiveDbObj <> nil then case ActiveDbObj.NodeType of lntProcedure, lntFunction: CellText := f_('Parameters in %s', [ActiveDbObj.Name]); lntTable, lntView: CellText := f_('Columns in %s', [ActiveDbObj.Name]); diff --git a/source/searchreplace.pas b/source/searchreplace.pas index 70a64886..b4374b4d 100644 --- a/source/searchreplace.pas +++ b/source/searchreplace.pas @@ -127,9 +127,9 @@ begin btnReplaceAll.Enabled := chkReplace.Checked; lblReplaceHint.Enabled := chkReplace.Checked; if chkReplace.Checked then - btnOK.Caption := 'Replace' + btnOK.Caption := _('Replace') else - btnOK.Caption := 'Find'; + btnOK.Caption := _('Find'); end; diff --git a/source/syncdb.pas b/source/syncdb.pas index c4179805..256bd8c7 100644 --- a/source/syncdb.pas +++ b/source/syncdb.pas @@ -424,7 +424,7 @@ begin end; end; if not ObjExists then begin - Diff.AddItem(f_('Create missing %s', [LowerCase(SourceObj.ObjType)]), SourceObj.CreateCode, diCreate); + Diff.AddItem(f_('Create missing %s', [_(LowerCase(SourceObj.ObjType))]), SourceObj.CreateCode, diCreate); end; treeDifferences.EndUpdate; end; diff --git a/source/table_editor.pas b/source/table_editor.pas index 363d830d..09f6d061 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -763,7 +763,7 @@ begin NewCol.Comment := ''; NewCol.Collation := ''; end; - NewCol.Name := 'Column '+IntToStr(idx+1); + NewCol.Name := _('Column')+' '+IntToStr(idx+1); FColumns.Insert(idx, NewCol); NewNode := listColumns.InsertNode(fn, amInsertAfter, @NewCol); NewCol.Status := esAddedUntouched; @@ -1364,7 +1364,7 @@ var begin // Add new index TblKey := TTableKey.Create(DBObject.Connection); - TblKey.Name := 'Index '+IntToStr(FKeys.Count+1); + TblKey.Name := _('Index')+' '+IntToStr(FKeys.Count+1); TblKey.OldName := TblKey.Name; TblKey.IndexType := KEY; TblKey.OldIndexType := TblKey.IndexType; diff --git a/source/tabletools.pas b/source/tabletools.pas index 8f8f08b9..849b3ed0 100644 --- a/source/tabletools.pas +++ b/source/tabletools.pas @@ -228,7 +228,7 @@ begin for dt:=lntTable to lntEvent do begin Obj.NodeType := dt; MenuItem := TMenuItem.Create(menuCheckByType); - MenuItem.Caption := UpperCase(Obj.ObjType)+'s'; + MenuItem.Caption := _(Obj.ObjType+'s'); MenuItem.ImageIndex := Obj.ImageIndex; MenuItem.OnClick := CheckAllClick; MenuItem.Tag := Integer(dt); @@ -369,7 +369,7 @@ begin btnSeeResults.Visible := tabsTools.ActivePage = tabFind; lblCheckedSize.Caption := f_('Selected objects size: %s', [FormatByteNumber(FObjectSizes)]); if tabsTools.ActivePage = tabMaintenance then begin - btnExecute.Caption := 'Execute'; + btnExecute.Caption := _('Execute'); btnExecute.Enabled := (Pos(SUnsupported, comboOperation.Text) = 0) and SomeChecked; // Only enable available options op := LowerCase(comboOperation.Text); @@ -385,7 +385,7 @@ begin else if chkQuick.Checked then chkExtended.Checked := False; end; end else if tabsTools.ActivePage = tabFind then begin - btnExecute.Caption := 'Find'; + btnExecute.Caption := _('Find'); btnExecute.Enabled := SomeChecked and (memoFindText.Text <> ''); // Enable "See results" button if there were results btnSeeResults.Enabled := False; @@ -396,10 +396,10 @@ begin end; end; end else if tabsTools.ActivePage = tabSQLExport then begin - btnExecute.Caption := 'Export'; + btnExecute.Caption := _('Export'); btnExecute.Enabled := SomeChecked and ((comboExportOutputTarget.Text <> '') or (not comboExportOutputTarget.Enabled)); end else if tabsTools.ActivePage = tabBulkTableEdit then begin - btnExecute.Caption := 'Update'; + btnExecute.Caption := _('Update'); chkBulkTableEditCollation.Enabled := MainForm.ActiveConnection.IsUnicode; chkBulkTableEditCharset.Enabled := MainForm.ActiveConnection.IsUnicode; OptionChecked := chkBulkTableEditDatabase.Checked or chkBulkTableEditEngine.Checked or chkBulkTableEditCollation.Checked @@ -571,7 +571,7 @@ begin Screen.Cursor := crHourGlass; // Disable critical controls so ProcessMessages is unable to do things while export is in progress btnExecute.Enabled := False; - btnCloseOrCancel.Caption := 'Cancel'; + btnCloseOrCancel.Caption := _('Cancel'); btnCloseOrCancel.ModalResult := mrNone; tabsTools.Enabled := False; treeObjects.Enabled := False; @@ -661,7 +661,7 @@ begin end; FModifiedDbs.Clear; - btnCloseOrCancel.Caption := 'Close'; + btnCloseOrCancel.Caption := _('Close'); btnCloseOrCancel.ModalResult := mrCancel; MainForm.DisableProgress; tabsTools.Enabled := True; @@ -933,7 +933,7 @@ begin comboExportOutputTarget.Items.Text := AppSettings.ReadString(asExportSQLFilenames, ''); if comboExportOutputTarget.Items.Count > 0 then comboExportOutputTarget.ItemIndex := 0; - lblExportOutputTarget.Caption := 'Filename:'; + lblExportOutputTarget.Caption := _('Filename')+':'; btnExportOutputTargetSelect.Enabled := True; btnExportOutputTargetSelect.ImageIndex := 10; end else if comboExportOutputType.Text = OUTPUT_DIR then begin @@ -941,7 +941,7 @@ begin comboExportOutputTarget.Items.Text := AppSettings.ReadString(asExportSQLDirectories, ''); if comboExportOutputTarget.Items.Count > 0 then comboExportOutputTarget.ItemIndex := 0; - lblExportOutputTarget.Caption := 'Directory:'; + lblExportOutputTarget.Caption := _('Directory')+':'; btnExportOutputTargetSelect.Enabled := True; btnExportOutputTargetSelect.ImageIndex := 51; end else if comboExportOutputType.Text = OUTPUT_CLIPBOARD then begin @@ -952,7 +952,7 @@ begin btnExportOutputTargetSelect.ImageIndex := 4; end else if comboExportOutputType.Text = OUTPUT_DB then begin comboExportOutputTarget.Style := csDropDownList; - lblExportOutputTarget.Caption := 'Database:'; + lblExportOutputTarget.Caption := _('Database')+':'; btnExportOutputTargetSelect.Enabled := False; btnExportOutputTargetSelect.ImageIndex := 27; // Add unchecked databases @@ -970,7 +970,7 @@ begin end else begin // Server selected. Display databases in below dropdown comboExportOutputTarget.Style := csDropDownList; - lblExportOutputTarget.Caption := 'Database:'; + lblExportOutputTarget.Caption := _('Database')+':'; btnExportOutputTargetSelect.Enabled := False; btnExportOutputTargetSelect.ImageIndex := 27; SessionName := Copy(comboExportOutputType.Text, Length(OUTPUT_SERVER)+1, Length(comboExportOutputType.Text)); @@ -1239,7 +1239,7 @@ begin // Table structure if chkExportTablesDrop.Checked or chkExportTablesCreate.Checked then begin - Output(CRLF+CRLF+'-- '+f_('Dumping structure for %s %s.%s', [LowerCase(DBObj.ObjType), DBObj.Database, DBObj.Name])+CRLF, False, True, True, False, False); + Output(CRLF+CRLF+'-- '+f_('Dumping structure for %s %s.%s', [_(LowerCase(DBObj.ObjType)), DBObj.Database, DBObj.Name])+CRLF, False, True, True, False, False); if chkExportTablesDrop.Checked then begin Struc := 'DROP '+UpperCase(DBObj.ObjType)+' IF EXISTS '; if ToDb then @@ -1540,7 +1540,7 @@ begin LogRow[3] := _('Success'); end else begin LogRow[2] := _('Nothing to do'); - LogRow[3] := f_('Selected operations cannot be applied to a %s', [LowerCase(DBObj.ObjType)]); + LogRow[3] := f_('Selected operations cannot be applied to a %s', [_(LowerCase(DBObj.ObjType))]); end; UpdateResultGrid; end; diff --git a/source/usermanager.pas b/source/usermanager.pas index 06f3a9c7..9154038e 100644 --- a/source/usermanager.pas +++ b/source/usermanager.pas @@ -1011,7 +1011,7 @@ begin if Assigned(listUsers.FocusedNode) then Exit; User := TUser.Create; - User.Username := 'Unnamed'; + User.Username := _('Unnamed'); User.Host := 'localhost'; FUsers.Add(User); FAdded := True; @@ -1045,7 +1045,7 @@ begin Exit; // Check for unsupported object type, selectable in tree if not (DBObj.NodeType in [lntDb, lntTable, lntFunction, lntProcedure, lntColumn]) then begin - ErrorDialog(f_('Objects of type %s cannot be part of privileges.', [DBObj.ObjType])); + ErrorDialog(f_('Objects of type %s cannot be part of privileges.', [_(DBObj.ObjType)])); Exit; end; // Check if this would be a duplicate object @@ -1152,7 +1152,7 @@ begin lntColumn: OnObj := GetObjectType('TABLE') + P.DBObj.QuotedDatabase + '.' + P.DBObj.QuotedName; else - raise Exception.CreateFmt(_('Unhandled privilege object: %s'), [P.DBObj.ObjType]); + raise Exception.CreateFmt(_('Unhandled privilege object: %s'), [_(P.DBObj.ObjType)]); end; // Revoke privileges