WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years 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 6 years ago.
Translate the featured tag with added context
26526.2.diff (3.1 KB) - added by obenland 6 years ago.
26526.3.diff (4.9 KB) - added by lancewillett 6 years 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 6 years ago.
Use get_term_by( 'slug', …
es_ES.mo (10.2 KB) - added by lancewillett 6 years ago.
Spanish MO file for testing
es_ES.po (13.8 KB) - added by lancewillett 6 years ago.
Spanish PO file for testing

Download all attachments as: .zip

Change History (34)

@lancewillett
6 years ago

Translate the featured tag with added context

#1 @lancewillett
6 years ago

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

#2 @lancewillett
6 years 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.

#3 follow-up: @SergeyBiryukov
6 years ago

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

@obenland
6 years ago

#4 follow-up: @ocean90
6 years 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 6 years ago by ocean90 (previous) (diff)

#5 in reply to: ↑ 3 @lancewillett
6 years ago

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

@lancewillett
6 years ago

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

#6 in reply to: ↑ 4 @lancewillett
6 years ago

Replying to ocean90:

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

Great point, fixed this in .3 patch.

@ocean90
6 years ago

Use get_term_by( 'slug', ...

#7 follow-ups: @ocean90
6 years ago

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

#8 in reply to: ↑ 7 @lancewillett
6 years 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.)

#9 in reply to: ↑ 7 ; follow-up: @obenland
6 years 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.

#10 in reply to: ↑ 9 @ocean90
6 years 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. :)

#11 @lancewillett
6 years 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.

@lancewillett
6 years ago

Spanish MO file for testing

@lancewillett
6 years ago

Spanish PO file for testing

#12 @lancewillett
6 years 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

#13 @lancewillett
6 years ago

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

#15 @lancewillett
6 years 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.

#16 @lancewillett
6 years ago

  • Keywords 2nd-opinion dev-feedback removed

#17 @lancewillett
6 years ago

  • Keywords commit added

#18 @nacin
6 years ago

  • Milestone changed from 3.8 to 3.8.1

#19 @pavelevap
6 years 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?

#21 @obenland
6 years 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.

#22 @nacin
6 years ago

  • Milestone changed from 3.8.1 to 3.8.2

#23 @lancewillett
6 years 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?

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


6 years ago

#25 @lancewillett
6 years ago

  • Keywords 2nd-opinion removed

#26 @lancewillett
6 years ago

  • Keywords fixed-major added

#27 @lancewillett
6 years ago

In 27122:

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

#28 @nacin
6 years 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.