#19603 closed task (blessed) (fixed)

Support locale-specific modifications in core

Reported by: nacin Owned by: ryan
Priority: normal Milestone: 3.4
Component: I18N Version:
Severity: normal Keywords: has-patch commit
Cc: scribu, info@…, kaipgis@…, pavelevap@…

Description

(See also #19598, #19599, #19600, #19601, #19602, which lead up to this ticket.)

WordPress should support, maintain, and ship with locale-specific modifications, acting on the advice of the translation teams.

I've gone through i18n.svn.wordpress.org. Some of these modifications include:

  • Targeted custom CSS, such as font family optimizations for Hebrew (Arial), ug_CN, etc.
  • Conversions to Latin characters (sr_RS and I think one other locale).
  • Some current modifications that can be done either with existing gettext, or adding specific gettext cases to core.
  • Some locales have plugins (some of which are extensive) -- in particular, the wp-multibyte-patch (ja), but also cxapelado and transliterado (eo), and wp-jalali (fa_IR).

Attachments (6)

19603.diff (5.0 KB) - added by nacin 16 months ago.
19603-lt_LT.diff (799 bytes) - added by settle 15 months ago.
Lithuanian CSS
19603-lt_LT.2.diff (765 bytes) - added by settle 15 months ago.
QuickEdit, not BulkEdit
19603.press-this-ru_RU.png (31.8 KB) - added by SergeyBiryukov 11 months ago.
19603.press-this.patch (1.4 KB) - added by SergeyBiryukov 11 months ago.
19603.press-this-ru_RU.after.png (30.9 KB) - added by SergeyBiryukov 11 months ago.

Download all attachments as: .zip

Change History (31)

  • Cc scribu added

comment:2 follow-up: ↓ 3   scribu17 months ago

Isn't this what the locale.php file is for, though?

comment:3 in reply to: ↑ 2   nacin17 months ago

Replying to scribu:

Isn't this what the locale.php file is for, though?

Yes, but the idea is to render it unnecessary. I'll be posting to wppolyglots shortly.

More thoughts:

Some locales also override a number of core CSS files (including for TinyMCE and editor styles), so we will need to see why, and act accordingly.

  • Cc info@… added

nacin16 months ago

  • Keywords 2nd-opinion added

Still working on an inventory for all locale modifications. I hope to spin different aspects off into specific tickets. For now, a test of converting to Arial for he_IL, piggybacked on the existing RTL stylesheet - 19603.diff.

In [19789]:

LTR for fields on setup-config.php. see #19603, fixes #18180.

In [19823]:

Translate another http://wordpress.org/ link. see #19603.

I did an initial few sweeps through all locales over the last week. That has resulted in a number of commits across a swath of 3.4 i18n tickets. I've then gone through and cleaned up each i18n directory (in i18n.svn.wordpress.org) that needed it, across around 75 commits.

For every locale that has received a single 3.3 download, all are clear, except the following:

Each locale link goes to their repo. And by "clear," I mean they have at most wp-config-sample.php, a readme, and a license in their language.

In [19825]:

Initial import of localized CSS, for Chinese and Hebrew. see #19603.

In [19826]:

Add ru_RU CSS. see #19603.

In [19829]:

Use translate, not translate with context. props azaozz. see #19603.

[19823] is missing a second argument to the _x() function

The Meta widget creates this warning

Warning: Missing argument 2 for _x(), called in C:\wamp\www\theme\wp-includes\default-widgets.php on line 301 and defined in C:\wamp\www\theme\wp-includes\l10n.php on line 189

Version 0, edited 16 months ago by Jayjdk (next)

In [19838]:

Echo "WordPress.org" as well as translating it in the Meta widget. See #19603.

  • Cc kaipgis@… added

Could you add some lithuanian CSS?
We need some more space for our long words.

/* lt_LT: QuickPress + Bulk Edit */
#dashboard_quick_press .input-text-wrap,
#dashboard_quick_press .textarea-wrap,
#dashboard_quick_press .wp-media-buttons  {
	margin-left: 6.7em;
}
#dashboard_quick_press h4 {
	width: 6.7em;
}
.inline-edit-row fieldset label span.title {
	width: 8em;
}
.inline-edit-row fieldset label span.input-text-wrap {
	margin-left: 8em;
}

And consider making these QuickEdit and QuickPress areas wider be default. It is too narrow for lithuanian, russian and probably some other languages.

Last edited 15 months ago by settle (previous) (diff)

Lithuanian CSS

QuickEdit, not BulkEdit

URL-encoded comment_author_url gets broken by MySQL varchar 200 length limit. Please take a look at #17771 if there is a chance.

In [20692]:

Widen fields for QuickPress and Quick Edit for the lt_LT locale. props settle. see #19603.

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

[20692] also applied to #16515.

Closing this as fixed. There is however quite a bit we still need to do. 3.5 will consist of a second pass.

comment:39 follow-up: ↓ 40   pavelevap12 months ago

  • Cc pavelevap@… added

I found another problem which should be solved in the case of removing locale.php files

http://core.trac.wordpress.org/ticket/10373

Should I reopen some of these tickets?

comment:40 in reply to: ↑ 39   nacin12 months ago

Replying to pavelevap:

Should I reopen some of these tickets?

Yes, please! I have re-opened #10373.

Great, thank you. I would like to mention another open ticket, which is related to locale.php support: http://core.trac.wordpress.org/ticket/13651

We have to use comments_number filter and str_replace() now.

  • Keywords has-patch added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Some ru_RU-specific CSS in [19826] was meant for Press This.

Turned out this wasn't enough, because unlike admin-header.php, press-this.php doesn't apply locale class to <body> element.

Currently Press This looks like this in ru_RU: 19603.press-this-ru_RU.png (sidebar is broken).

19603.press-this.patch fixes the issue: 19603.press-this-ru_RU.after.png.

  • Keywords commit added; 2nd-opinion removed

Okay, looks good.

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

In [21052]:

Add RTL and locale classes to the press this body. Props SergeyBiryukov. fixes #19603

Note: See TracTickets for help on using tickets.