Translation of the AOO User Interface
Accelerator keys (mnemonics)
Some strings contain a "~", like "All ~Pages"; these are meant for keyboard accelerators or mnemonics (i.e., the letters that appear underlined in menus and that can be used, for example, to invoke File - Open with ALT+F, then O).
You can ignore the "~" in newly translated strings: OpenOffice will automatically assign an accelerator to commands, except for a dozen strings that are used in the main menu and that can be found at https://issues.apache.org/ooo/show_bug.cgi?id=122640 (if in doubt, ask on the l10n mailing list).
You can leave existing mnemonics in place: it won't harm.
Note that the automatic assignment will only work for the standard Latin character set (a-z); if your language uses an extended scripts, you will still need to assign mnemonics manually.
This is a list of strings that should have an explicit mnemonics set (i.e., they must contain a "~"). This is for Hindi, but replace "hi" with any other language code to get the right strings.
In the strings to translate you may find both empty strings and strings consisting of just a "-". These strings are no longer used, but still exist in the source.
Nothing to translate in these cases.
How to find a string in my OpenOffice-Installation
For the most basic part, i.e., understanding what application a string comes from, remember that the path can help:
- Strings within "sc" refer to Calc
- Strings within "sw" refer to Writer
- Strings within "sd" refer to Draw or Impress
<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:
- Launch 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 menu.
- 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.