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: basic_dialog_i18n.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:03 $
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 : joerg.skottke@sun.com
36 '* short description : Update test for Basic IDE / Dialog i18n-feature
38 '\******************************************************************************
40 testcase tUpdtBasicDialogI18n
42 '///<h3>Update test for Basic IDE / Dialog i18n-feature</h3>
43 '///<i>Specification: Translation Inside Dialog IDE</i><br>
48 '///+<li>Create a new writer document</li>
49 '///+<li>Open the BASIC organiser</li>
50 '///+<li>Select the document and create a new BASIC module</li>
51 '///+<li>Edit the module</li>
52 '///+<li>Create a new dialog</li>
53 '///+<li>Open the ToolsCollectionBar</li>
55 ' Just in case, this thing is annoying
58 '///+<li>Open a new writer document</li>
61 brc = hInitFormControls( "tDialogI18n" )
63 warnlog( "Failed to open Basic IDE / Dialogs / ToolsCollectionBar" )
67 '///+<li>Click the "Add language" button on the ToolsCollectionBar</li>
68 printlog( "Click Manage Languages on ToolsCollectionBar")
69 kontext "ToolsCollectionBar"
70 ManageLanguage.click()
72 kontext "ManageUILanguages"
73 call dialogtest( ManageUILanguages )
75 '///+<li>Click the "Add" button, this will add a default language</li>
76 printlog( "Add default language, choose preselection")
77 kontext "ManageUILanguages"
80 kontext "SetDefaultLanguage"
81 call dialogtest( SetDefaultLanguage )
83 '///+<li>Select a language at random</li>
84 kontext "SetDefaultLanguage"
85 DefaultLanguageListbox.select( 3 )
87 '///+<li>Leave the dialog with "ok"</li>
88 kontext "SetDefaultLanguage"
89 SetDefaultLanguage.ok()
91 '///+<li>Click "Add" again</li>
92 printlog( "Back on Manage UI Languages Dialog")
93 kontext "ManageUILanguages"
96 kontext "AddUserInterface"
97 call dialogtest( AddUserInterface )
99 '///+<li>Select and check the first language in the list</li>
100 printlog( "Add just another language at random")
101 kontext "AddUserInterface"
102 AddNewControl.typeKeys( "<HOME>" ) ' select first item
103 AddNewControl.typeKeys( "<SPACE>" ) ' check it
105 '///+<li>Leave the dialog with "ok"</li>
106 kontext "AddUserInterface"
107 AddUserInterface.ok()
109 '///+<li>Select the first language in the languages list</li>
110 kontext "ManageUILanguages"
111 PresentLanguages.Select (1)
113 '///+<li>Click "Delete"</li>
114 printlog( "Back on Manage UI Languages Dialog, delete selected language")
115 kontext "ManageUILanguages"
118 printlog( "Confirm delete")
120 call dialogtest( active )
122 '///+<li>Confirm deletion</li>
126 '///+<li>Close "Manage User Interface languages" dialog</li>
127 printlog( "Leave Manage UI Languages Dialog")
128 kontext "ManageUILanguages"
129 ManageUILanguages.ok()
131 '///+<li>Verify that the new translation toolbar is visible</li>
132 printlog( "Verify that the translationbar is visible")
133 kontext "TranslationBar"
134 if ( not TranslationBar.exists() ) then
135 warnlog( "The IDE Translation Toolbar is not visible" )
138 '///+<li>Cleanup: Close ToolsCollectionBar</li>
139 kontext "ToolsCollectionBar"
140 if ( not ToolsCollectionBar.exists() ) then
141 warnlog( "The ToolsCollectionBar is not visible" )
143 ToolsCollectionBar.Close
145 '///+<li>Cleanup: Close the basic IDE</li>
148 '///+<li>Cleanup: Close the document</li>