WordPress.org

Making WordPress.org

Opened 11 days ago

Last modified 4 days ago

#5923 new enhancement

Use `prepare_original()` in editor for strings with plurals as well

Reported by: vladytimy Owned by:
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)

5923.patch (1.2 KB) - added by vladytimy 11 days ago.

Download all attachments as: .zip

Change History (3)

@vladytimy
11 days ago

#1 @vladytimy
11 days ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #polyglots by evarlese. View the logs.


4 days ago

Note: See TracTickets for help on using tickets.