Difference between revisions of "HowTo localize qatesttool environment"

From Apache OpenOffice Wiki
Jump to: navigation, search
(writer update ok - starting with calc)
(Update Tests)
Line 47: Line 47:
  
 
this will enable all the writer update tests (located at qatesttool/writer/update/) to run in your localized environment
 
this will enable all the writer update tests (located at qatesttool/writer/update/) to run in your localized environment
 +
( See [http://qa.openoffice.org/issues/show_bug.cgi?id=74274 issue 74274] as example.)
  
  

Revision as of 17:41, 7 February 2007


For testing of OOo functionality we are using the QATesttool. Although functionality is localization independend in most cases, the testtool environment (the scripts that actually execute the tests) need some basic information about the current localization. These are for instance:

  • information about existance of a localization (that vi_VI is a correct localization for OOo)
  • some strings to pick a string from a localized stringlist (e.g. the name of the file filter for Word 97 files)
  • default settings for localizations (e.g. CTL support is enabled per default for asian(?) languages but nor for western languages)

So - if you like to run the automated tests for your localized builds (and you really should do so) you need to add certain information to the testtool environment.

This page is supposed to collect information about the files you need to change or add.

Provide initial support for a localization

To provide initial support for a localization, you need to tell the testtool environment, that this localization exists and the string for the OOo file filter names. This will enable you to run the first and topten tests without false errors / warnings. ( See issue 73401 as example.)


global/system/inc/iniinfo.inc

  • this file has some basic functions to identify your localization and assigns an internal ID (a integer value that is used within the scripts)
  • look at http://l10n.openoffice.org/languages.html see, what code and MS language ID to use for your localization
    edit iniinfo.inc - you will see some case statements in sub GetLanguageInformation, function ConvertLanguage2, function ConvertLanguage, function ConvertCodeToLanguage and function GetLanguageText. Add new lines of code for your localization.


qatesttool/framework/first/input/filter.txt

  • This file defines the localized string for "All Formats" in the file open dialog
  • Add a new line with the correct string for your localization


qatesttool/global/input/filters/current/OpenOffice.org/filter??.txt

  • This file defines filter names for current OOo default file formats. The ?? in the filename is the code of your localization (e.g. filter84.txt for vi_VI)
  • copy any existing file (e.g. filter1.txt) and change the strings for your localization


qatesttool/global/input/filters/<version>/OpenOffice.org/filter??.txt

  • Filter names for default file types of older OOo / SO versions.
    <version> needs to be replaced by the build-ID of the corresponding codeline (e.g. 569 for StarOffice 5, 645 for OOo 1.1, 680 for OOo 2 )
  • create filter??.txt files in all of the subdirectories and enter the correctly localized strings. Minimum is to create the files in 569 subdir. (These are used to test "alien format" warnings)


qatesttool/framework/first/inc/topten.inc

  • there is localization dependend code in sub CutCopyPaste
  • If your localization does 'not' use CTRL+A to "Select all", you need to define the kexboard shortcut riht at the beginning of this sub

Support for further tests

Writer

Update Tests

this will enable all the writer update tests (located at qatesttool/writer/update/) to run in your localized environment ( See issue 74274 as example.)


writer/update/inc/w_002_.inc

  • this file is used to test Writer edit actions (found in the menu Edit and Insert)
  • in testcase tEditFields you'll see two "Select case iSprache" statements.
    You need to add two case branches for your localization (identified by the numeric language code). The numbers for Feldtyp.Select and Auswahl.Select are the indexes for "Sender" and "Company" in the Insert - Fields - Other... dialog.

other Tests

(this is still work in progress)


Calc

Update Tests

this will enable all the calc update tests (located at qatesttool/calc/update/) to run in your localized environment

(this is still work in progress)


calc/update/


other Tests

(this is still work in progress)

Personal tools