Difference between revisions of "Translating Ad Manager"

From Dot2DotCommunications
Jump to: navigation, search
(Do not tamper with the "\r\n" sequence.)
(Be consistent: use a glossary)
 
(4 intermediate revisions by one user not shown)
Line 9: Line 9:
 
  Serial number: %0\r\nUse expiry: %1\r\nSupport expiry: %2\r\nFaces: %3 (%4 used, %5 left)\r\nPlayers: %6 (%7 used, %8 left).
 
  Serial number: %0\r\nUse expiry: %1\r\nSupport expiry: %2\r\nFaces: %3 (%4 used, %5 left)\r\nPlayers: %6 (%7 used, %8 left).
  
This is text displayed in the About box. <code>%0</code> will be replaced with the serial number, <code>%1</code> - with the expiry date, etc. If the placeholders are tampered with during the translation - e.g. <code>Número de série:% \ 0 \ r termo nUse:% 1 \ r \ termo nSupport: 2% r \ nFaces:% 3% (4 usados, 5% à esquerda) \ r \ nPlayers:% 6% (7 utilizadas,% 8 à esquerda)</code> - then the messages displayed by the software will make no sense at all.
+
This is text displayed in the About box. <code>%0</code> will be replaced with the serial number, <code>%1</code> - with the expiry date, etc.
+
 
 +
If the placeholders are tampered with during the translation - e.g. <code>Número de série:% \ 0 \ r termo nUse:% 1 \ r \ termo nSupport: 2% r \ nFaces:% 3% (4 usados, 5% à esquerda) \ r \ nPlayers:% 6% (7 utilizadas,% 8 à esquerda)</code> - then the messages displayed by the software will make no sense at all.
 +
 
 
=== Do not tamper with the "\r\n" sequence. ===
 
=== Do not tamper with the "\r\n" sequence. ===
 
   
 
   
Line 19: Line 21:
 
=== Use the "&" character correctly. ===
 
=== Use the "&" character correctly. ===
 
   
 
   
The '''&''' (ampersand) character has a special meaning: it turns the character immediately after it into a hotkey.
+
The <code>&</code> (ampersand) character has a special meaning: it turns the character immediately after it into a hotkey.
  
 
For example, <code>&File</code> is a string used in the menu bar; it will be displayed as '''<u>F</u>ile''' and when the user hits '''Alt+F''', the '''File''' menu will drop down.
 
For example, <code>&File</code> is a string used in the menu bar; it will be displayed as '''<u>F</u>ile''' and when the user hits '''Alt+F''', the '''File''' menu will drop down.
Line 36: Line 38:
 
* <code>IDS_FILE</code> is the '''File''' item in the menu bar; <code>IDS_TOOLS</code> is the '''Tools''' item in the menu bar;
 
* <code>IDS_FILE</code> is the '''File''' item in the menu bar; <code>IDS_TOOLS</code> is the '''Tools''' item in the menu bar;
 
* <code>IDS_FILE_OPEN</code> is the '''Open''' command in the '''File''' menu; <code>IDS_FILE_SAVE</code> is the '''Save''' command in the '''File''' menu;
 
* <code>IDS_FILE_OPEN</code> is the '''Open''' command in the '''File''' menu; <code>IDS_FILE_SAVE</code> is the '''Save''' command in the '''File''' menu;
* <code>IDS_DLG_OK</code> is the '''OK''' button on all dialogs; <code>IDS_DLG_CANCEL</code> is the '''Cancel''' button on all dialogs;  
+
* <code>IDS_DLG_OK</code> is the '''OK''' button common to all dialogs; <code>IDS_DLG_CANCEL</code> is the '''Cancel''' button common to all dialogs;  
 
* <code>IDS_DLGADDRESS</code> is the title of the address dialog, <code>IDS_DLGADDRESS_CITY</code> is the '''City''' label in the address dialog.
 
* <code>IDS_DLGADDRESS</code> is the title of the address dialog, <code>IDS_DLGADDRESS_CITY</code> is the '''City''' label in the address dialog.
  
 
+
The ids of strings that belong to the same dialog box have the same prefix (e.g. <code>IDS_DLGADDRESS_</code>). The exception are the common buttons - OK, Cancel, etc.
The ids of strings that belong to the same dialog box have the same prefix (e.g. <code>IDS_DLGADDRESS_</code>). The exception are the common buttons (OK, Cancel, etc.) - try not to use their hotkeys elsewhere in the dialogs.
+
  
 
Hot keys are important for the menus and the common dialog buttons; they are not critical for the rest of the UI.
 
Hot keys are important for the menus and the common dialog buttons; they are not critical for the rest of the UI.
  
If in doubt, it's better to remove the '''&''' altogether.
+
If in doubt, it's better to remove the <code>&</code> altogether.
 +
 
 +
=== Be consistent: build and use a glossary. ===
 +
 
 +
See the [[Glossary|Glossary of Ad Manager terms]].

Latest revision as of 16:37, 20 December 2013

Contents

Rules

Do not tamper with the "%0", "%1", etc. placeholder sequences.

Some of the messages contain placeholders which get replaced at runtime with actual values. The format of the placeholder is %n where n is a number (0, 1, etc.).

Here's an example:

Serial number: %0\r\nUse expiry: %1\r\nSupport expiry: %2\r\nFaces: %3 (%4 used, %5 left)\r\nPlayers: %6 (%7 used, %8 left).

This is text displayed in the About box. %0 will be replaced with the serial number, %1 - with the expiry date, etc.

If the placeholders are tampered with during the translation - e.g. Número de série:% \ 0 \ r termo nUse:% 1 \ r \ termo nSupport: 2% r \ nFaces:% 3% (4 usados, 5% à esquerda) \ r \ nPlayers:% 6% (7 utilizadas,% 8 à esquerda) - then the messages displayed by the software will make no sense at all.

Do not tamper with the "\r\n" sequence.

The \r\n sequence is a special character sequence. It means continue on a new line (see the example above). It should not be tampered with during the translation.

\ r \ n is not a good translation.

Use the "&" character correctly.

The & (ampersand) character has a special meaning: it turns the character immediately after it into a hotkey.

For example, &File is a string used in the menu bar; it will be displayed as File and when the user hits Alt+F, the File menu will drop down.

& Arquivo is not a good translation, because it's going to show up as  Arquivo and the hotkey will be the spacebar.

Some UI elements have standard hotkeys in all programs in a particular language, for example:

  • the menu commands: File: New, Open, Close, Save, Exit, etc.,
  • the common dialog buttons: OK, Cancel, Close, Apply, etc.

The translation should stick to that standard.

All other hotkeys are usually elements in various dialog boxes; for them the translator should try to avoid hotkey duplication, although it's not fatal.

To properly translate hotkeys, you need to understand where the translated text will apear. The string identifiers provide a clue. For example:

  • IDS_FILE is the File item in the menu bar; IDS_TOOLS is the Tools item in the menu bar;
  • IDS_FILE_OPEN is the Open command in the File menu; IDS_FILE_SAVE is the Save command in the File menu;
  • IDS_DLG_OK is the OK button common to all dialogs; IDS_DLG_CANCEL is the Cancel button common to all dialogs;
  • IDS_DLGADDRESS is the title of the address dialog, IDS_DLGADDRESS_CITY is the City label in the address dialog.

The ids of strings that belong to the same dialog box have the same prefix (e.g. IDS_DLGADDRESS_). The exception are the common buttons - OK, Cancel, etc.

Hot keys are important for the menus and the common dialog buttons; they are not critical for the rest of the UI.

If in doubt, it's better to remove the & altogether.

Be consistent: build and use a glossary.

See the Glossary of Ad Manager terms.