Unify whitespace across translations (en.ts, ru.ts, zh-ch.ts) - #2418
Unify whitespace across translations (en.ts, ru.ts, zh-ch.ts)#2418playermiller109 wants to merge 1 commit into
Conversation
|
刚刚我检 diff 了 en.ts 和 zh-cn.ts 中所有键值的对应情况,并移除了 zh-cn.ts 中所有 : 前面的空格。并同步了 zh-tw.ts 文件中相应的格式和更新。 I just checked the diff between en.ts and zh-cn.ts to ensure all key-value pairs correspond correctly. I also removed all spaces before the colons in zh-cn.ts and synchronized the formatting and updates in the zh-tw.ts file accordingly. |
|
@dmscode 这个不光是只移除了 zh-cn.ts 中所有 : 前面的空格,还有其他的空白字符也处理了的,你这样还是会有冲突的。这样吧,我把这个关了给你 PR 吧。 This not only removes all the spaces before the colons in zh-cn.ts, but also processes other whitespace characters. You'll still encounter conflicts this way. Well, let me close this and send you a PR. |
|
@playermiller109 我是在做完我所说的一切之后,才看到了这个 pr,所以评论了一下。 关于空白,en.ts 中会存在一些统一或者不严格的状况,但不影响使用。为了便于对照检查,所以在 zh-cn.ts 中,我严格对应了 en.ts 的行号。 我觉得也没必要过分严格要求格式的严谨,反正现在密集跟进翻译更新的人似乎只有我,影响并不大。不过后面跟进繁体中文的话我可能要写一个脚本来对比 keys 的差异。 I only saw this PR after completing everything I mentioned, so I left a comment. Regarding the blank spaces, there might be some inconsistencies or lack of strictness in en.ts, but it doesn't affect usage. To facilitate cross-checking, I strictly matched the line numbers in zh-cn.ts with those in en.ts. I think there's no need to be overly strict about format precision. After all, it seems like I'm the only one intensively keeping up with translation updates right now, so the impact is minimal. However, if we proceed with Traditional Chinese updates later, I might need to write a script to compare the differences in keys. |
Issue reported and fixed by @playermiller109 ([PR zsviczian#2418](zsviczian#2418), [PR #2](#2)). - [x] Removed unnecessary trailing whitespace characters at the end of lines. - [x] Replaced multiple consecutive spaces within sentences with a single space. - [x] Unified JSON key-value formatting to follow key: value, ensuring all keys are followed by a colon and a single space (replacing inconsistent key : value formats). - [x] Removed excessive blank lines.
To make it easier to compare with the original sources, the PR does not include any actual content changes.
For the convenience of translators, the formatting adjustments have been applied not only to
en.ts, but also to existing translation filesru.tsandzh-cn.ts.Why Unify Whitespace?
When comparing
en.tswith other translation files using a diff editor, inconsistent whitespace may lead to irrelevant diffs. This makes it harder to identify real translation differences and increases maintenance difficulty.Unified formatting also makes it easier to detect missing translations — for example, by comparing line counts or spotting gaps visually.
In short, unifying whitespace before translation is essential for clean and maintainable diffs.
What Was Changed?
key: value, ensuring all keys are followed by a colon and a single space (replacing inconsistentkey : valueformats).// ...) withinzh-cn.tsto matchen.ts.Feel free to reach out if you have any concerns.