Directory

Unset heading text-wrap for ja by mkismy · Pull Request #123 · WordPress/wporg-parent-2021 · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unset heading text-wrap for ja #123

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

mkismy
Copy link
Contributor

@mkismy mkismy commented Jan 24, 2024

In #119 text-wrap was implemented.

However since this is causing unexpected line break especially on headers in Japanese like #120 (comment) , I unset the css variable.
Chinese and Korean probably has the same issue but it is out of this scope since I'm a stranger.

cc @t-hamano

Screenshots

Before After
localhost_8898_2024_01_hello-world_ localhost_8898_2024_01_hello-world_ (1)

FYI this change was discussed in the Japanese Slack.

@t-hamano
Copy link

@mkismy is a member of the Japanese community and discussed this issue in advance in the Japanese Slack channel. I think this change makes sense, at least for Japanese.

In English, there are always spaces between words. Perhaps text-wrap:balance takes up that space and never cuts the word.

In Japanese, on the other hand, there are no spaces in sentences. We divide words by mentally determining whether they are nouns or verbs, etc. based on the context of the entire sentence and the surrounding characters. However, text-wrap:balance doesn't seem to be ideal, at least in Japanese, and can sometimes cut off text that it recognizes as words.

If line breaks are required, we have the option of injecting a br tag on GlotPress.

@ryelle ryelle added the i18n Translations, RTL issues label Jan 24, 2024
@ryelle
Copy link
Contributor

ryelle commented Jan 25, 2024

If we add this, it changes the balance of headings on the homepage, too. I've taken some screenshots of this PR applied to my sandbox, so you can see it on real content. Does this still look like you expect?

HomeAlt heading 2Alt heading

On the news & single pages, it looks like this:

news

single

@t-hamano
Copy link

Thank you for showing me the screenshot. To me, all the screenshots all look as expected.

Just to be sure, I will send a ping to @miminari and @nukaga who were involved in creating the Japanese version design file.

Copy link
Contributor

@ryelle ryelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and has team approval, so I'll merge this today 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Translations, RTL issues
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants