Making WordPress.org

Opened 2 months ago

Last modified 2 months ago

#5643 new defect

Allow certain locales to remove certain HTML tags in translations

Reported by: dd32 Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords:


Certain translations (for example, Japanese) don't include italics in the language and so the italics tags are removed from translations to ensure proper display of the text.

Currently this means that any translations for #ja with <em> or <i> in the original will always trigger a warning, even when it's not an issue.

I'm not sure of the full list of languages which have no italic formatting, but I believe it's common with non-roman asian languages more-so than european non-roman languages.

This is particularly of concern, as it has currently meant that any translation which is forced to remove a tag (and then ignore the warning) hasn't had the rest of the HTML in the translation verified.

Change History (5)

#1 @dd32
2 months ago

In 10731:

Translate: Japanese doesn't need <em> tags, don't trigger a warning when it's missing.

See #5643.

#2 follow-up: @Nao
2 months ago

Could you exclude <i> in addition to <em>?

CSS Fonts Module Level 4 doc says:

Note: Many scripts lack the tradition of mixing a cursive form within text rendered with a normal face. Chinese, Japanese and Korean fonts almost always lack italic or oblique faces.

I'll ask others about it as well.

#3 in reply to: ↑ 2 @dd32
2 months ago

Replying to Nao:

Could you exclude <i> in addition to <em>?

Already done in [10731] :)

Chinese, Japanese and Korean fonts

That was my initial list too, based on the string-length exceptions, but I couldn't find anything specific that listed it.

The string-length exceptions applies to Emoji, Japanese, and: 'ko', 'zh', 'zh-hk', 'zh-cn', 'zh-sg', 'zh-tw'

I'll ask others about it as well.


#4 @f2010525
2 months ago

Chinese doesn't need <em> and <i> tags, Used less. I will remove the tags when translating.

#5 @dd32
2 months ago

In 10739:

Translate: Allow Korean and chinese locales to skip emphasis/italic HTML tags in translations.

Follow up to [10731].
See #5643

Note: See TracTickets for help on using tickets.