WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 23 months ago

#19603 closed task (blessed) (fixed)

Support locale-specific modifications in core

Reported by: nacin Owned by: ryan
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch commit
Focuses: Cc:

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 2 years ago.
19603-lt_LT.diff (799 bytes) - added by settle 2 years ago.
Lithuanian CSS
19603-lt_LT.2.diff (765 bytes) - added by settle 2 years ago.
QuickEdit, not BulkEdit
19603.press-this-ru_RU.png (31.8 KB) - added by SergeyBiryukov 23 months ago.
19603.press-this.patch (1.4 KB) - added by SergeyBiryukov 23 months ago.
19603.press-this-ru_RU.after.png (30.9 KB) - added by SergeyBiryukov 23 months ago.

Download all attachments as: .zip

Change History (31)

comment:1 scribu2 years ago

  • Cc scribu added

comment:2 follow-up: scribu2 years ago

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

comment:3 in reply to: ↑ 2 nacin2 years 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.

comment:5 nacin2 years ago

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.

comment:6 toscho2 years ago

  • Cc info@… added

nacin2 years ago

comment:7 nacin2 years 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.

comment:8 nacin2 years ago

In [19789]:

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

comment:28 nacin2 years ago

In [19823]:

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

comment:29 nacin2 years ago

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.

comment:30 nacin2 years ago

In [19825]:

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

comment:31 nacin2 years ago

In [19826]:

Add ru_RU CSS. see #19603.

comment:32 nacin2 years ago

In [19829]:

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

comment:33 Jayjdk2 years ago

*deleted*

Last edited 2 years ago by Jayjdk (previous) (diff)

comment:34 duck_2 years ago

In [19838]:

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

comment:35 settle2 years ago

  • 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 2 years ago by settle (previous) (diff)

settle2 years ago

Lithuanian CSS

settle2 years ago

QuickEdit, not BulkEdit

comment:36 tenpura2 years ago

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

comment:37 nacin2 years ago

In [20692]:

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

comment:38 nacin2 years ago

  • 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: pavelevap2 years 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 nacin2 years ago

Replying to pavelevap:

Should I reopen some of these tickets?

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

comment:41 pavelevap2 years ago

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.

comment:42 SergeyBiryukov23 months ago

  • 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.

comment:43 nacin23 months ago

  • Keywords commit added; 2nd-opinion removed

Okay, looks good.

comment:44 ryan23 months ago

  • 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.