Make WordPress Core

Opened 16 years ago

Closed 14 years ago

Last modified 14 years ago

#11270 closed defect (bug) (fixed)

Punctuation isn't properly internationalised

Reported by: caesarsgrunt's profile caesarsgrunt Owned by: nbachiyski's profile nbachiyski
Milestone: 3.4 Priority: normal
Severity: normal Version: 2.9
Component: I18N Keywords: has-patch gsoc
Focuses: Cc:

Description

Punctuation should be included in i18n strings, because it is often quite different in foreign languages.

For example, there are several places where exclamation marks are not internationalised.
However, languages such as Spanish also have an exclamation mark at the beginning of the question, whilst there may be languages which do not sue it at all.

An example of this is in wp-admin/comment.php, where the following appears repeatedly :

sprintf(' <a href="%s">'.__('Go back').'</a>!', ...)

Correct alternatives are :

sprintf(' <a href="%s">'.__('Go back!').'</a>', ...)

Or, if you want to keep the punctuation out of the link :

sprintf(__('<a href="%s">Go back</a>!'), ...)

There are other similar i18n punctuation problems scattered throughout WP.

Attachments (1)

11270.diff (1.2 KB) - added by wojtek.szkutnik 16 years ago.

Download all attachments as: .zip

Change History (7)

#1 @scribu
16 years ago

  • Keywords needs-patch added
  • Milestone changed from Unassigned to Future Release

#2 @wojtek.szkutnik
16 years ago

  • Keywords has-patch gsoc added; needs-patch removed

I went through allof 4093 items containing translations (!!), found only two cases

#3 @wojtek.szkutnik
16 years ago

  • Cc wojtek.szkutnik@… added

#4 @ryan
14 years ago

I think most of the places where this happens are where we are trying to avoid putting end punctuation within an anchor.

#5 @nacin
14 years ago

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

In [19782]:

Kill the exclamation points off an error message for easier translation. props wojtek.szkutnik, fixes #11270.

#6 @nacin
14 years ago

  • Milestone changed from Future Release to 3.4

To emphasize what ryan wrote, we try to avoid putting end punctuation within an anchor. Please re-open if there are any other strings with these problems, so we'll deal with them on a case by case basis.

Note: See TracTickets for help on using tickets.