Difference between revisions of "HowTo localize qatesttool environment"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Graphics (Draw, Impress, Gallery))
(Graphics (Draw, Impress, Gallery))
Line 99: Line 99:
 
*  this file is a list of names of th gallery themes.  
 
*  this file is a list of names of th gallery themes.  
 
*  this file will be created when you run gallery.bat the first time. Verify the names and correct them if necessary (see [http://www.openoffice.org/issues/show_bug.cgi?id=74553 issue 74553 as example])
 
*  this file will be created when you run gallery.bat the first time. Verify the names and correct them if necessary (see [http://www.openoffice.org/issues/show_bug.cgi?id=74553 issue 74553 as example])
 +
 +
 +
graphics/tools/locale_1.txt
 +
*  this file defines some strings for testing the spellchecker. There is a block of 6 strings per language
 +
*  run graphics/tools/makeLocaleTxt.bas to add the strings for your locale to this file.
  
  
Line 108: Line 113:
 
         case 49  : jpeg_bkg =  2 : iAnimation =  5 : iSound =  2
 
         case 49  : jpeg_bkg =  2 : iAnimation =  5 : iSound =  2
 
: the comment reads "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" but ATM there is no information how to identify the correct numbers
 
: the comment reads "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" but ATM there is no information how to identify the correct numbers
 +
  
  

Revision as of 18:59, 15 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.)

This is mandatory for each localization that would be released, as the covered tests are part of the release approval process.


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 release tests (update tests)

This tasks would enable your localization to run the releasetests (ooo_releasetest.sh) without warnings that are caused by missing localization in the testtool environment.

This should be done for every localization that is going to be released.


Base

there are only two update tests for Base (located at qatesttool/base/update/ - b_updt.bas and xforms_updt.bas). These have no localization specific code.

There could be warnings about missing databasetypes depending on your environment (e.g. if Evoluiton is not installed) Another warning might be caused by issue 49557.


Chart

The current chart update test (qatesttool/chart/ch_updt.bas) has no localization specific code.

Please note, that implementation for a new chart module is ongoing. So the tests for chart module are likely to be changed.


Calc

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

The current c_updt.bas test does only inform about missing localization support, there are no warnings. So it is up to you to add the support.


calc/update/inc/c_010_.inc

  • Checks some calc functions like accesibility, autocomplete ...
  • there are four checks that need to be added (see issue 74365 as example) :
    • testcase tAutoComplete
      add a case branch to the select case statement for your language. Assign the first letters of the sum-function (including =) to firstChar$ , assign the correct name (including = and parenthesis) of the sum-function to complStr$
    • testcase tNaturalLanguage
      add a case branch to the select case statement for your language. Assign the correct name of the sum-function (including = but without parenthesis) to firstChar$
    • testcase tNextTable
      add a case branch to the select case statement for your language. Assign the default name for new sheets to ichheisse$ (e.g. in en-US the sheets are named Sheet1, Sheet2 ... -> assign "Sheet")
    • testcase tRelativAbsolut
      add a case branch to the select case statement for your language. Assign the default name for new sheets to sheettag$. Assign the name of the sum-function (without = and parenthesis) to function$


calc/update/inc/c_006_.inc

  • Checks resources for menu item tools (e.g. Spellcheck and thesaurus) ...
  • Tests for thesaurus can be added here. but ATM thesaurus tests for OOo builds are disabled (see issue 74366)


Framework

(this is still work in progress)


Graphics (Draw, Impress, Gallery)

this will enable the update tests for Graphics modules (located at qatesttool/graphics/update/) to run in your localized environment.


graphics/update/input/gallery/gal_oo_??.txt

  • this file is a list of names of th gallery themes.
  • this file will be created when you run gallery.bat the first time. Verify the names and correct them if necessary (see issue 74553 as example)


graphics/tools/locale_1.txt

  • this file defines some strings for testing the spellchecker. There is a block of 6 strings per language
  • run graphics/tools/makeLocaleTxt.bas to add the strings for your locale to this file.


graphics/update/inc/global/gallery.inc

  • this includes scripts to thest general gallery functionality
  • in testcase tGallery_GalleryView_Preview and testcase tGallery_GalleryView_Insert you'll find some statements like
   select case iSprache
       case 01   : jpeg_bkg =  1 : iAnimation =  5 : iSound =  2
       case 49   : jpeg_bkg =  2 : iAnimation =  5 : iSound =  2
the comment reads "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )" but ATM there is no information how to identify the correct numbers


(this is still work in progress)

Writer

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.


Math

The current math update test (qatesttool/math/update/m_updt.bas) has no localization specific code.


XML

The current XML update test (xml/update/oasis_graphics_update.bas) has no localization specific code. Depending on your build there might be a warning about missing URL for online Update.

other Tests

(this is still work in progress)

Personal tools