Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
style:strings [2008/11/04 10:36] – disclaimer kelnos | style:strings [2008/11/05 21:11] – change translation comment stuff, add punctuation section kelnos |
---|
| |
- Avoid using ''g_strconcat()'' or ''g_strlcpy()''/''g_strlcat()'' to construct contiguous blocks of UI text from smaller strings. This makes things difficult for translators. Use ''g_strdup_printf()'' or ''g_snprintf()'' with a format string. Just because the string fragments are in one order in English, it doesn't mean they'll be in the same order in other languages. Using a format string allows translators to rearrange the order of words in the final string. | - Avoid using ''g_strconcat()'' or ''g_strlcpy()''/''g_strlcat()'' to construct contiguous blocks of UI text from smaller strings. This makes things difficult for translators. Use ''g_strdup_printf()'' or ''g_snprintf()'' with a format string. Just because the string fragments are in one order in English, it doesn't mean they'll be in the same order in other languages. Using a format string allows translators to rearrange the order of words in the final string. |
- If seeing a short string of text out of context might be confusing for a translator, include a short context description at the start of the string, and separate it from the "real" string with the pipe character ("''|''"). Gettext will strip off the context for you when displaying the string in the user interface. | - If seeing a short string of text out of context might be confusing for a translator, include a short context description in a comment in the source line right above the string. These comments should get extracted automatically and put in the .pot file for the translator to see. |
- Don't use colloquial language where possible. Many non-native English speakers (including the translators) may not understand your English-language in-joke, and will either translate it incorrectly, or have to waste time asking you what you meant. | - Don't use colloquial language where possible. Many non-native English speakers (including the translators) may not understand your English-language in-joke, and will either translate it incorrectly, or have to waste time asking you what you meant. |
| |
- Capitalize the first letter of each word in window titles (using standard English title capitalization rules; e.g. "a," "of," "the," etc. are not capitalized unless they are the first word). | - Capitalize the first letter of each word in window titles (using standard English title capitalization rules; e.g. "a," "of," "the," etc. are not capitalized unless they are the first word). |
- When describing something to the user in more than a single sentence, capitalize (and punctuate) as you would if you were writing prose. | - When describing something to the user in more than a single sentence, capitalize (and punctuate) as you would if you were writing prose. |
| |
| ==== Punctuation ==== |
| |
| - In general, unless you're writing prose, single-sentence and single-phrase UI elements should not end with a period. |
| - The exclamation mark ("!") should be avoided. If you must use them, never ever ever use more than one of these consecutively. |
| - Question marks ("?") are fine when asking a question, but one is always enough. |
| - Punctuation does not get leading spaces in American English. So "Icon size:" and "Delete file foo?" are both correct, but "Icon size :" and "Delete file foo ?" are incorrect. |
| |
==== Forms of Address ==== | ==== Forms of Address ==== |