WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 weeks ago

#26526 closed defect (bug) (fixed)

Twenty Fourteen: translate `featured` tag slug used to link to specific tags in Posts editor

Reported by: lancewillett Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: has-patch commit fixed-major
Focuses: Cc:

Description (last modified by lancewillett)

Reported in #26522 by pavelevap.

Attachments (6)

26526.diff (3.1 KB) - added by lancewillett 4 months ago.
Translate the featured tag with added context
26526.2.diff (3.1 KB) - added by obenland 4 months ago.
26526.3.diff (4.9 KB) - added by lancewillett 4 months ago.
Simplify things by not saying "featured" tag in any long strings, clean up Help text strings
26526.4.diff (5.5 KB) - added by ocean90 4 months ago.
Use get_term_by( 'slug', …
es_ES.mo (10.2 KB) - added by lancewillett 4 months ago.
Spanish MO file for testing
es_ES.po (13.8 KB) - added by lancewillett 4 months ago.
Spanish PO file for testing

Download all attachments as: .zip

Change History (34)

lancewillett4 months ago

Translate the featured tag with added context

comment:1 lancewillett4 months ago

In patch, I'm not sure if the extra esc_url() is needed since, but we should escape the translated tag somehow.

comment:2 lancewillett4 months ago

  • Keywords 2nd-opinion dev-feedback added

I vote we make this change for next minor release, 1.1 of the theme and in 3.8.1 of core.

comment:3 follow-up: SergeyBiryukov4 months ago

Probably worth noting that we tend to avoid new translatable strings in minor releases.

obenland4 months ago

comment:4 follow-up: ocean904 months ago

If we make it translatable we have to distinguish between tag name and tag slug. Since a translation can contain spaces (if two or more words) or have special characters which aren't allowed in a slug. Otherwise edit.php?tag=$name will fail for this translations.

Or change the context, to make it clear that the slug is meant.

Last edited 4 months ago by ocean90 (previous) (diff)

comment:5 in reply to: ↑ 3 lancewillett4 months ago

Thanks obenland, patch .2 uses add_query_arg() to construct the URL and removes unneeded forward slash in the other admin_url() case.

lancewillett4 months ago

Simplify things by not saying "featured" tag in any long strings, clean up Help text strings

comment:6 in reply to: ↑ 4 lancewillett4 months ago

Replying to ocean90:

Or change the context, to make it clear that the slug is meant.

Great point, fixed this in .3 patch.

ocean904 months ago

Use get_term_by( 'slug', ...

comment:7 follow-ups: ocean904 months ago

26526.4.diff replaces get_term_by( 'name', with get_term_by( 'slug',.

comment:8 in reply to: ↑ 7 lancewillett4 months ago

Replying to ocean90:

26526.4.diff replaces get_term_by( 'name', with get_term_by( 'slug',.

I don't think we should change this. Searching by name is a better experience (even though in my own use case the slug and name are the same string, that's not the case with many authors.)

comment:9 in reply to: ↑ 7 ; follow-up: obenland4 months ago

Replying to ocean90:

26526.4.diff replaces get_term_by( 'name', with get_term_by( 'slug',.

We're dealing with to different "states" here. In the links we use the slug, in the customizer default value and the Featured Content tag-name value, we use the name of the tag.

Additionally to what lancewillett mentioned above, the purpose of having a predefined tag is for the off chance that the user might have already posts with that tag. I'm really not sure that off chance will get much improvement if we translate it.

comment:10 in reply to: ↑ 9 ocean904 months ago

Replying to obenland:

We're dealing with to different "states" here. In the links we use the slug, in the customizer default value and the Featured Content tag-name value, we use the name of the tag.

Correct, my mistake. Please ignore .4.diff. :)

comment:11 lancewillett4 months ago

Testing 26526.3.diff with es_ES MO/PO files — working as expected with Spanish destacado tag slug. Will attach file here in case anyone else wants to test with the same language files.

lancewillett4 months ago

Spanish MO file for testing

lancewillett4 months ago

Spanish PO file for testing

comment:12 lancewillett4 months ago

  • Cc pavelevap added
  • Description modified (diff)
  • Milestone changed from Awaiting Review to 3.8
  • Summary changed from Twenty Fourteen: translate `featured` tag used to display posts in Featured Content area to Twenty Fourteen: translate `featured` tag slug used to link to specific tags in Posts editor

comment:13 lancewillett4 months ago

Noting we'll need a POT update as well if this goes in.

comment:15 lancewillett4 months ago

@nacin Can you push a new Twenty Fourteen POT after this is committed, please? I'll need it to package up a ZIP for WordPress.org directory.

comment:16 lancewillett4 months ago

  • Keywords 2nd-opinion dev-feedback removed

comment:17 lancewillett4 months ago

  • Keywords commit added

comment:18 nacin4 months ago

  • Milestone changed from 3.8 to 3.8.1

comment:19 pavelevap4 months ago

It is a pitty, it should go into 3.8 :-(

Thinking about using "pre_option_featured-content" filter hack for our locale. It should work?

comment:21 obenland4 months ago

Since this would change defaults, it could break things if users have tagged posts with featured, relied on the defaults, and never saved the FC settings.

comment:22 nacin3 months ago

  • Milestone changed from 3.8.1 to 3.8.2

comment:23 lancewillett3 months ago

  • Keywords 2nd-opinion added

Discussing in bug scrub today in IRC. I think it's a needed change to improve international, non-English experience in this theme.

The trade-off is we'll break sites that have already tagged posts with featured tag and they update to this version and that tag is no longer the default in their language.

If we're OK with that breaking for those sites -- and if we communicate it clearly in the update notes to help people re-save their FC settings -- I think it should go in.

Note: patch .3 is the commit, not .4.

I'd like a 2nd opinion from core team. @nacin? @dh-shredder?

comment:24 ircbot3 months ago

This ticket was mentioned in IRC in #wordpress-themes by nacin. View the logs.

comment:25 lancewillett3 months ago

  • Keywords 2nd-opinion removed

comment:26 lancewillett3 months ago

  • Keywords fixed-major added

comment:27 lancewillett3 months ago

In 27122:

Twenty Fourteen: translate featured tag slug used to link to specific tags in Posts editor. See #26526.

comment:28 nacin4 weeks ago

  • Milestone changed from 3.8.2 to 3.9
  • Resolution set to fixed
  • Status changed from new to closed

lancewillett and I decided that we would be leaving all bundled theme tickets for 3.9. Given the timeline (and lack of severity) we won't be doing a theme update before then.

Note: See TracTickets for help on using tickets.