WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

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

Download all attachments as: .zip

Change History (34)

#1 @scribu
10 years ago

  • Cc scribu added

#2 follow-up: @scribu
10 years ago

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

#3 in reply to: ↑ 2 @nacin
10 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.

#5 @nacin
10 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.

#6 @toscho
10 years ago

  • Cc info@… added

@nacin
10 years ago

#7 @nacin
10 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.

#8 @nacin
10 years ago

In [19789]:

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

#28 @nacin
10 years ago

In [19823]:

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

#29 @nacin
10 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.

#30 @nacin
10 years ago

In [19825]:

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

#31 @nacin
10 years ago

In [19826]:

Add ru_RU CSS. see #19603.

#32 @nacin
10 years ago

In [19829]:

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

#33 @Jayjdk
10 years ago

*deleted*

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

#34 @duck_
10 years ago

In [19838]:

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

#35 @settle
10 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 10 years ago by settle (previous) (diff)

@settle
10 years ago

Lithuanian CSS

@settle
10 years ago

QuickEdit, not BulkEdit

#36 @tenpura
10 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.

#37 @nacin
10 years ago

In [20692]:

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

#38 @nacin
10 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.

#39 follow-up: @pavelevap
10 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?

#40 in reply to: ↑ 39 @nacin
10 years ago

Replying to pavelevap:

Should I reopen some of these tickets?

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

#41 @pavelevap
10 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.

#42 @SergeyBiryukov
9 years 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.

#43 @nacin
9 years ago

  • Keywords commit added; 2nd-opinion removed

Okay, looks good.

#44 @ryan
9 years 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

This ticket was mentioned in Slack in #polyglots by sergeybiryukov. View the logs.


7 years ago

This ticket was mentioned in Slack in #polyglots by sergeybiryukov. View the logs.


7 years ago

This ticket was mentioned in Slack in #polyglots by sergey. View the logs.


4 years ago

Note: See TracTickets for help on using tickets.