Translation of the AOO User Interface
Accelerator keys (mnemonics)
<see mail from Andrea; explain difference with shortcuts like CTRL-O>
How to find a string in my OpenOffice-Installation
<Problem description by example>
<get the application module, link to the section "What File Name and Location Can Tell You" on this page>
<Search identifier in source to get other texts from the same dialog or menu.>
<Verify a candidate by the identifier>
How to find an UI string in Pootle
<Problem description by example> <Using the information from the extended tip>
Using a KeyID
Get a keyID-Build as described in section Getting a KeyID-Build.
Use a keyID-Build to find a string from the UI in Pootle this way:
- Lunch the keyID-build and look up the keyID of the string.
- Get the file localize.sdf in folder /trunk/extras/l10n/source/kid/. Download the file and open it in an editor, or open it directly in your browser. The file large, so it takes a while till your browser shows it. To get the file you can use OpenGrok or ViewVC as well, see section Search in the Source_Code.
- Use the search feature of your editor or browser respectively to find the row, which contains the keyID.
- The fifth column from left contains the identifier of the string, as it is used in source code. Copy it.
- Enter this identifier in the search field in Pootle and check location in the search check boxes. Start search.
What File Name and Location Can Tell You
You will see in the following examples, that the filename and location can tell you a lot. Imagine you need to work on the string "line spacing". A search will give you numerous results. Here are some of them, try to find the part in the UI ;)
The file name tells you from which source directory the strings are collected. Sadly the total overview of the directories at Source_code_directories is not updated to AOO4. <A new version for AOO4 is needed.>
cui derives from common user interface and contains parts that are used by several modules.
tabpages are pages in a dialog.
- paragrph.src The file, which contains the string. Most strings from the UI are defined in .src files. Looking into the source you will see, that this file contains the structure of the dialog. The name "paragrph" sounds like "paragraph", a strong indicator, that this "line spacing" belongs to text formatting. *RID_SVXPAGE_STD_PARAGRAPH The string belongs to a dialog page about paragraphs. The letters RID are an acronym for resource identifier.
- FL_LINEDIST FL might derive from fixed line and LINEDIST from line distance.
- fixedline Now your are sure, it is a fixed line. The string is used to group the dialog page.
Find Show|Hide and More|Less links directly above and below the active translation record. In this light green area, you see strings, which are near to the current one in the source code. They likely belong to the same dialog page.
The string belongs to the formula editor MATH.
- smres.src: "smres" perhaps stands for "star math resource".
- RID_DISTANCEDIALOG The string belongs to a 'distance dialog'.
- .7.2 It is a multi-part dialog. On the first part choose the 7th string and in the next part the 2nd string.
- string "string" is rather generic, here it is an item in a drop-down list.
The string belongs to something with paragraphs and is part of the sidebar.
- ParaPropertyPanel.src The string is in the paragraph panel of the Properties deck.
- RID_SIDEBAR_PARA_PANEL A resource identifier for the paragraph panel of the sidebar.
- TBX_LINESP It belongs to the toolbox line spacing. The property panel has several toolboxes, in most cases drawn in a little bit lighter color with a hairline border. Such toolbox has an internal titel text, but that text is not localized and does not show up on Pootle.
- BT_BTX_LINESP There exist no general rule how to design identifiers. The position in the string shows you, that it is a toolbox item. A toolbox item can be a simple button, but may contain more controls including metric fields.
- toolboxitem The string is a kind of title for the toolboxitem, but it is only visible as simple tooltip. You need to hover with the mouse over the icon to see the string.
In this case you not really lucky. "app" indicates, that it is a collection of strings which belong to more or less independent items. At least you know from the part sw, that it belongs to Writer.
- mn.src "mn" derives from menue.
- MN_TEXT_ATTR It is a menu for text attributes
- MN_FORMAT_LINESPACE A submenu for line spacing
- menuitem It is a text, that is shown in a menu. If you looked into the source file, you would guess that it is the context menu of text in Writer.
This belongs to the Configuration data. They will be stored in the installation directory in share/registry. The user configurations extend these settings.
- GenericCommands.xcu This file contains those commands, which are available in more than one module. For example "save the document" is available in all modules. The file format is XML.
- .GenericCommands.UserInterface.Commands. The elements in the xml format are nested nodes. Compare it with the source extract shown below.
- uno_SpacePara1 This is the inner node. It is the name of the command. The underscore stands in place of a colon.
- Label and value correspond directly to the notation of the xml file.
<oor:component-data oor:name="GenericCommands" ...> <node oor:name="UserInterface"> <node oor:name="Commands"> <node oor:name=".uno:AVMediaPlayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Media Pla~yer</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>9</value> </prop> </node> ... <node oor:name=".uno:SpacePara1" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Line Spacing: 1</value> </prop> ... </node>
The part xml:lang="en-US" causes, that the string Line Spacing: 1 is localized and shows up in Pootle.
The command name is used to reference the command. Such .uno commands are used in several places in the application.
- As Button in a toolbar. The string is shown as simple tooltip and as default text. It is always the same string used, regardless of the toolbar.
- As menu item. The string is used as menu item text. Consider this when translating the term, so that it does not become to wide.
- When you record a macro, the dispatcher uses the command name. Programmer uses it when writing extensions using the API.
- As reference for the extended tips in the built-in help.
- When you customize a toolbar, you see the command name in the lower part of the description.