[wp-trac] [WordPress Trac] #28502: 'User deleted' message needs context

WordPress Trac noreply at wordpress.org
Tue Mar 31 11:44:42 UTC 2015


#28502: 'User deleted' message needs context
------------------------------+----------------------------------------
 Reporter:  extendwings       |       Owner:  SergeyBiryukov
     Type:  defect (bug)      |      Status:  accepted
 Priority:  normal            |   Milestone:  4.2
Component:  I18N              |     Version:  3.9.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  administration, multisite
------------------------------+----------------------------------------

Comment (by ocean90):

 I don't like [attachment:28502.3.diff] at it current state.

 Example: `sprintf( _n( 'Theme enabled.', '%s themes enabled.',
 $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) )`
 This looks valid since translators can/should translate `Theme enabled.`
 as `%s theme enabled.`, if the singular string is used for other numbers.

 The same is done in an example on
 https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-
 forms.html#Translating-plural-forms
 {{{
 msgid "One file removed"
 msgid_plural "%d files removed"
 msgstr[0] "%d slika je uklonjena"
 msgstr[1] "%d datoteke uklonjenih"
 msgstr[2] "%d slika uklonjenih"
 }}}

 The only issue is, that GlotPress/translate.wordpress.org will give you a
 dismissable warning about wrongly used placeholders since the original
 (`Theme enabled.)` doesn't include a placeholder. But this is not really a
 core issue, rather GlotPress.

 I agree that the gnu.org example doesn't fit in all our cases, like `1
 post not updated, somebody is editing it.`. Maybe it makes sense to
 introduce a new wrapper function for `_n()` which supports `$singular_one,
 $singular_one_or_more, $plural`.

 I also want to propose a change to strings like `_n( 'Yes, Delete this
 theme', 'Yes, Delete these themes', $themes_to_delete )`.
 When ever we use `_n()` we should pass the number too, even it's not used
 in the English string:
 `sprintf( __( 'Yes, Delete this theme', 'Yes, Delete these themes',
 $themes_to_delete ),  number_format_i18n( $themes_to_delete )`. This will
 allow translators to change the strings based on there plural rules.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28502#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list