OpenSolaris Translation » Common Mistakes During Translation
en

Common Mistakes During Translation

Common Mistakes During SW Messages Translations

bug.png
By using a CTI tool, strings from resource file used by a particular program are segmented and loaded into CTI. Each key from a resource file is represented as one or more text segments (rows) in CTI editor.
During translation, one can introduce translation issues that may lead to technical problems in a translated application. A list below tries to highlight common issues that sometimes appear during a translation cycle. Those issues are language independent and causes technical issues during integration, deployment or usage. Please note that those common mistakes slow down integration process, because the issues have to be fixed before integration.
This list contains typical issues that happened in previous translation cycles. I expect that the list will grow up as we add more formats and more projects into CTI.

Before You Start

There are several types of resource files that CTI supports. Typically, it is Java properties, Solaris and GNU po files, txt, html, docbook (xml) and many others. Some issues are related to specific format and do not appear in other file types. Therefore it is very important to find out what kind of resource file you translate or verify. Information about file type is shown in 'Available Translation tasks' page where you can see files names.

List of Common Issues

Issue Name Issue Description Examples Resource Files Proposed by
HTML tags Some segments can contain HTML code. A basic rule is not to translate HTML code otherwise the resulting HTML page may be broken.
  • <div class="error">

  • </li>

  • &nbsp; <span class="error">

  • <img src="icons/recaptcha_refresh.png">

Do not translate or modify such text even you may see 'broken' HTML tags (like in the last example)
 
All http://www.opensolaris.org//viewProfile.jspa?id=9264">alesc
Apostrophe If a message has arguments (place holders) such as {0), the message is passed through MessageFormat class. Then any single apostrophe in this message must be duplicated. Otherwise, the single apostrophe will not be displayed and the argument will not work.
  • OK=I was born at my mother''s house in {0}.
    correct output:
    I was born at my mother's house in Japan.

  • NOT_OK=I was born at my mother's house in {0}.
    wrong output:
    I was born at my mothers house in {0}.

Java .properties http://www.opensolaris.org//viewProfile.jspa?id=22187">fuyuki
Placeholders Placeholders are used for replacing text in a program dynamically at runtime (e.g. {0}) . CTI can detect and extract typical placeholders and put them to translated segments automatically. You must follow a format shown in an original English segment however the order of placeholders may be changed according to structure of a sentence for your language.
 
  • NAME=My name is {0}, {1}
    {0}, {1} must be present in a translated file however their positions can be changed

  • installation failed: %s

All http://www.opensolaris.org//viewProfile.jspa?id=9264">alesc
Additional markups Each program can introduce its own markup characters. You need to be careful when you see such markup characters and try to keep the same number of such markups and their position as much as possible.
  • ##Register## to <b>receive updates</b>
    Number and position of '' has to be the same as in the original segment

  • |What is your partner's nickname?
    "|" must appear in a translated text and must be placed at the beginning

All http://www.opensolaris.org//viewProfile.jspa?id=9264">alesc
Shortcuts and Mnemonics Translation of segments with shortcuts/mnemonics is very challenging. Translated application should contain shortcuts/mnemonics and the keys (usually the first letter after '_' or '&") must be unique in a screen where they appear, i.e. one letter assigned as a mnemonic should be used only once.
  • _View, _URL, &Save, Save &All
    Be careful when you see '_' or '&'.

  • English:
    msgid SSL _Key
    msgid SSL _Certificate

  • Correct usage
    msgstr C_lau SSL
    msgstr _Certificat SSL

  • Wrong mnemonic usage (C is duplicated!):
    msgstr _Clau SSL
    msgstr _Certificat SSL

  • Japanese Translation
    msgstr SSL Key(_K)
    msgstr SSL Certificate(_C)

All http://www.opensolaris.org//viewProfile.jspa?id=109164">rbuj
Variables Some documents may contain variables that are used (replaced) during documentation creation. The rule is not to translate such variables and keep them as they are in an original segment.
  • {1}This manual describes version &appversion; of &appname;.
    "&appversion;" and "&appname;" are variables that should not be translated. Also keep '&;' and ';' in the exact position as in original file (e.g. no additional spaces)
docbook
xml
http://www.opensolaris.org//viewProfile.jspa?id=109164">rbuj
Missing quotes in multiple lines When a msgstr consists of multiple lines, note that the first and last double quotations (") may be omitted in Original Segment in CTI.
You need to
keep the double quotations as same as the original or you can also remove all double quotations in Translated Segment. Also you should keep space/tab characters as same as the original.
  • Original message in po-resource file
    msgid "Usage: %s\n"
               "    %s -f <filename>\n

  • Original Segment in CTI (missing the 1st and the last quote):
               Usage: %s\n"
               "    %s -f <filename>\n

  • Correct Translated Segment in CTI:
               使用方法: %s\n"
               "    %s -f <ファイル名>\n
    or (also OK - no quotes, keeping tabs):
               使用方法: %s\n
                    %s -f <ファイル名>\n

  • WRONG Translated Segment in CTI:
               "使用方法: %s\n"
               " %s -f <ファイル名>\n"

There are missing tab/spaces in the 2nd row in the wrong segment. Moreover extra " appears at the beginning and at the end.

.po files http://www.opensolaris.org//viewProfile.jspa?id=22187">fuyuki
Parameters order How to change the order of % parameters in translation for .po file. You can identify the order of the parameters by using %x$y notation. See
  • man fprintf
  • File %s is equal to file %s on disk %d. This has the same meaning with below.

  • File %1$s is equal to file %2$s on disk %3$d. You can change the order in translation like below.

  • %1$s ファイルはディスク %3$d 上の %2$s ファイルと同等です。

.po files http://www.opensolaris.org//viewProfile.jspa?id=22187">fuyuki
Whitespaces Some source segments may contain white spaces at the beginning or at the end of the segment. The rule is to follow and use exactly the same number of whitespaces in target translated segment, unless you know how the white spaces are used on applicable running software when displaying the segment.
Also, if you find some already-translated segment contains such white spaces, do not change number of the white spaces unless you know how the whitespaces are used in SW. The number of white spaces might have been adjusted to work with translated string well.

Note: Current version of http://translate.sun.com/opencti>OpenCTI contains a bug that disallow displaying white spaces (see more the bug http://kenai.com/jira/browse/CTI-108">CTI-108. For review/translation, please use http://translate.sun.com">Old CTI.
  • Translated segment:
    msgid " Summary:"
    msgstr " Resumen:"

any SW file https://auth.opensolaris.org/info/userProfile.action?userId=55">asano

Language Style Guides

In addition to technical aspects, we recommend to use Style guides that are available and specific to a particular language.
Language Style Guides:
General Overview
Style Guides

If you have any comment or suggestion, please send them to i18n-discuss or directly to Ales Cernosek. Last update: 07/2009.

Tags:
Created by admin on 2009/10/26 12:08
Last modified by Reiko Saito on 2011/02/21 06:42

Collectives


XWiki Enterprise 2.7.1.34853 - Documentation