Open swoodipto opened 3 years ago
This is the "Latest Comments" block from core Gutenberg. It's actually working as expected, but perhaps it can be argued that "as expected" is confusing.
The block only shows an excerpt from each comment, as can be seen in the block settings.
The way a excerpt is calculated depends on the language, but in general it's the first 20 words (see get_comment_excerpt()
). However each language can set it's own max number (i.e. something other than 20) and some languages count individual characters as words.
Site language set to `en` (see the English comment is truncated after 20 words) | Site language set to `zh-tw` (each character counts as a word) |
---|---|
![]() |
![]() |
While it's working as expected I thought of a few points
zh-tw
is set to 20 (which is the default), but ja
has been set to 40. A fluent speaker who understands the nuances of the language could submit a change to this translation to "fix" this in future WordPress releases.Block as seen in the editor | Block as seen in the front-end |
---|---|
![]() |
![]() |
@autumnfjeld I'm taking a look at a fix for (3)
Proposed fix for (3) in WordPress/gutenberg#33944
Given the user was surprised by this, perhaps 20 is too short for Chinese? This number can be set on a language-by-language basis.
zh-tw
is set to 20 (which is the default), butja
has been set to 40. A fluent speaker who understands the nuances of the language could submit a change to this translation to "fix" this in future WordPress releases.
@otpidusprime what do you think about leaving this aspect of the issue up to translators. If the current truncation length is set to 20 it presumably means a Chinese speaking person at some point or other has decided that this is an acceptable truncation length. And I'm certainly ill equiped to advocate for this change in the core translations 🙂 Should we leave this as is given it's working as expected, or do you think we should find a way to check whether 20 is good enough?
I've merged the fix for the difference between editor preview and frontend WordPress/gutenberg#33944
@p-jackson This can be moved to Done, ya? Also it looks like the issue/PR aren't automatically linked since PR was in a different repo (at least I think that is what is going on). I've added an explicit reference to this issue in the PR.
@autumnfjeld No doesn't look like we can link PRs in different organisations, but I wouldn't have linked these two anyway. The PR fixes one issue, but doesn't solve the original problem that it was unexpected for the text to be truncated, even though it's by design. We could still make a decision that we're not going to address that though.
Also, Kathy set up a system where issues wouldn't close until they were in production. Instead issues that were waiting for a deploy get the [Status] Fix Inbound
label. The bug fix won't appear on wpcom until the next version of GB is released and then deployed to wpcom.
Fix will ship in Gutenberg 11.4
11.4.1 has been deployed to WordPress.com, however the fix doesn't seem to be working. I think it's something to do with the _locale=site
param not working on wpcom the same way it does on a stand alone site.
Working on fix to wpcom API D66501-code
Steps to reproduce the behavior
zh-cn
,zh-hk
orzh-tw
zh-cn
,zh-hk
orzh-tw
:Context
Reported by a user: 25882904-hc
Browser / OS version
Vivaldi 3.6.2165.36 (Stable channel) (x86_64) / Mac OS Big Sur 11.0.1
Does this happen on simple or atomic sites or both?
Yes, happens on both.
Is there any console output or error text?
Level of impact (Does it block purchases? Does it affect more than just one site?)
Medium
Reproducibility (Consistent, Intermittent) Leave empty for consistent.
Consistent
Screenshot / Video: If applicable, add screenshots to help explain your problem.
Same as above: