1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: makeLokaleTxt.bas,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:43:17 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* Owner : wolfram.garten@sun.com
36 '* short description : Graphics: get language dependant strings
38 '\******************************************************************
40 '/// run this script, if you are testing a new language. ///'
41 '/// it will add all relevant strings to the file qatesttool/graphics/tools/locale_1.txt ///'
42 '/// you just have to make sure, that every language only appears once in the file! ///'
44 public glLocale (15*20) as string
51 use
"graphics\tools\id_tools.inc"
52 use
"graphics\optional\includes\impress\i_slideshow.inc"
53 use
"graphics\optional\includes\impress\i_slideshow2.inc"
54 use
"graphics\optional\includes\global\g_stylist.inc" 'format -> stylist
55 use
"graphics\optional\includes\global\g_spellcheck.inc" 'tools
59 if hSetLocaleStrings ( gTesttoolPath
+ "graphics\tools\locale_1.txt" , glLocale () ) = FALSE then
60 warnlog
"Locales file doesn't exist: '" + gTesttoolPath
+ "graphics\tools\locale_1.txt'"
70 printlog
"Current saved strings are: "
71 printlog
"O 1: " + glLocale (1) 'Handouts ' im_103.inc::tViewWorkspaceHandoutView
72 printlog
"O 2: " + glLocale (2) 'Slide ' impress/slideshow.inc::
73 printlog
"O 3: " + glLocale (3) 'Default
74 printlog
"O 4: " + glLocale (4) 'English (USA)
75 printlog
"O 5: " + glLocale (5) 'Background
76 printlog
"O 6: " + glLocale (6) 'German (Germany)
78 '/// LOCALE Slide - 2 ///'
79 S1
= glLocale (2) + " 1"
80 S2
= glLocale (2) + " 2"
81 S3
= glLocale (2) + " 3"
82 S4
= glLocale (2) + " 4"
84 printlog
"Strings from current office: "
86 '(1)tViewWorkspaceHandoutView
91 ' printlog hMenuItemGetText (4)
92 ' ViewWorkspaceHandoutView '/// view background handout ///'
96 glLocale (1) = "Dummy" 'Seitenname.GetText
97 Printlog
"L1: '" + glLocale (1) + "'"
99 ' ViewWorkspaceDrawingView '/// back to view background drawing ///'
101 '(2)tSlideShowInteraction/fGetSlideName
103 if NOT Navigator
.exists
then
104 hTypeKeys
"<SHIFT MOD1 F5>"
106 Kontext
"NavigatorDraw"
107 if NavigatorDraw
.exists (5) then
109 glLocale (2) = left(Liste
.GetSelText
, len(Liste
.GetSelText
)-2)
110 printlog
"L2: '" + glLocale (2) + "'"
112 warnlog
"Navigator not open!"
115 if Navigator
.Exists
then
121 '(3)tFormatStylistTemplateSelect 'stylist.inc::tFormatStylistTemplateSelect
122 gApplication
= "WRITER"
125 if NOT Gestalter
.Exists
then
126 FormatStylesFormatting
129 glLocale (3) = Vorlagenliste
.getSelText
' HID_STYLE_LISTBOX ' get "Default"
130 printlog
"L3: '" + glLocale (3) + "'"
132 gApplication
= "IMPRESS"
134 '(4)ASIANONLY tiToolsSpellcheckError
135 ' no need to exclude eurtopean!
136 ' this entry will get English (USA)
137 ' spellbook language as alternative for not existijng asians one
138 ' tiToolsSpellcheckError
139 gApplication
= "DRAW"
140 hDateiOeffnen (convertPath(gTesttoolpath
+ "graphics/required/input/recht_1.sxd"))
142 hTypeKeys
"<Tab><F2><Mod1 Home><Shift End>"
147 Messagebox
.SetPage TabFont
151 glLocale (4) = LanguageWest
.getSelText
152 printlog
"L4: '" + glLocale (4) + "'"
154 glLocale (4) = Language
.getSelText
155 printlog
"L4: '" + glLocale (4) + "'"
160 gApplication
= "IMPRESS"
162 '(5)tFormatStylistBackground
163 ' stylist only one tabpage area!
164 Dim i
as Integer : Dim AlterWert
as String : Dim NeuerWert
as String : Dim rightentry
as Integer : Dim qd
as Integer : Dim numberofentries
as Integer
167 kontext
"DocumentImpress"
168 if iSprache
<> "36" then
170 if NOT Gestalter
.Exists(1) then
174 Praesentationsvorlagen
.Click
176 for qd
= 1 to Vorlagenliste
.GetItemCount
178 Vorlagenliste
.Select qd
179 Vorlagenliste
.OpenContextMenu
182 if TabArea
.exists
then
186 kontext
"TabVerwalten"
187 if TabVerwalten
.Exists(1) then
191 if TabLinie
.Exists(1) then
194 kontext
"TabSchatten"
195 if TabSchatten
.Exists(1) then
198 kontext
"TabTransparenz"
199 if TabTransparenz
.Exists(1) then
203 if TabFont
.Exists(1) then
206 kontext
"TabFontEffects"
207 if TabFontEffects
.Exists(1) then
210 kontext
"TabEinzuegeUndAbstaende"
211 if TabEinzuegeUndAbstaende
.Exists(1) then
212 TabEinzuegeUndAbstaende
.Close
214 kontext
"TabAusrichtungAbsatz"
215 if TabAusrichtungAbsatz
.Exists(1) then
216 TabAusrichtungAbsatz
.Close
218 kontext
"TabTabulator"
219 if TabTabulator
.Exists(1) then
223 if TabBullet
.Exists(1) then
226 kontext
"TabNumerierungsart"
227 if TabNumerierungsart
.Exists(1) then
228 TabNumerierungsart
.Close
230 kontext
"TabGrafiken"
231 if TabGrafiken
.Exists(1) then
234 kontext
"TabOptionenNumerierung"
235 if TabOptionenNumerierung
.Exists(1) then
236 TabOptionenNumerierung
.Close
242 dim stringname
as string
243 Vorlagenliste
.Select rightentry
244 stringname
= Vorlagenliste
.GetSelText
'(1) 'SelText 'MenuGetItemText(MenugetItemid(1)) '8
245 glLocale (5) = stringname
' "dummy" 'right(stringname, len(stringname)-1)
246 printlog
"L5: '" + glLocale (5) + "'"
250 ' this entry will get German (Germany)
251 gApplication
= "DRAW"
252 hDateiOeffnen (convertPath(gTesttoolpath
+ "graphics/required/input/recht_49.sxd"))
254 hTypeKeys
"<Tab><F2><Mod1 Home><Shift End>"
259 Messagebox
.SetPage TabFont
263 glLocale (6) = LanguageWest
.getSelText
264 printlog
"L6: '" + glLocale (6) + "'"
266 glLocale (6) = Language
.getSelText
267 printlog
"L6: '" + glLocale (6) + "'"
273 gApplication
= "IMPRESS"
275 dim lLocale (15*20) as string ' list, where file gets loaded into
276 dim flocale
as string
278 flocale
= convertPath (gTesttoolPath
+ "graphics\tools\locale_1.txt")
279 ListRead (lLocale (), fLocale
, "UTF8" )
280 ListAppend(lLocale (), iSprache
)
282 ListAppend(lLocale (), glLocale (i
))
284 ListWrite (lLocale (), fLocale
, "UTF8" )
291 use
"global\system\includes\master.inc"
292 use
"global\system\includes\gvariabl.inc"
293 'use "global\tools\includes\optional\t_ole.inc"
294 gApplication
= "IMPRESS"