Opened 3 years ago
Closed 3 years ago
#55669 closed defect (bug) (fixed)
Translatable strings ending with space, otherwise identical to other strings
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | minor | Version: | 6.0 |
Component: | Text Changes | Keywords: | needs-patch i18n-change |
Focuses: | javascript, administration | Cc: |
Description
Version 6.0 (not listed yet)
wp-includes/js/dist/block-library.js:9610 "Response to "
wp-includes/js/dist/block-library.js:9611 "responses to "
wp-includes/js/dist/block-library.js:9612 "Responses to "
Can these be normalized by moving the trailing space outside translation function?
Change History (17)
This ticket was mentioned in Slack in #polyglots by knutsp. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-editor by peterwilsoncc. View the logs.
3 years ago
This ticket was mentioned in Slack in #polyglots by cbravobernal. View the logs.
3 years ago
#5
@
3 years ago
Thanks! Gutenberg PR to fix the issue now available: https://github.com/WordPress/gutenberg/pull/40817
This ticket was mentioned in Slack in #polyglots by cbravobernal. View the logs.
3 years ago
#7
@
3 years ago
This is not only related to blocks!
It is a general problem in projects as well. Original strings should not start or end with a blanc. They are not visible in GlotPress at least the ending one not. So translators omit them, thus causing the translation not shown properly
This ticket was mentioned in Slack in #core by costdev. View the logs.
3 years ago
#9
@
3 years ago
@psmits1567 Are there other instances you've found of trailing spaces in strings for translation in WordPress core? Could you point us to them if so? Thanks.
#10
@
3 years ago
@johnbillion not in core, but in themes, plugins
For those I have currently no examples on hand.
#11
follow-up:
↓ 15
@
3 years ago
One more PR that fixes a similar i18n issue with the Post Comments block: https://github.com/WordPress/gutenberg/pull/40849
#12
@
3 years ago
- Keywords i18n-change added
- Milestone changed from Awaiting Review to 6.0
- Version set to trunk
This ticket was mentioned in Slack in #core by chaion07. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#15
in reply to:
↑ 11
@
3 years ago
Replying to Bernhard Reiter:
One more PR that fixes a similar i18n issue with the Post Comments block: https://github.com/WordPress/gutenberg/pull/40849
Replying to swissspidy:
The culprit code is here:
The Post Comment block's post title translations fix was committed in [53377] and [53378] as part of #55567 and was backported to 6.0 branch [53381] for 6.0 RC2.
Better yet, these strings should use proper
%s
placeholders and translator comments.String concatenation and strings with trailing spaces are definitely discouraged.
The culprit code is here:
https://github.com/WordPress/gutenberg/blob/fa456ec87bb6504f0c116ef4e759e74b8873a4ff/packages/block-library/src/comments-title/edit.js#L139-L153