Enclose literal values in double quotes

Sometimes literal values, values that should not be translated but entered by the user exactly as they are, need to be described in messages. In these cases, please always enclose the literal values in quotes, preferably Unicode double quotes to ensure a common style. In other words, don’t do messages like this:

   <long>
     The default sort-order for the items in the icon view. Possible
     values are name, size, type, modification_date, and emblems.
   </long>

Instead, enclose the literal values in double quotes:

   <long>
     The default sort-order for the items in the icon view. Possible
     values are “name”, “size”, “type”, “modification_date”, and “emblems”.
   </long>

The reason for this is that this helps avoid accidental translation of these values when the message is translated. It also makes it more obvious to a user that these are literal values, to be entered exactly as they are quoted.

This is especially common in DConf strings. Translators might (should) be testing for values between quotes being left untranslated using pofilter from the Translate Toolkit, which has a specific test for DConf strings. This only recognizes literal values in double quotes.

TranslationProject/DevGuidelines/Enclose literal values in double quotes (last edited 2018-04-12 08:34:58 by PiotrDrag)