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/importwizard | |
parent | 264ac75d4ddba5ef35105689df3c51d45c259b17 (diff) |
convert starbasic wizards to .properties for translations
Change-Id: I165f85ee993995b54163061c7d378eea90eb276a
Diffstat (limited to 'wizards/source/importwizard')
-rw-r--r-- | wizards/source/importwizard/DialogModul.xba | 18 | ||||
-rw-r--r-- | wizards/source/importwizard/Language.xba | 126 | ||||
-rw-r--r-- | wizards/source/importwizard/importwi.src | 379 |
3 files changed, 72 insertions, 451 deletions
diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba index e55266985414..0bf782c6b12d 100644 --- a/wizards/source/importwizard/DialogModul.xba +++ b/wizards/source/importwizard/DialogModul.xba @@ -37,7 +37,6 @@ Public SOWorkPath As String Public SOTemplatePath as String Public bCancelTask As Boolean Public bDoKeepApplValues as Boolean -Public iApplSection as Integer Public oUcb as Object Public PathSeparator as String @@ -311,14 +310,17 @@ End Sub Sub SetupMSConfiguration() - iApplSection = 0 Wizardmode = SBMICROSOFTMODE MaxApplCount = 3 ApplCount = 3 ' chkTemplatePath-Captions - GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox()) + sTemplateCheckBox(0) = GetResText("MSTemplateCheckbox_1_") + sTemplateCheckBox(1) = GetResText("MSTemplateCheckbox_2_") + sTemplateCheckBox(2) = GetResText("MSTemplateCheckbox_3_") ' DocumentCheckbox- Captions - GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox()) + sDocumentCheckBox(0) = GetResText("MSDocumentCheckbox_1_") + sDocumentCheckBox(1) = GetResText("MSDocumentCheckbox_2_") + sDocumentCheckBox(2) = GetResText("MSDocumentCheckbox_3_") sKeyName(0) = "Software\Microsoft\Office\8.0\Word\Options" sKeyName(1) = "Software\Microsoft\Office\8.0\Excel\Microsoft Excel" @@ -400,10 +402,10 @@ Dim sShowPath as String Dim oLocUcb as Object oLocUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") If bGetResources Then - If InitResources("ImportWizard","imp") then - sNoDirCreation = GetResText(1050) - sMsgDirNotThere = GetResText(1051) - sQueryForNewCreation = GetResText(1052) + If InitResources("ImportWizard") then + sNoDirCreation = GetResText("NoDirCreation") + sMsgDirNotThere = GetResText("MsgDirNotThere") + sQueryForNewCreation = GetResText("QueryfornewCreation") Else CheckTextBoxPath() = False Exit Function diff --git a/wizards/source/importwizard/Language.xba b/wizards/source/importwizard/Language.xba index 7d5038d653ba..bd890ed63788 100644 --- a/wizards/source/importwizard/Language.xba +++ b/wizards/source/importwizard/Language.xba @@ -55,82 +55,90 @@ Public ModuleList(3) as String Public sLogSummary as String Public sReeditMacro as String Public sOverwriteallFiles as String -Public scouldnotopenDocument as String +Public sCouldnotopenDocument as String Public sCurcouldnotopenDocument as String -Public scouldnotsaveDocument as String +Public sCouldnotsaveDocument as String Public sCurcouldnotsaveDocument as String Sub LoadLanguage() - If InitResources("ImportWizard","imp") then - sHelpButton = GetResText(1000) - sCancelButton = GetResText(1001) - sBackButton = GetResText(1002) - sNextButton = GetResText(1003) - sBeginButton = GetResText(1004) - sCloseButton = GetResText(1005) - - sWelcometextLabel1 = ReplaceString(GetResText(1006), GetProductName(),"%PRODUCTNAME") - sWelcometextLabel3 = GetResText(1008) + If InitResources("ImportWizard") then + sHelpButton = GetResText("HelpButton") + sCancelButton = GetResText("CancelButton") + sBackButton = GetResText("BackButton") + sNextButton = GetResText("NextButton") + sBeginButton = GetResText("BeginButton") + sCloseButton = GetResText("CloseButton") + + sWelcometextLabel1 = ReplaceString(GetResText("WelcometextLabel1"), GetProductName(),"%PRODUCTNAME") + sWelcometextLabel3 = GetResText("WelcometextLabel3") ' Microsoft Documents - GetApplResourceArray(1009, 3, sMSTemplateCheckBox()) + sMSTemplateCheckBox(0) = GetResText("MSTemplateCheckbox_1_") + sMSTemplateCheckBox(1) = GetResText("MSTemplateCheckbox_2_") + sMSTemplateCheckBox(2) = GetResText("MSTemplateCheckbox_3_") ' DocumentCheckbox- Captions - GetApplResourceArray(1012, 3, sMSDocumentCheckBox()) + sMSDocumentCheckBox(0) = GetResText("MSDocumentCheckbox_1_") + sMSDocumentCheckBox(1) = GetResText("MSDocumentCheckbox_2_") + sMSDocumentCheckBox(2) = GetResText("MSDocumentCheckbox_3_") 'StarOffice Applicationnames - sContainerName(0) = GetResText(1030) - - sSummaryHeader = GetResText(1031) + sContainerName(0) = GetResText("MSContainerName") + + sSummaryHeader = GetResText("SummaryHeader") - sTemplateGroupName = GetResText(1036) + sTemplateGroupName = GetResText("GroupnameDefault") - sProgressMoreDocs = GetResText(1041) - sProgressMoreTemplates = GetResText(1042) - sNoDirCreation = GetResText(1050) - sMsgDirNotThere = GetResText(1051) - sQueryForNewCreation = GetResText(1052) - sFileExists = GetResText(1053) - sMorePathsError3 = GetResText(1054) - sConvertError1 = GetResText(1055) - sConvertError2 = GetResText(1056) - sRTErrorDesc = GetResText(1057) - sRTErrorHeader = GetResText(1058) - sOverwriteallFiles = GetResText(1070) - sReeditMacro = GetResText(1071) - scouldnotsaveDocument = GetResText(1072) - scouldnotopenDocument = GetResText(1073) - sPathDialogMessage = GetResText(1080) - sTitle = GetResText(1081) + sProgressMoreDocs = GetResText("ProgressMoreDocs") + sProgressMoreTemplates = GetResText("ProgressMoreTemplates") + sNoDirCreation = GetResText("NoDirCreation") + sMsgDirNotThere = GetResText("MsgDirNotThere") + sQueryForNewCreation = GetResText("QueryfornewCreation") + sFileExists = GetResText("FileExists") + sMorePathsError3 = GetResText("MorePathsError3") + sConvertError1 = GetResText("ConvertError1") + sConvertError2 = GetResText("ConvertError2") + sRTErrorDesc = GetResText("RTErrorDesc") + sRTErrorHeader = GetResText("RTErrorHeader") + sOverwriteallFiles = GetResText("OverwriteallFiles") + sReeditMacro = GetResText("ReeditMacro") + sCouldnotsaveDocument = GetResText("CouldNotsaveDocument") + sCouldnotopenDocument = GetResText("CouldNotopenDocument") + sPathDialogMessage = GetResText("PathDialogMessage") + sTitle = GetResText("DialogTitle") - sProgressPage_1 = GetResText(1090) - sProgressPage_2 = GetResText(1091) - sProgressPage_3 = GetResText(1092) - sProgressFound = GetResText(1093) - sProgressPage_5 = GetResText(1094) - sReady = GetResText(1100) - sSourceDocuments = GetResText(2030) - sTargetDocuments = GetResText(2031) - sLogSummary = GetResText(2034) - sSumInclusiveSubDir = GetResText(3000) - sSumSaveDocuments = GetResText(3001) - GetApplResourceArray(3200, 3, sSumMSDocuments()) - GetApplResourceArray(3210, 3, sSumMSTemplates()) + sProgressPage_1 = GetResText("ProgressPage1") + sProgressPage_2 = GetResText("ProgressPage2") + sProgressPage_3 = GetResText("ProgressPage3") + sProgressFound = GetResText("ProgressFound") + sProgressPage_5 = GetResText("ProgressPage5") + sReady = GetResText("Ready") + sSourceDocuments = GetResText("SourceDocuments") + sTargetDocuments = GetResText("TargetDocuments") + sLogSummary = GetResText("LogfileSummary") + sSumInclusiveSubDir = GetResText("SumInclusiveSubDir") + sSumSaveDocuments = GetResText("SumSaveDokumente") + sSumMSDocuments(0) = GetResText("SumMSTextDocuments") + sSumMSDocuments(1) = GetResText("SumMSTableDocuments") + sSumMSDocuments(2) = GetResText("SumMSDrawDocuments") + sSumMSTemplates(0) = GetResText("SumMSTextTemplates") + sSumMSTemplates(1) = GetResText("SumMSTableTemplates") + sSumMSTemplates(2) = GetResText("SumMSDrawTemplates") With ImportDialog - sImportLabel = GetResText(1033) - sExportLabel = GetResText(1034) - sSearchInSubDir = GetResText(1022) + sImportLabel = GetResText("TextImportLabel") + sExportLabel = GetResText("TextExportLabel") + sSearchInSubDir = GetResText("SearchInSubDir") .chkTemplateSearchSubDir.Label = sSearchInSubDir .lblDocumentImport.Label = sImportLabel .lblDocumentExport.Label = sExportLabel .chkDocumentSearchSubDir.Label = sSearchInSubDir .lblTemplateImport.Label = sImportLabel .lblTemplateExport.Label = sExportLabel - .chkLogfile.Label = GetResText(2032) - .chkLogfile.Helptext = GetResText(2033) - .cmdShowLogFile.Label = GetResText(2035) + .chkLogfile.Label = GetResText("CreateLogfile") + .chkLogfile.Helptext = GetResText("LogfileHelpText") + .cmdShowLogFile.Label = GetResText("ShowLogfile") End With ModuleList(0) = "com.sun.star.text.TextDocument" ModuleList(1) = "com.sun.star.sheet.SpreadsheetDocument" @@ -139,14 +147,4 @@ Sub LoadLanguage() End If End Sub - -Sub GetApplResourceArray(StartResIndex as Integer, Count as Integer, BigArray()) -Dim i as Integer -Dim a as Integer - a = 0 - For i = StartResIndex To StartResIndex + Count-1 - BigArray(a) = GetResText(i) - a = a + 1 - Next -End Sub </script:module> diff --git a/wizards/source/importwizard/importwi.src b/wizards/source/importwizard/importwi.src deleted file mode 100644 index 8f5fa58c0834..000000000000 --- a/wizards/source/importwizard/importwi.src +++ /dev/null @@ -1,379 +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 sHelpButton 1000 -#define sCancelButton 1001 -#define sBackButton 1002 -#define sNextButton 1003 -#define sBeginButton 1004 -#define sCloseButton 1005 -#define sWelcometextLabel1 1006 -#define sWelcometextLabel3 1008 -#define sMSTemplateCheckbox_1_ 1009 -#define sMSTemplateCheckbox_2_ 1010 -#define sMSTemplateCheckbox_3_ 1011 -#define sMSDocumentCheckbox_1_ 1012 -#define sMSDocumentCheckbox_2_ 1013 -#define sMSDocumentCheckbox_3_ 1014 -#define sSearchInSubDir 1022 -#define sMSContainerName 1030 -#define sSummaryHeader 1031 -#define sTextImportLabel 1033 -#define sTextExportLabel 1034 -#define sGroupnameDefault 1036 -#define sProgressDesc1 1039 -#define sProgressOneDoc 1040 -#define sProgressMoreDocs 1041 -#define sProgressMoreTemplates 1042 -#define sNoDirCreation 1050 -#define sMsgDirNotThere 1051 -#define sQueryfornewCreation 1052 -#define sFileExists 1053 -#define sMorePathsError3 1054 -#define sConvertError1 1055 -#define sConvertError2 1056 -#define sRTErrorDesc 1057 -#define sRTErrorHeader 1058 -#define sOverwriteallFiles 1070 -#define sreeditMacro 1071 -#define scouldNotsaveDocument 1072 -#define scouldNotopenDocument 1073 -#define sPathDialogMessage 1080 -#define sDialogTitle 1081 -#define sProgressPage1 1090 -#define sProgressPage2 1091 -#define sProgressPage3 1092 -#define sProgressFound 1093 -#define sProgressPage5 1094 -#define sReady 1100 - -#define sSourceDocuments 2030 -#define sTargetDocuments 2031 -#define sCreateLogfile 2032 -#define sLogfileHelpText 2033 -#define sLogfileSummary 2034 -#define sshowLogfile 2035 - -#define sSumInclusiveSubDir 3000 -#define sSumSaveDokumente 3001 - -#define sSumMSTextDocuments 3200 -#define sSumMSTableDocuments 3201 -#define sSumMSDrawDocuments 3202 - -#define sSumMSTextTemplates 3210 -#define sSumMSTableTemplates 3211 -#define sSumMSDrawTemplates 3212 - -String sHelpButton -{ - Text [ en-US ] = "~Help"; -}; - -String sCancelButton -{ - Text [ en-US ] = "~Cancel"; -}; - -String sBackButton -{ - Text [ en-US ] = "<< ~Back"; -}; - -String sNextButton -{ - Text [ en-US ] = "Ne~xt >>"; -}; - -String sBeginButton -{ - Text [ en-US ] = "~Convert"; -}; - -String sCloseButton -{ - Text [ en-US ] = "~Close"; -}; - -String sWelcometextLabel1 -{ - Text [ en-US ] = "This wizard convert legacy format documents to Open Document Format for Office Applications."; -}; - -String sWelcometextLabel3 -{ - Text [ en-US ] = "Select the document type for conversion:"; -}; - -String sMSTemplateCheckbox_1_ -{ - Text [ en-US ] = "Word templates"; -}; - -String sMSTemplateCheckbox_2_ -{ - Text [ en-US ] = "Excel templates"; -}; - -String sMSTemplateCheckbox_3_ -{ - Text [ en-US ] = "PowerPoint templates"; -}; - -String sMSDocumentCheckbox_1_ -{ - Text [ en-US ] = "Word documents"; -}; - -String sMSDocumentCheckbox_2_ -{ - Text [ en-US ] = "Excel documents"; -}; - -String sMSDocumentCheckbox_3_ -{ - Text [ en-US ] = "PowerPoint/Publisher documents"; -}; - -String sSearchInSubDir -{ - Text [ en-US ] = "Including subdirectories"; -}; - -String sMSContainerName -{ - Text [ en-US ] = "Microsoft Office"; -}; - -String sSummaryHeader -{ - Text [ en-US ] = "Summary:"; -}; - -String sTextImportLabel -{ - Text [ en-US ] = "Import from:"; -}; - -String sTextExportLabel -{ - Text [ en-US ] = "Save to:"; -}; - -String sGroupnameDefault -{ - Text [ en-US ] = "Imported_Templates"; -}; - -String sProgressDesc1 -{ - Text [ en-US ] = "Progress: "; -}; - -String sProgressOneDoc -{ - Text [ en-US ] = "Document"; -}; - -String sProgressMoreDocs -{ - Text [ en-US ] = "Documents"; -}; - -String sProgressMoreTemplates -{ - Text [ en-US ] = "Templates"; -}; - -String sNoDirCreation -{ - Text [ en-US ] = "The '%1' directory cannot be created: "; -}; - -String sMsgDirNotThere -{ - Text [ en-US ] = "The '%1' directory does not exist."; -}; - -String sQueryfornewCreation -{ - Text [ en-US ] = "Do you want to create it now?"; -}; - -String sFileExists -{ - Text [ en-US ] = "The '<1>' file already exists.<CR>Do you want to overwrite it?"; -}; - -String sMorePathsError3 -{ - Text [ en-US ] = "Directories do not exist"; -}; - -String sOverwriteallFiles -{ - Text [ en-US ] = "Do you want to overwrite documents without being asked?"; -}; - -String sreeditMacro -{ - Text [ en-US ] = "Document macro has to be revised."; -}; - -String scouldNotsaveDocument -{ - Text [ en-US ] = "Document '<1>' could not be saved."; -}; - -String scouldNotopenDocument -{ - Text [ en-US ] = "Document '<1>' could not be opened."; -}; - -String sConvertError1 -{ - Text [ en-US ] = "Do you really want to terminate conversion at this point?"; -}; - -String sConvertError2 -{ - Text [ en-US ] = "Cancel Wizard"; -}; - -String sRTErrorDesc -{ - Text [ en-US ] = "An unexpected error has occurred in the wizard."; -}; - -String sRTErrorHeader -{ - Text [ en-US ] = "Error"; -}; - -String sPathDialogMessage -{ - Text [ en-US ] = "Select a directory"; -}; - -String sDialogTitle -{ - Text [ en-US ] = "Document Converter"; -}; - -String sProgressPage1 -{ - Text [ en-US ] = "Progress"; -}; - -String sProgressPage2 -{ - Text [ en-US ] = "Retrieving the relevant documents:"; -}; - -String sProgressPage3 -{ - Text [ en-US ] = "Converting the documents"; -}; - -String sProgressFound -{ - Text [ en-US ] = "Found:"; -}; - -String sProgressPage5 -{ - Text [ en-US ] = "%1 found"; -}; - -String sReady -{ - Text [ en-US ] = "Finished"; -}; - -String sSourceDocuments -{ - Text [ en-US ] = "Source documents"; -}; - -String sTargetDocuments -{ - Text [ en-US ] = "Target documents"; -}; - -String sCreateLogfile -{ - Text [ en-US ] = "Create log file"; -}; - -String sLogfileSummary -{ - Text [ en-US ] = "<COUNT> documents converted"; -}; - -String sLogfileHelpText -{ - Text [ en-US ] = "A log file will be created in your work directory"; -}; - -String sshowLogfile -{ - Text [ en-US ] = "Show log file"; -}; - -String sSumInclusiveSubDir -{ - Text [ en-US ] = "All subdirectories will be taken into account"; -}; - -String sSumSaveDokumente -{ - Text [ en-US ] = "These will be exported to the following directory:"; -}; - -String sSumMSTextDocuments -{ - Text [ en-US ] = "All Word documents contained in the following directory will be imported:"; -}; - -String sSumMSTableDocuments -{ - Text [ en-US ] = "All Excel documents contained in the following directory will be imported:"; -}; - -String sSumMSDrawDocuments -{ - Text [ en-US ] = "All PowerPoint/Publisher documents contained in the following directory will be imported:"; -}; - -String sSumMSTextTemplates -{ - Text [ en-US ] = "All Word templates contained in the following directory will be imported:"; -}; - -String sSumMSTableTemplates -{ - Text [ en-US ] = "All Excel templates contained in the following directory will be imported:"; -}; - -String sSumMSDrawTemplates -{ - Text [ en-US ] = "All PowerPoint templates contained in the following directory will be imported:"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |