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

Using "Keywords" to keep the native block name #11370

Closed
sebastienserre opened this issue Nov 1, 2018 · 10 comments
Closed

Using "Keywords" to keep the native block name #11370

sebastienserre opened this issue Nov 1, 2018 · 10 comments
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 [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@sebastienserre
Copy link
Contributor

sebastienserre commented Nov 1, 2018

Hello,
I'm using WordPress in French but read lots of articles and Tutorials about Gutenberg project in English where Blocks name are the native (English) block name.

When we're using a WordPress in another language than english, it is not easy to find the block as the english name isn't show (it has been translated)

My idea is to automaticcaly add the native name of the block in the keywords params of registerBlockType()

@ocean90 ocean90 added Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks [Package] Block library /packages/block-library labels Nov 3, 2018
@atachibana
Copy link
Contributor

Also the Slash function has some difficulties for non English user. See #10961.
Incremental search of Slash function is effective and fancy, but not for non-English, especially CJK user.

For example, Japanese user have to type a series of keys to select the Image block (=画像 block)

Japanese off -> / -> Japanese on -> ,, (Kana stands only for a sound) -> Space n-times to select 画像 ('Kanji' stands for both meaning and pronunciation) from candidate -> Enter

Keeping native block name is good idea.

@swissspidy
Copy link
Member

Related discussion: #6633.

@gziolo
Copy link
Member

gziolo commented Feb 13, 2019

#13848 has landed which removes the limit of 3 keywords altogether. Now, the question is how to solve this particular issue. What if we take also the machine-generated name used in the process of the registration, apply some sanitization and include it as a keyword? E.g.:

core/paragraph -> paragraph
core/latest-posts -> latest posts
core-embed/slideshare -> slideshare

@gziolo gziolo added this to the WordPress 5.x milestone Feb 13, 2019
@gziolo
Copy link
Member

gziolo commented Feb 13, 2019

/cc @mcsf @youknowriad

@youknowriad
Copy link
Contributor

I'd prefer if we start with keywords added manually instead. Some plugins might generate random names for blocks (dynamically) and these names serve as identifiers which means we shouldn't assume they are meaningful.

@gziolo
Copy link
Member

gziolo commented Feb 13, 2019

Adding non-translatable keywords is also an option. We can start with it.

@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Feb 13, 2019
@mcsf
Copy link
Contributor

mcsf commented Feb 13, 2019

Adding non-translatable keywords is also an option. We can start with it.

I agree, this seems smaller and more predictable. Riad makes a good point about issues in automated generation of keywords.

@swissspidy
Copy link
Member

Adding non-translatable keywords is also an option. We can start with it.

That sounds very dangerous as it might not work for all locales. Keywords simply being a comma separated list (as proposed #6633) is way better as it's more universally applicable.

@mcsf
Copy link
Contributor

mcsf commented Feb 15, 2019

If #6633 yields a PR, feel free to close this one in favour of it, @swissspidy.

@gziolo
Copy link
Member

gziolo commented Apr 10, 2019

Let's close this issue in favor of #6633.

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 [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants