Changes between Version 35 and Version 36 of DevelopersGuide/StyleGuide
- Timestamp:
- 2020-03-01T16:02:36+01:00 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/StyleGuide
v35 v36 102 102 }}} 103 103 104 * A translation context can be set with trc(...). Additional hints to translators are given by java comments at the function:104 * A translation context can be set with {{{trc(...)}}}. Additional hints to translators are given by java comments at the function: 105 105 {{{#!java 106 106 /* I18n: house number, street as parameter; place number first for visibility */ … … 110 110 * Use {{{trn(...)}}} to let translators choose the language specific plural: 111 111 {{{#!java 112 msg = trn("Object deleted", "Objects deleted", del.size(); 113 114 // or with placeholders: 115 // 112 116 new JButton(trn(/* I18n: times needed, some name as parameter */ 113 117 "Press {1} {0} times!", n, n, someName)) 118 119 // The English singular source string must be given for identification 120 // even when its logically invalid and won't occur. For consistency 121 // the number placeholder should be set in it. 122 // 123 msg = trn("Combine {0} way", "Combine {0} ways", n, n); 114 124 }}} 115 125 116 In plural segments the placeholders are not mandatory to translators. 117 118 The English singular source string must be given even when a its logically invalid (identification and consistency) : 119 {{{#!java 120 trn("Combine {0} way", "Combine {0} ways", n, n) 121 }}} 126 In plural segments no placeholder is mandatory for translators. 122 127 123 128 ----