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

Japanese more tag text overflows in the editor. #8750

Closed
miminari opened this issue Aug 9, 2018 · 3 comments · Fixed by #19745
Closed

Japanese more tag text overflows in the editor. #8750

miminari opened this issue Aug 9, 2018 · 3 comments · Fixed by #19745
Labels
[Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time Internationalization (i18n) Issues or PRs related to internationalization efforts Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@miminari
Copy link
Member

miminari commented Aug 9, 2018

In Japanese, more tag text is overflows in the editor.
'More' is translated as '続きを読む' in Japanese.
But we can just read '続きを' or '続きを読'.

The size attribute of input tag is not work in Japanese (and the other 2 byte languages, maybe)
properly.
So, could you add width of CSS at /core-blocks/more/edit.js ?

I think it better the CSS width value is value.length + 2 em.

Screenshots
screenshot2018-08-09 12 31 34

Desktop:

  • OS: macOS High Sierra 10.13.4
  • Browser: chrome 68.0.3440.106, safari 11.1

Smartphone:

  • Device: iPhoneX
  • OS: iOS
  • Browser safari
  • Version 11.4.1

Additional context

  • version of Gutenberg: 3.4.0
@pento pento added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks Internationalization (i18n) Issues or PRs related to internationalization efforts labels Aug 9, 2018
@pento pento added this to the 3.6 milestone Aug 9, 2018
@pento
Copy link
Member

pento commented Aug 9, 2018

Thank you for the bug report, @miminari! I agree this is not ideal, I'll create a fix for this shortly.

@waviaei
Copy link
Contributor

waviaei commented Dec 9, 2018

Adding update of the screenshot, post 5.0 release, with dash line.

Also, I notice that the value of size attribute is different. How does it differ?

// en
<input type="text" size="10" value="Read more">

// ja
<input type="text" size="6" value="もっと読む">
  • Mac OS: Mojave 10.14.2
  • Chrome 70.0.3538.110
  • WordPress 5.0

2018-12-09 13 05 57

@gziolo gziolo added the Needs Dev Ready for, and needs developer efforts label Apr 24, 2019
@gziolo
Copy link
Member

gziolo commented Apr 24, 2019

It is still an issue. There is some prior work in #8751 done by @pento.

I think it also makes sense to re-share this comment from @aduth from the same PR:

I had an old local branch related to my comment at #8751 (comment) . It works, but not in all browsers. I pushed it up in case it's of any future value:

https://github.com/WordPress/gutenberg/commits/add/autosize-input
Specifically: d5e6eb9

I recall also going down some (evidently not-fruitful) rabbit holes in an attempt to find some solution reliably measure text width. If I recall correctly:

I hope that will help to resolve this issue.

@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time Internationalization (i18n) Issues or PRs related to internationalization efforts Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
5 participants