Add characters and words counts to editor#1478
Conversation
482ac07 to
78ad8b8
Compare
Use 'input' instead of 'change keyup paste' Co-authored-by: Dominik Schilling <[email protected]>
Use number_format_i18n() Co-authored-by: Dominik Schilling <[email protected]>
Use number_format_i18n() Co-authored-by: Dominik Schilling <[email protected]>
Supports the words type set in the installed language
…nslations for the same original ID
|
@ocean90 The PR already uses the Gutenberg/core package Also handles languages where word count is based on single characters, but reads the setting from the site language settings. It would make much more sense to use a GP_Locale property to allow reading wordcounts based on the translation set instead of one single site setting for all GP_Locales. Would it make sense to add it as a GP_Locale property instead? |
For the translation that definitely doesn't make sense so having this setting as part of |
Yes, I'll wait for it to be merged. Will have to check wich alphabets use the words/characters for count. |
|
@ocean90 do you mean we should add a property |
Done @pedro-mendonca |
|
Also done, added the property in #1482 |
|
@ocean90 the PR now reads the newly added |
What?
Add Characters and Words counting to string editor
Fixes #1474
How?
Add counts below the string, on opening the editor row or when the input data changes, for every singular/plural textareas.
GP_Locale->word_count_typesetting added in Add word count type to each Locale #1482Screenshots or screencast
This JavaScript isn't prepared for i18n yet to avoid conflicts with previous PR #1369Will be fixed after the PR merge.
This JavaScript is already prepared for i18n.