Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#8154 closed defect (bug) (fixed)

Differentiate between plural noun, verb and adjective Spam translations

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: I18N Keywords: i18n has-patch
Focuses: Cc:

Description

Gettext doesn't allow a term to be used both in plural and singular only context. In case it happens only the plural translation is usable.

This is the case wih Spam. We need its plural translation for Right Now and the singular only (as a verb or adjective) in several other places.

Attachments (4)

spam-plural-verb-adjective-collision.diff (2.9 KB) - added by nbachiyski 15 years ago.
more-collisions.diff (8.5 KB) - added by tenpura 15 years ago.
more-collisions.2.diff (6.8 KB) - added by nbachiyski 15 years ago.
more-more-collisions.diff (554 bytes) - added by nbachiyski 15 years ago.

Download all attachments as: .zip

Change History (17)

#1 @tenpura
15 years ago

There seems to be "same text different context" collisions with these text as well:

Comment
Approved
Awaiting Moderation
Post

#2 @tenpura
15 years ago

Sorry,

Comment
Approved
Awaiting Moderation
Post

#3 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9615]) Differentiate between plural noun, verb and adjective Spam translations. Props nbachiyski. fixes #8154

#4 @tenpura
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Should I open a new ticket for "Comment", "Approved", "Awaiting Moderation" and "Post"?
They all have the same type of problem as "Spam".

#5 @tenpura
15 years ago

more-collisions.diff fixes gettext msgid collisions including "Comment", "Approved", "Awaiting Moderation", "Post" and additionally "Spam" that spam-plural-verb-adjective-collision.diff does not cover.
I used _c() for __() and _e() context and simply added "|" to the end of each text in order to differentiate them from __ngettext() type context.

#6 @tenpura
15 years ago

  • Severity changed from normal to blocker

related ticket: #8170

#7 follow-up: @xibe
15 years ago

  • Cc xibe added
  • Keywords needs-patch added; has-patch removed
  • Severity changed from blocker to normal
  • Version set to 2.7

Still can't be translated in latest update (wp/pot) :

  • wp-admin/edit-comments.php: "Comment" list header
  • wp-admin/edit-comments.php "Spam" action (should be marked as verb)
  • wp-admin/edit.php: "Post" list header

Also, Nikolay, while I understand "Spam|verb", "Spam|adjective" makes no sense to me. Wouldn't "Spam|noun" be a better fit?

#8 in reply to: ↑ 7 @nbachiyski
15 years ago

Replying to xibe:

Also, Nikolay, while I understand "Spam|verb", "Spam|adjective" makes no sense to me. Wouldn't "Spam|noun" be a better fit?

In Bulgarian I need to translate them differently. Also, it is not really a noun :-)

#9 @nbachiyski
15 years ago

  • Keywords has-patch added; needs-patch removed

Here is updated patch -- it adds more meaningful contexts.

#10 @westi
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [9835]) Give context to more translations to allow for differentiation between plural noun, verb and adjective translations. Fixes #8154 props nbachiyski.

#11 @nbachiyski
15 years ago

  • Milestone changed from 2.7 to 2.8
  • Resolution fixed deleted
  • Status changed from closed to reopened

#12 @nbachiyski
15 years ago

There is one more collision. - -the string Pending. Found by Kuba Zwolinski.

#13 @azaozz
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [10478]) Fix singular/plural translation collision, props nbachiyski and Kuba Zwolinski, fixes #8154

Note: See TracTickets for help on using tickets.