]> git.sesse.net Git - vlc/blob - doc/strings.txt
* Added the 'documentation' on strings in our source code and also added
[vlc] / doc / strings.txt
1 Some basic rules and guidelines for handling strings in VLC source code:
2
3 - Determine wether your string is user visible (GUI string) or not.
4
5 - _("") makes a string translatable and also actually does translation (calls gettext)
6 -  _NS("") is the macosx variant of _(""). it is a short of [NSApp localizedString: ""] There is also a [NSApp delocalizeString:@""] OSX is entirely UTF8 native.
7
8 - N_() only makes a string translatable. it is safe to use it in #defines and in arrays. Also use this when translating strings during the creation of config variables.
9
10 - User visible strings should start with a capital. (Module descriptions for instance)
11
12 - Sentences should end with a '.'
13
14 - Menu-items with multiple words Should Uppercase the Big Words (look at your windows/IE menus) (only menu-items)
15
16 - msg_* should not be translated and don't have strict punctuation (no . or capitals).
17
18 - Write correct american english.
19
20 - Beware of duplicity with strings that already occur in other files. Use those when possible.
21
22 - When writing descriptions (especially for config options) make the string descriptive. Think to yourself: If the user reads this, will it help him understand this?
23
24 - Config options short descriptions should contain range and unit of the option when appropriate. ( 0-360 degrees) ( Hz )
25
26 - mms:// http:// UDP RTP are things that don't need translation, neither do variables, config options, module names and module shortcuts.
27
28 - Consistent use of terminology throughout the sourcecode
29
30 - Try to keep strings UTF8 where possible, to make sure a string can be displayed in chinese just as easily as in english in your window.
31
32 - wxU is used for c UTF8 strings to unicode conversion. wxL2U transforms from current locale to unicode.
33
34