WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

#40865 closed defect (bug) (fixed)

Strings for city search in community events widget need improvement

Reported by: dimadin Owned by: ocean90
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.8
Component: I18N Keywords: has-patch commit
Focuses: administration Cc:

Description

Two strings for new community events widgets use American cities that should be replaced with cities in places where that particular language is used. I think that it's not clear enough in translators comments that they should be replaced, not translated. Also, one comment is less descriptive than the other one and even less clear.

Another, more important thing is that context is not used for "Cincinnati" even though we don't want its translation but name of other local city.

Attachments (3)

40865.diff (2.4 KB) - added by dimadin 4 weeks ago.
40865.2.diff (2.5 KB) - added by iandunn 4 weeks ago.
Add instructions for situations when no cities have events
40865.3.diff (2.5 KB) - added by iandunn 3 weeks ago.
removes use of esc_attr_x(), tweaks language

Download all attachments as: .zip

Change History (11)

@dimadin
4 weeks ago

#1 @iandunn
4 weeks ago

  • Focuses administration added
  • Keywords has-patch added

These changes sound good to me.

I wonder if we should also add something like this:

...that shows events (test that it matches the expected location before including it). If no cities related to your locale have events, then use cities related to your locale that would be recognizable to most users.

Without that, I'd worry that some translators might just leave the American cities in place when there aren't any cities related to their locale that have events.

#2 @dimadin
4 weeks ago

That is good addition, it wouldn't hurt to have that too.

@iandunn
4 weeks ago

Add instructions for situations when no cities have events

This ticket was mentioned in Slack in #core by iandunn. View the logs.


3 weeks ago

#4 @ocean90
3 weeks ago

I don't see the need for adding a context to the Cincinnati string here. The context function should only be used to distinguish the same string in different contexts like verb/noun. That's not really the case here.

Changing translator comments is fine since it doesn't invalidate existing translations.

#5 @mikeschroder
3 weeks ago

+1 with @ocean90's suggested change.

@iandunn
3 weeks ago

removes use of esc_attr_x(), tweaks language

#6 @iandunn
3 weeks ago

Thanks for pointing that out. 40865.3.diff removes the esc_attr_x() call, and tweaks the language so that both comments are consistent with each other.

#7 @ocean90
3 weeks ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.8

#8 @ocean90
3 weeks ago

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

In 40866:

I18N: Improve translator comments for strings in the community events widget.

Props dimadin, iandunn.
Fixes #40865.

Note: See TracTickets for help on using tickets.