Index: trunk/extensions/Babel/Babel.i18n.php |
— | — | @@ -26,6 +26,14 @@ |
27 | 27 | 'babel-5' => 'This user has [[$1|professional]] knowledge of [[$2|$3]].', |
28 | 28 | 'babel-N' => 'This user has a [[$1|native]] understanding of [[$2|$3]].', |
29 | 29 | |
| 30 | + 'babel-0-n' => 'This user has [[$1|no]] knowledge of [[$2|English]] (or understands it with considerable difficulty).', |
| 31 | + 'babel-1-n' => 'This user has [[$1|basic]] knowledge of [[$2|English]].', |
| 32 | + 'babel-2-n' => 'This user has [[$1|intermediate]] knowledge of [[$2|English]].', |
| 33 | + 'babel-3-n' => 'This user has [[$1|advanced]] knowledge of [[$2|English]].', |
| 34 | + 'babel-4-n' => 'This user has [[$1|near native speaker]] knowledge of [[$2|English]].', |
| 35 | + 'babel-5-n' => 'This user has [[$1|professional]] knowledge of [[$2|English]].', |
| 36 | + 'babel-N-n' => 'This user has a [[$1|native]] understanding of [[$2|English]].', |
| 37 | + |
30 | 38 | 'babel-box-cellspacing' => '0', # do not translate or duplicate this message to other languages |
31 | 39 | |
32 | 40 | 'babel-category-prefix' => '', # do not translate or duplicate this message to other languages |
Index: trunk/extensions/Babel/Babel.php |
— | — | @@ -280,13 +280,27 @@ |
281 | 281 | /* Generate the text displayed on the right hand side of the |
282 | 282 | * box. |
283 | 283 | */ |
284 | | - $text = wfMsgExt( "babel-$level", |
285 | | - array( 'language' => $code ), |
| 284 | + |
| 285 | + /* Try the language of the box. |
| 286 | + */ |
| 287 | + $text = wfMsgExt( "babel-$level-n", |
| 288 | + array( 'nofallback', 'language' => $code ), |
286 | 289 | ":Category:{$prefixes['category']}$code-$level{$suffixes['category']}", |
287 | | - ":Category:{$prefixes['category']}$code{$suffixes['category']}", |
288 | | - $name |
| 290 | + ":Category:{$prefixes['category']}$code{$suffixes['category']}" |
289 | 291 | ); |
290 | 292 | |
| 293 | + /* Translation not found, use the generic translation of the |
| 294 | + * highest level fallback possible. |
| 295 | + */ |
| 296 | + if( $text == htmlspecialchars( "<babel-$level-n>" ) ) { |
| 297 | + $text = wfMsgExt( "babel-$level", |
| 298 | + array( 'language' => $code ), |
| 299 | + ":Category:{$prefixes['category']}$code-$level{$suffixes['category']}", |
| 300 | + ":Category:{$prefixes['category']}$code{$suffixes['category']}", |
| 301 | + $name |
| 302 | + ); |
| 303 | + } |
| 304 | + |
291 | 305 | /* Get the directionality for the current language. |
292 | 306 | */ |
293 | 307 | $dir = wfMsgExt( "babel-directionality", |