WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13706 closed defect (bug) (fixed)

Multisite language file is interpreted incorrectly

Reported by: ocean90 Owned by: nacin
Milestone: 3.0 Priority: high
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description

In my language folder are following files:

  • continents-cities-de_DE.mo
  • de_DE.mo
  • ms-de_DE.mo

The bug: ms-de_DE.mo is interpreted as Malay: http://grab.by/4Irm

HTML Output:

<select id="WPLANG" name="WPLANG">
   <option selected="selected" value="">English</option>
   <option value="de_DE"> German</option>
   <option value="ms-de_DE">Malay</option>
</select>

Attachments (3)

filter-ms.patch (549 bytes) - added by ocean90 10 years ago.
filter-ms.2.patch (579 bytes) - added by ocean90 10 years ago.
check if it's false
filter-ms.3.patch (668 bytes) - added by ocean90 10 years ago.
check only the basename

Download all attachments as: .zip

Change History (13)

#1 @ocean90
10 years ago

  • Keywords needs-patch added

#2 @nacin
10 years ago

  • Owner set to nacin
  • Status changed from new to accepted

@ocean90
10 years ago

#3 @ocean90
10 years ago

  • Keywords has-patch added; needs-patch removed

I don't know if filter-ms.patch will affect the real ms language file.

#4 @nacin
10 years ago

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

(In [15118]) Let's not emphasize that multisite might as well be its own language. fixes #13706.

#5 @ocean90
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

nacin, sry, your patch doesn't work.

var_dump(strpos( $lang_file, 'ms-' )) => int(44) != 0 => will be added to $languages[]

@ocean90
10 years ago

check if it's false

#6 @ryan
10 years ago

strpos is returning 44? That is odd.

#7 @ocean90
10 years ago

Yes, why not: H:\xampplite\htdocs\wp/wp-content/languages/ms-de_DE.mo

#8 @ryan
10 years ago

Full path, gotcha. Since our lang files usually use underscores, ms_MY, I think this is safe.

#9 @ryan
10 years ago

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

(In [15137]) Fix ms lang file check. Props ocean90. fixes #13706

@ocean90
10 years ago

check only the basename

#10 @ryan
10 years ago

(In [15138]) Better ms lang file check. Props ocean90. fixes #13706

Note: See TracTickets for help on using tickets.