Skip to content

Line Indent support is not common in certain languages #74200

@t-hamano

Description

@t-hamano

What problem does this address?

#73114 added support for text indentation. This support uses the p + p selector, so the first paragraph is skipped from the indent.

Image

While this type of layout may be common practice in Western typesetting, it may not be the case in other languages.

For example, in Japanese, the first paragraph is never skipped. If indentation is used, it is common to add a one-character indent to every paragraph.

Image

Additionally, Chinese uses a two-character indent, and the first paragraph does not appear to be skipped in this language either. cc @conanliuhuan

Image

What is your proposed solution?

One approach I can think of is to allow the locale to decide whether to skip the first paragraph, like the word count type does. For example:

/**
 * translators: If the first paragraph should also be indented
 * (e.g. East Asian characters), set it to "include_first_paragraph".
 */
const textIndentType = _x( 'exclude_first_paragraph', 'Text indent type. Do not translate!' );
const textIndentSelector = textIndentType === 'exclude_first_paragraph' ? 'p + p' : 'p';

Or add an option to the UI to skip the first paragraph.

cc @mtias @aaronrobertshaw @ramonjd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonInternationalization (i18n)Issues or PRs related to internationalization efforts[Block] ParagraphAffects the Paragraph Block[Feature] Block APIAPI that allows to express the block paradigm.[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions