Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#11851 closed defect (bug) (fixed)

Inserting gallery columns is broken in localized versions

Reported by: pavelevap Owned by: nbachiyski
Milestone: 3.0 Priority: high
Severity: normal Version: 2.9.1
Component: I18N Keywords:
Focuses: Cc:


Inserting gallery columns does not work well in Czech version. There should be numbers from 2 to 9 columns (with default 3), but there are only numbers from 4 to 9 (and 5 is default). And when you select 4, then there are only 2 columns inserted:

[gallery columns="2"]

In this example I had 3 images attached to post.
There is strange HTML:

<td class="field">
<select id="columns" name="columns">
<option value="2">4</option>
<option selected="selected" value="3">5</option>
<option value="4">6</option>
<option value="5">7</option>
<option value="6">8</option>
<option value="7">9</option>
<option value="8">8</option>
<option value="9">9</option>

Only Czech version is affected, English version works well. In .po file are all numbers the same (English = Czech).

Attachments (1)

11851.diff (1.3 KB) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (10)

#1 @TobiasBg
12 years ago

  • Summary changed from Inserting gallery columns does not work well in Czech version to Inserting gallery columns is broken in localized versions

I can confirm this for a WP 2.9.1 with (official) German language files.

On a WP 2.9.1 with no language file (i.e. in English) everything is fine though.

No media related plugins are installed.

The .po file looks fine though, numbers are translated to themselves, i.e. 7 = 7.

The HTML from above is generated here: http://core.trac.wordpress.org/browser/tags/2.9.1/wp-admin/includes/media.php#L1760
That's the only occurance according to grep.

12 years ago

#2 @nacin
12 years ago

  • Keywords has-patch needs-testing added

These are the only instances in core of __() or _e() being used for numbers. Something tells me these should be instead handled via number_format_i18n().

#3 @nacin
12 years ago

  • Milestone 2.9.2 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing as duplicate of #11954, which has a patch from nbachiyski.

#4 @nbachiyski
12 years ago

If anybody is interested why this happened: http://trac.glotpress.org/changeset/375

#5 @nacin
12 years ago

  • Keywords has-patch needs-testing removed
  • Milestone set to 2.9.2
  • Priority changed from normal to high
  • Resolution duplicate deleted
  • Status changed from closed to reopened

This should be handled in the 2.9 branch then, re-opening in the next 2.9 milestone for visibility.

#6 @nbachiyski
12 years ago

The POMO library should be updated 2.9. That will fix the bug there.

#7 @nacin
12 years ago

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

(In [14259]) Fix gallery column counts for localized versions, which exposed a bug in pomo. fixes #11851 for 2.9.

#8 @nacin
11 years ago

  • Milestone 2.9.3 deleted

Milestone 2.9.3 deleted

#9 @nacin
11 years ago

  • Milestone set to 3.0
Note: See TracTickets for help on using tickets.