-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonInternationalization (i18n)Issues or PRs related to internationalization effortsIssues or PRs related to internationalization efforts[Block] ParagraphAffects the Paragraph BlockAffects the Paragraph Block[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
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.
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.
Additionally, Chinese uses a two-character indent, and the first paragraph does not appear to be skipped in this language either. cc @conanliuhuan
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.
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonInternationalization (i18n)Issues or PRs related to internationalization effortsIssues or PRs related to internationalization efforts[Block] ParagraphAffects the Paragraph BlockAffects the Paragraph Block[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Type] EnhancementA suggestion for improvement.A suggestion for improvement.