Making WordPress.org

Opened 4 years ago

Closed 3 years ago

#5643 closed defect (bug) (fixed)

Allow certain locales to remove certain HTML tags in translations

Reported by: dd32's profile dd32 Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords:
Cc:

Description

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 (6)

#1 @dd32
4 years 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
4 years 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
4 years 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.

Thanks!

#4 @f2010525
4 years ago

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

#5 @dd32
4 years ago

In 10739:

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

Follow up to [10731].
See #5643

#6 @ocean90
3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Closing as fixed for now.

Noting that this is now also part of GlotPress, see https://github.com/GlotPress/GlotPress-WP/pull/1243.

Note: See TracTickets for help on using tickets.