Changeset 10767 for trunk/wp-includes/l10n.php
- Timestamp:
- 03/10/2009 11:02:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r10584 r10767 177 177 $translations = &get_translations_for_domain( $domain ); 178 178 $translation = $translations->translate_plural( $single, $plural, $number ); 179 return apply_filters( 'ngettext', $translation, $single, $plural, $number );179 return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain ); 180 180 } 181 181 … … 192 192 $translations = &get_translations_for_domain( $domain ); 193 193 $translation = $translations->translate_plural( $single, $plural, $number, $context ); 194 return apply_filters( 'ngettext_with_context ', $translation, $single, $plural, $number, $context );194 return apply_filters( 'ngettext_with_context ', $translation, $single, $plural, $number, $context, $domain ); 195 195 } 196 196 … … 341 341 } 342 342 343 /** 344 * Translates role name. Since the role names are in the database and 345 * not in the source there are dummy gettext calls to get them into the POT 346 * file and this function properly translates them back. 347 * 348 * The before_last_bar() call is needed, because older installs keep the roles 349 * using the old context format: 'Role name|User role' and just skipping the 350 * content after the last bar is easier than fixing them in the DB. New installs 351 * won't suffer from that problem. 352 */ 353 function translate_user_role( $name ) { 354 return before_last_bar( translate_with_gettext_context( $name, 'User role' ) ); 355 } 343 356 ?>
Note: See TracChangeset
for help on using the changeset viewer.