diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-24 17:33:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-25 14:53:07 +0100 |
commit | da543e4efbb53e25a60f8557a0b8cd307e46ebf4 (patch) | |
tree | b973a6c31cf3432b9ed81ca0d9f40bf150a7fec0 /wizards/source/template | |
parent | 264ac75d4ddba5ef35105689df3c51d45c259b17 (diff) |
convert starbasic wizards to .properties for translations
Change-Id: I165f85ee993995b54163061c7d378eea90eb276a
Diffstat (limited to 'wizards/source/template')
-rw-r--r-- | wizards/source/template/Autotext.xba | 8 | ||||
-rw-r--r-- | wizards/source/template/Correspondence.xba | 86 | ||||
-rw-r--r-- | wizards/source/template/ModuleAgenda.xba | 18 | ||||
-rw-r--r-- | wizards/source/template/Samples.xba | 20 | ||||
-rw-r--r-- | wizards/source/template/template.src | 459 |
5 files changed, 65 insertions, 526 deletions
diff --git a/wizards/source/template/Autotext.xba b/wizards/source/template/Autotext.xba index f99a54f13f65..35b3fdf62ce4 100644 --- a/wizards/source/template/Autotext.xba +++ b/wizards/source/template/Autotext.xba @@ -41,9 +41,9 @@ Sub Main() On Local Error Goto GENERALERROR ' Initialization... BasicLibraries.LoadLibrary("Tools") - If InitResources("'Template'", "tpl") Then - sGeneralError = GetResText(1302) - sTextFieldNotDefined = GetResText(1400) + If InitResources("'Template'") Then + sGeneralError = GetResText("CorrespondenceMsgError") + sTextFieldNotDefined = GetResText("TextField") End If UserfieldDatatype(0) = "COMPANY" @@ -187,4 +187,4 @@ Sub CreatePlaceholder(oCursor as Object, sFoundContent as String) End Sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/template/Correspondence.xba b/wizards/source/template/Correspondence.xba index 0d98846436a1..01da7f3d83e7 100644 --- a/wizards/source/template/Correspondence.xba +++ b/wizards/source/template/Correspondence.xba @@ -59,16 +59,16 @@ End Sub Function LoadLanguageCorrespondence() as Boolean - If InitResources("'Template'", "tpl") Then - msgNoTextmark$ = GetResText(1303) & Chr(13) & Chr(10) & GetResText(1301) - msgError$ = GetResText(1302) + If InitResources("'Template'") Then + msgNoTextmark$ = GetResText("CorrespondenceDialog_0") & Chr(13) & Chr(10) & GetResText("CorrespondenceNoTextmark_1") + msgError$ = GetResText("CorrespondenceMsgError") If bTemplate Then - DialogModel.Title = GetResText(1303+3) - DialogModel.CmdCancel.Label = GetResText(1102) - DialogModel.CmdCorrGoOn.Label = GetResText(1103) - DialogModel.OptSingle.Label = GetResText(1303 + 1) - DialogModel.Optmerge.Label = GetResText(1303 + 2) - DialogModel.FrmLetter.Label = GetResText(1303) + DialogModel.Title = GetResText("CorrespondenceDialog_3") + DialogModel.CmdCancel.Label = GetResText("STYLES_2") + DialogModel.CmdCorrGoOn.Label = GetResText("STYLES_3") + DialogModel.OptSingle.Label = GetResText("CorrespondenceDialog_1") + DialogModel.Optmerge.Label = GetResText("CorrespondenceDialog_2") + DialogModel.FrmLetter.Label = GetResText("CorrespondenceDialog_0") End If LoadLanguageCorrespondence() = True Else @@ -130,7 +130,7 @@ Dim bDBvalid as Boolean oDBAccess = GetRegistryKeyContent("org.openoffice.Office.DataAccess/AddressBook/") sAddressbook = oDBAccess.DataSourceName If sAddressbook = "" Then - MsgBox(GetResText(1301)) + MsgBox(GetResText("CorrespondenceNoTextmark_1")) Exit Sub End If End If @@ -230,74 +230,74 @@ Dim bCorrectField as Boolean oFieldMaster = oDocument.createInstance("com.sun.star.text.TextField.JumpEdit") Select Case sColName Case "Company" - oFieldMaster.PlaceHolder = getResText(1350+1) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_1") Case "Department" - oFieldMaster.PlaceHolder = getResText(1350+2) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_2") Case "FirstName" - oFieldMaster.PlaceHolder = getResText(1350+3) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_3") Case "LastName" - oFieldMaster.PlaceHolder = getResText(1350+4) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_4") Case "Street" - oFieldMaster.PlaceHolder = getResText(1350+5) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_5") Case "Country" - oFieldMaster.PlaceHolder = getResText(1350+6) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_6") Case "Zip" - oFieldMaster.PlaceHolder = getResText(1350+7) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_7") Case "City" - oFieldMaster.PlaceHolder = getResText(1350+8) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_8") Case "Title" - oFieldMaster.PlaceHolder = getResText(1350+9) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_9") Case "Position" - oFieldMaster.PlaceHolder = getResText(1350+10) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_10") Case "AddrForm" - oFieldMaster.PlaceHolder = getResText(1350+11) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_11") Case "Code" - oFieldMaster.PlaceHolder = getResText(1350+12) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_12") Case "AddrFormMail" - oFieldMaster.PlaceHolder = getResText(1350+13) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_13") Case "PhonePriv" - oFieldMaster.PlaceHolder = getResText(1350+14) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_14") Case "PhoneComp" - oFieldMaster.PlaceHolder = getResText(1350+15) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_15") Case "Fax" - oFieldMaster.PlaceHolder = getResText(1350+16) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_16") Case "EMail" - oFieldMaster.PlaceHolder = getResText(1350+17) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_17") Case "URL" - oFieldMaster.PlaceHolder = getResText(1350+18) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_18") Case "Note" - oFieldMaster.PlaceHolder = getResText(1350+19) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_19") Case "Altfield1" - oFieldMaster.PlaceHolder = getResText(1350+20) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_20") Case "Altfield2" - oFieldMaster.PlaceHolder = getResText(1350+21) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_21") Case "Altfield3" - oFieldMaster.PlaceHolder = getResText(1350+22) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_22") Case "Altfield4" - oFieldMaster.PlaceHolder = getResText(1350+23) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_23") Case "Id" - oFieldMaster.PlaceHolder = getResText(1350+24) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_24") Case "State" - oFieldMaster.PlaceHolder = getResText(1350+25) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_25") Case "PhoneOffice" - oFieldMaster.PlaceHolder = getResText(1350+26) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_26") Case "Pager" - oFieldMaster.PlaceHolder = getResText(1350+27) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_27") Case "PhoneCell" - oFieldMaster.PlaceHolder = getResText(1350+28) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_28") Case "PhoneOther" - oFieldMaster.PlaceHolder = getResText(1350+29) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_29") Case "CalendarURL" - oFieldMaster.PlaceHolder = getResText(1350+30) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_30") Case "InviteParticipant" - oFieldMaster.PlaceHolder = getResText(1350+31) + oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_31") Case Else bCorrectField = False End Select If bCorrectField Then - oFieldMaster.Hint = getResText(1350) + oFieldMaster.Hint = getResText("CorrespondenceFields_0") oBookText.InsertTextContent(oBookMarkCursor, oFieldMaster, True) End If End If End Sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/template/ModuleAgenda.xba b/wizards/source/template/ModuleAgenda.xba index 55731dcc54c4..a17fb68cd602 100644 --- a/wizards/source/template/ModuleAgenda.xba +++ b/wizards/source/template/ModuleAgenda.xba @@ -45,14 +45,14 @@ End Sub Sub LoadLanguageAgenda() - If InitResources("'Template'", "tpl") Then - DlgAgenda_gMyName = GetResText(1200) - DialogModel.CmdCancel.Label = GetResText(1102) - DialogModel.CmdAgdGoon.Label = GetResText(1103) -' DlgAgenda_gMsgNoCancel$ = GetResText(1201) - DialogModel.FrmAgenda.Label = GetResText(1202) - DialogModel.OptAgenda1.Label = GetResText(1203) - DialogModel.OptAgenda2.Label = GetResText(1204) + If InitResources("'Template'") Then + DlgAgenda_gMyName = GetResText("AgendaDlgName") + DialogModel.CmdCancel.Label = GetResText("STYLES_2") + DialogModel.CmdAgdGoon.Label = GetResText("STYLES_3") +' DlgAgenda_gMsgNoCancel$ = GetResText("AgendaDlgNoCancel") + DialogModel.FrmAgenda.Label = GetResText("AgendaDlgFrame") + DialogModel.OptAgenda1.Label = GetResText("AgendaDlgButton1") + DialogModel.OptAgenda2.Label = GetResText("AgendaDlgButton2") ' DialogModel.OptAgenda1.State = 1 End If End Sub @@ -217,4 +217,4 @@ Dim Taglist() as String sTrueContent = TagList(1) End Sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba index 13fe11a09dd9..ac3431a2023b 100644 --- a/wizards/source/template/Samples.xba +++ b/wizards/source/template/Samples.xba @@ -19,9 +19,6 @@ --> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Samples" script:language="StarBasic">Option Explicit -Const STYLES = 1100 -Const STYLENAME_DEF = 1120 -Const STYLENAME = 1150 Const NumStyles = 18 Const aTempFileName = "Berend_Ilko_Tom_Stella_Volker.stc" Dim oUcbObject as Object @@ -36,7 +33,6 @@ Public aTempURL as String Public Files(100) as String - '-------------------------------------------------------------------------------------- 'Calc Style Section starts here @@ -49,8 +45,9 @@ Dim LocalizedStyleNames(NumStyles,2) As String Dim LocalizedStyleName As String Dim t as Integer Dim MaxIndex as Integer +Dim StyleNameDef As Variant BasicLibraries.LoadLibrary("Tools") - If InitResources("'Template'", "tpl") then + If InitResources("'Template'") then oDocument = ThisComponent If oDocument.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then ToggleWindow(False) @@ -62,12 +59,13 @@ Dim MaxIndex as Integer TemplateDir = GetPathSettings("Template", False, 0) StylesDir = GetOfficeSubPath("Template", "wizard/styles/") sQueryPath = GetOfficeSubPath("Template", "../wizard/bitmap/") - DialogModel.Title = GetResText(STYLES) - DialogModel.cmdCancel.Label = GetResText(STYLES+2) - DialogModel.cmdOk.Label = GetResText(STYLES+3) + DialogModel.Title = GetResText("STYLES_0") + DialogModel.cmdCancel.Label = GetResText("STYLES_2") + DialogModel.cmdOk.Label = GetResText("STYLES_3") + StyleNameDef = Array("(Standard)", "Autumn Leaves", "Be", "Black and White", "Blackberry Bush", "Blue Jeans", "Fifties Diner", "Glacier", "Green Grapes", "Marine", "Millennium", "Nature", "Neon", "Night", "PC Nostalgia", "Pastel", "Pool Party", "Pumpkin") For t = 0 to NumStyles - 1 - LocalizedStyleNames(t,0) = GetResText(STYLENAME_DEF+t) - LocalizedStyleNames(t,1) = GetResText(STYLENAME+t) + LocalizedStyleNames(t,0) = StyleNameDef(t) + LocalizedStyleNames(t,1) = GetResText("STYLENAME_" & Trim(Str(t))) Next t Stylenames() = ReadDirectories(StylesDir, False, False, True,) MaxIndex = Ubound(Stylenames()) @@ -129,7 +127,7 @@ Sub SaveCurrentStyles(oDocument as Object) Exit Sub ErrorOcurred: - MsgBox(GetResText( STYLES+1 ), 16, GetResText( STYLES )) + MsgBox(GetResText("STYLES_1"), 16, GetResText("STYLES_0")) On Local Error Goto 0 End Sub diff --git a/wizards/source/template/template.src b/wizards/source/template/template.src deleted file mode 100644 index 9afa43b00a12..000000000000 --- a/wizards/source/template/template.src +++ /dev/null @@ -1,459 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define STYLES 1100 -#define STYLENAME_DEF 1120 -#define STYLENAME 1150 -#define AgendaDlgName 1200 -#define AgendaDlgNoCancel 1201 -#define AgendaDlgFrame 1202 -#define AgendaDlgButton1 1203 -#define AgendaDlgButton2 1204 -#define CorrespondenceNoTextmark 1300 -#define CorrespondenceMsgError 1302 -#define CorrespondenceDialog 1303 -#define CorrespondenceFields 1350 -#define TextField 1400 - -String STYLES -{ - Text [ en-US ] = "Theme Selection"; -}; - -String STYLES + 1 -{ - Text [ en-US ] = "Error while saving the document to the clipboard! The following action cannot be undone."; -}; - -String STYLES + 2 -{ - Text [ en-US ] = "~Cancel"; -}; - -String STYLES + 3 -{ - Text [ en-US ] = "~OK"; -}; - -String STYLENAME_DEF -{ - Text = "(Standard)"; -}; - -String STYLENAME_DEF + 1 -{ - Text = "Autumn Leaves"; -}; - -String STYLENAME_DEF + 2 -{ - Text = "Be"; -}; - -String STYLENAME_DEF + 3 -{ - Text = "Black and White"; -}; - -String STYLENAME_DEF + 4 -{ - Text = "Blackberry Bush"; -}; - -String STYLENAME_DEF + 5 -{ - Text = "Blue Jeans"; -}; - -String STYLENAME_DEF + 6 -{ - Text = "Fifties Diner"; -}; - -String STYLENAME_DEF + 7 -{ - Text = "Glacier"; -}; - -String STYLENAME_DEF + 8 -{ - Text = "Green Grapes"; -}; - -String STYLENAME_DEF + 9 -{ - Text = "Marine"; -}; - -String STYLENAME_DEF + 10 -{ - Text = "Millennium"; -}; - -String STYLENAME_DEF + 11 -{ - Text = "Nature"; -}; - -String STYLENAME_DEF + 12 -{ - Text = "Neon"; -}; - -String STYLENAME_DEF + 13 -{ - Text = "Night"; -}; - -String STYLENAME_DEF + 14 -{ - Text = "PC Nostalgia"; -}; - -String STYLENAME_DEF + 15 -{ - Text = "Pastel"; -}; - -String STYLENAME_DEF + 16 -{ - Text = "Pool Party"; -}; - -String STYLENAME_DEF + 17 -{ - Text = "Pumpkin"; -}; - -String STYLENAME -{ - Text [ en-US ] = "(Standard)"; -}; - -String STYLENAME + 1 -{ - Text [ en-US ] = "Autumn Leaves"; -}; - -String STYLENAME + 2 -{ - Text [ en-US ] = "Be"; -}; - -String STYLENAME + 3 -{ - Text [ en-US ] = "Black and White"; -}; - -String STYLENAME + 4 -{ - Text [ en-US ] = "Blackberry Bush"; -}; - -String STYLENAME + 5 -{ - Text [ en-US ] = "Blue Jeans"; -}; - -String STYLENAME + 6 -{ - Text [ en-US ] = "Fifties Diner"; -}; - -String STYLENAME + 7 -{ - Text [ en-US ] = "Glacier"; -}; - -String STYLENAME + 8 -{ - Text [ en-US ] = "Green Grapes"; -}; - -String STYLENAME + 9 -{ - Text [ en-US ] = "Marine"; -}; - -String STYLENAME + 10 -{ - Text [ en-US ] = "Millennium"; -}; - -String STYLENAME + 11 -{ - Text [ en-US ] = "Nature"; -}; - -String STYLENAME + 12 -{ - Text [ en-US ] = "Neon"; -}; - -String STYLENAME + 13 -{ - Text [ en-US ] = "Night"; -}; - -String STYLENAME + 14 -{ - Text [ en-US ] = "PC Nostalgia"; -}; - -String STYLENAME + 15 -{ - Text [ en-US ] = "Pastel"; -}; - -String STYLENAME + 16 -{ - Text [ en-US ] = "Pool Party"; -}; - -String STYLENAME + 17 -{ - Text [ en-US ] = "Pumpkin"; -}; - -String AgendaDlgName -{ - Text [ en-US ] = "Minutes Template"; -}; - -String AgendaDlgNoCancel -{ - Text [ en-US ] = "An option must be confirmed."; -}; - -String AgendaDlgFrame -{ - Text [ en-US ] = "Minutes Type"; -}; - -String AgendaDlgButton1 -{ - Text [ en-US ] = "Results Minutes"; -}; - -String AgendaDlgButton2 -{ - Text [ en-US ] = "Evaluation Minutes"; -}; - -String CorrespondenceNoTextmark -{ - Text [ en-US ] = "The bookmark 'Recipient' is missing."; -}; - -String CorrespondenceNoTextmark+1 -{ - Text [ en-US ] = "Form letter fields can not be included."; -}; - -String CorrespondenceMsgError -{ - Text [ en-US ] = "An error has occurred."; -}; - -String CorrespondenceDialog -{ - Text [ en-US ] = "Addressee"; -}; - -String CorrespondenceDialog+1 -{ - Text [ en-US ] = "One recipient"; -}; - -String CorrespondenceDialog+2 -{ - Text [ en-US ] = "Several recipients (address database)"; -}; - -String CorrespondenceDialog+3 -{ - Text [ en-US ] = "Use of This Template"; -}; - -String CorrespondenceFields -{ - Text [ en-US ] = "Click placeholder and overwrite"; -}; - -String CorrespondenceFields+1 -{ - Text [ en-US ] = "Company"; -}; - -String CorrespondenceFields+2 -{ - Text [ en-US ] = "Department"; -}; - -String CorrespondenceFields+3 -{ - Text [ en-US ] = "First Name"; -}; - -String CorrespondenceFields+4 -{ - Text [ en-US ] = "Last Name"; -}; - -String CorrespondenceFields+5 -{ - Text [ en-US ] = "Street"; -}; - -String CorrespondenceFields+6 -{ - Text [ en-US ] = "Country"; -}; - -String CorrespondenceFields+7 -{ - Text [ en-US ] = "ZIP/Postal Code"; -}; - -String CorrespondenceFields+8 -{ - Text [ en-US ] = "City"; -}; - -String CorrespondenceFields+9 -{ - Text [ en-US ] = "Title"; -}; - -String CorrespondenceFields+10 -{ - Text [ en-US ] = "Position"; -}; - -String CorrespondenceFields+11 -{ - Text [ en-US ] = "Form of Address"; -}; - -String CorrespondenceFields+12 -{ - Text [ en-US ] = "Initials"; -}; - -String CorrespondenceFields+13 -{ - Text [ en-US ] = "Salutation"; -}; - -String CorrespondenceFields+14 -{ - Text [ en-US ] = "Home Phone"; -}; - -String CorrespondenceFields+15 -{ - Text [ en-US ] = "Work Phone"; -}; - -String CorrespondenceFields+16 -{ - Text [ en-US ] = "Fax"; -}; - -String CorrespondenceFields+17 -{ - Text [ en-US ] = "E-Mail"; -}; - -String CorrespondenceFields+18 -{ - Text [ en-US ] = "URL"; -}; - -String CorrespondenceFields+19 -{ - Text [ en-US ] = "Notes"; -}; - -String CorrespondenceFields+20 -{ - Text [ en-US ] = "Alt. Field 1"; -}; - -String CorrespondenceFields+21 -{ - Text [ en-US ] = "Alt. Field 2"; -}; - -String CorrespondenceFields+22 -{ - Text [ en-US ] = "Alt. Field 3"; -}; - -String CorrespondenceFields+23 -{ - Text [ en-US ] = "Alt. Field 4"; -}; - -String CorrespondenceFields+24 -{ - Text [ en-US ] = "ID"; -}; - -String CorrespondenceFields+25 -{ - Text [ en-US ] = "State"; -}; - -String CorrespondenceFields+26 -{ - Text [ en-US ] = "Office Phone"; -}; - -String CorrespondenceFields+27 -{ - Text [ en-US ] = "Pager"; -}; - -String CorrespondenceFields+28 -{ - Text [ en-US ] = "Mobile Phone"; -}; - -String CorrespondenceFields+29 -{ - Text [ en-US ] = "Other Phone"; -}; - -String CorrespondenceFields+30 -{ - Text [ en-US ] = "Calendar URL"; -}; - -String CorrespondenceFields+31 -{ - Text [ en-US ] = "Invite"; -}; - -String TextField -{ - Text [ en-US ] = "User data field is not defined!"; - -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |