Visitar URL original
Wrapping of PO file should take into account the East Asian Width (wide/fullwidth) · Issue #4452 · translate/translate · GitHub
Skip to content

Wrapping of PO file should take into account the East Asian Width (wide/fullwidth) #4452

Closed

Description

@alvinhochun

Previously reported on WeblateOrg/weblate#6350

Characters with the East Asian Width property being "Fullwidth" or "Wide" shall be counted as two "characters" wide when wrapping messages in gettext files.

Looking at the code for a bit, since PoWrapper inherits textwrap.TextWrapper, it appears that achieving this will require an alternative implementation of textwrap.TextWrapper. https://bugs.python.org/issue24665 and python/cpython#89 contain some discussions and patches to implement this in TextWrapper, but the changes were rejected by upstream. The author also published it as an external library: https://gitlab.com/fgallaire/cjkwrap | https://pypi.org/project/CJKwrap/

Activity

  1. self-assigned this
    on Jan 19, 2022
  2. added a commit that references this issue on Jan 19, 2022
    58ab06e
  3. nijel commented on Jan 19, 2022

    @nijel
    Member

    Proposed fix: #4511

  4. added a commit that references this issue on Jan 19, 2022
    2d5cc31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions