Ticket #22013: 22013.diff
| File 22013.diff, 1.6 KB (added by , 13 years ago) |
|---|
-
l10n.php
65 65 * @return string Translated text 66 66 */ 67 67 function translate( $text, $domain = 'default' ) { 68 $translations = &get_translations_for_domain( $domain );68 $translations = get_translations_for_domain( $domain ); 69 69 return apply_filters( 'gettext', $translations->translate( $text ), $text, $domain ); 70 70 } 71 71 … … 78 78 } 79 79 80 80 function translate_with_gettext_context( $text, $context, $domain = 'default' ) { 81 $translations = &get_translations_for_domain( $domain );81 $translations = get_translations_for_domain( $domain ); 82 82 return apply_filters( 'gettext_with_context', $translations->translate( $text, $context ), $text, $context, $domain ); 83 83 } 84 84 … … 236 236 * @return string Either $single or $plural translated text 237 237 */ 238 238 function _n( $single, $plural, $number, $domain = 'default' ) { 239 $translations = &get_translations_for_domain( $domain );239 $translations = get_translations_for_domain( $domain ); 240 240 $translation = $translations->translate_plural( $single, $plural, $number ); 241 241 return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain ); 242 242 } … … 249 249 * 250 250 */ 251 251 function _nx($single, $plural, $number, $context, $domain = 'default') { 252 $translations = &get_translations_for_domain( $domain );252 $translations = get_translations_for_domain( $domain ); 253 253 $translation = $translations->translate_plural( $single, $plural, $number, $context ); 254 254 return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain ); 255 255 }