#5923 closed enhancement (fixed)
Use `prepare_original()` in editor for strings with plurals as well
Reported by: | vladytimy | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Translate Site & Plugins | Keywords: | 2nd-opinion has-patch |
Cc: |
Description
In the translation-row-preview.php
template, prepare_original()
is used for strings both with a plural and without. See template.
In the translation-row-editor.php
template, prepare_original()
is used only for strings with no plural. See template.
So, the editor for strings with plural are missing this filter that:
- replaces new lines and tab characters with visual symbols. See this example here where only the preview has them, but not the editor.
- wraps non-translatable items with a notranslate class that can be used by various extensions or even GP in the future.
Unless there is a valid reason not to do so, I suggest we apply prepare_original()
to plural originals in editor as well.
Note: Although this inconsistency is present in GlotPress itself as well, we use a custom template for translation-row-editor.php
so the fix for translate.WordPress.org is here. A similar issue will be opened for GlotPress, but we need to fix this on our side.
Attachments (1)
Change History (7)
This ticket was mentioned in Slack in #polyglots by evarlese. View the logs.
3 years ago
#4
@
3 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 11316:
#5
@
3 years ago
I also tested this with glossary entries, https://translate.wordpress.org/projects/wp-plugins/test-plugin-3/dev/en-au/default/?filters%5Boriginal_id%5D=9692098
#6
@
3 years ago
Thank you!
Just opened an issue upstream as well: https://github.com/GlotPress/GlotPress-WP/issues/1291
@vladytimy was an issue opened upstream?