Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pofmt hook to format PO files #72

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

add pofmt hook to format PO files #72

wants to merge 5 commits into from

Conversation

frostming
Copy link
Collaborator

  1. 增加 pofmt pre-commit hook
  2. 改进 Sync workflow

考虑增加 pre-commit.ci 以启用Pre-commit检查及自动修复

@frostming
Copy link
Collaborator Author

frostming commented Jun 8, 2021

更新了pofmt版本,现在全宽字符在计算宽度时会乘一个系数(默认是1.8)来平衡视觉。参见最新修改。

遗留问题:

  1. 连续的中文字符超出最大宽度时,无法按宽度系数折行(只要有标点符号就能正确折行)
  2. 中文标点无法识别为分隔字符(Solved)

@greyli
Copy link
Member

greyli commented Jun 9, 2021

我看到有大量改动是把 msgid 行首的空格移动到上一行行尾,以及调整行尾单词的细微调整。这些改动是不是有必要(猜测会导致现有提交的 PR 产生冲突)?有没有可能关掉对 msgid 的格式化?

@greyli greyli linked an issue Jun 9, 2021 that may be closed by this pull request
@frostming
Copy link
Collaborator Author

frostming commented Jun 9, 2021

@greyli msgid也有可能被editor或者babel改变折行,所以我理解也是应该纳入格式化中

UPDATE: pofmt 0.3.0已经支持关掉msgid: --no-msgid,但我未更新precommit-config,我希望保持当前行为

@greyli
Copy link
Member

greyli commented Jun 9, 2021

msgid也有可能被editor或者babel改变折行,所以我理解也是应该纳入格式化中

嗯,有道理。

@Abdur-rahmaanJ
Copy link
Member

@greyli @frostming Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up pre-commit hooks for .po files
3 participants