WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#38876 closed defect (bug) (fixed)

Twenty Seventeen: Edit button label is displayed vertical in some situations in Japanese

Reported by: tg29359 Owned by: davidakennedy
Milestone: 4.7 Priority: low
Severity: minor Version: 4.7
Component: Bundled Theme Keywords: has-screenshots good-first-bug has-patch
Focuses: Cc:

Description

In Japanese, edit button label is displayed vertically in some situations ("edit" in Japanese is "編集"). In other situations, edit button label is displayed horizontally in Japanese. That's somewhat strange.

The vertical situation I guess:

  • set theme to Twenty Seventeen.
  • set site language and user language to Japanese.
  • export Japanese translation files from GlotPress, and rename these files to twentyseventeen-ja.po/twentyseventeen-ja.mo, and upload these files to the directory something like "wp-content/languages/themes/" on the site.
  • assign some widgets to sidebar.
  • view single post blog page with the screen size wide enough to display sidebar.

Attachments (3)

Vertical.png (203.6 KB) - added by tg29359 9 months ago.
vertical screenshot
Horizontal.png (206.3 KB) - added by tg29359 9 months ago.
horizontal screenshot
38876.diff (716 bytes) - added by odysseygate 9 months ago.

Download all attachments as: .zip

Change History (14)

#1 @tg29359
9 months ago

  • Summary changed from Twemty Seventeen: Edit button label is displayed vertical in some situations in Japanese to Twenty Seventeen: Edit button label is displayed vertical in some situations in Japanese

#2 @tg29359
9 months ago

add to the vertical situations: log on the site as editable user, of course.

#3 follow-up: @davidakennedy
9 months ago

  • Keywords reporter-feedback added

@tg29359 Thanks for the report! Can you upload a screenshot here? That way, it's easier to know what we're looking for when trying to reproduce the problem.

@tg29359
9 months ago

vertical screenshot

@tg29359
9 months ago

horizontal screenshot

#4 in reply to: ↑ 3 @tg29359
9 months ago

Replying to davidakennedy:

@tg29359 Thanks for the report! Can you upload a screenshot here? That way, it's easier to know what we're looking for when trying to reproduce the problem.

@davidakennedy
Yes, I can. I attached the screenshots to this ticket.

Last edited 9 months ago by tg29359 (previous) (diff)

#5 @tg29359
9 months ago

  • Keywords reporter-feedback removed

#6 @afercia
9 months ago

  • Keywords has-screenshots added

Worth noting this happens for any language where text wraps character-by-character, since they don't delimit words with spaces. Happens with Chinese and Korean too, or even if "Edit" gets translated with two separate words (see last screenshot where I've just inserted a space in the middle of "Edit").

Ideographic languages can be written in different directions. If standardising to horizontal writing direction is acceptable, then this can probably be fixed easily with white-space: nowrap.

https://cldup.com/Sse-DHJMh7.png

https://cldup.com/hZup4pIEtN.png

https://cldup.com/rhkqjRep1R.png

#7 @tg29359
9 months ago

Standardising to horizontal writing direction is acceptable in this situation. Even though Japanese words are often written vertically, contents of a web-site are usually written horizontally even in Japan.

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


9 months ago

#9 @helen
9 months ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to 4.7
  • Priority changed from normal to low
  • Severity changed from normal to minor

nowrap sounds good to me, milestoning for 4.7, hopefully is a straightforward patch.

@odysseygate
9 months ago

#10 @odysseygate
9 months ago

  • Keywords has-patch added; needs-patch removed

#11 @davidakennedy
9 months ago

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

In 39341:

Twenty Seventeen: Ensure edit button label displays properly in other languages

This bug occurred in any language where text wraps character-by-character, since those languages don't delimit words with spaces. In Japanese, Chinese and Korean, etc., it was possible for the label to be displayed vertically.

Props tg29359, afercia, odysseygate.

Fixes #38876.

Note: See TracTickets for help on using tickets.