Skip to content

Conversation

siganushka
Copy link
Contributor

@siganushka siganushka commented Sep 2, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
License MIT

Unify the translation message style and make the translation message more humane (the current one is too rigid)

@carsonbot carsonbot added this to the 7.4 milestone Sep 2, 2025
@carsonbot carsonbot changed the title refactor: Unify & more humane translation message for zh_CN refactor: Unify & more humane translation message for zh_CN Sep 2, 2025
@carsonbot carsonbot changed the title refactor: Unify & more humane translation message for zh_CN [Validator] refactor: Unify & more humane translation message for zh_CN Sep 2, 2025
@OskarStark OskarStark changed the title [Validator] refactor: Unify & more humane translation message for zh_CN [Validator] Unify & more humane translation message for zh_CN Sep 2, 2025
</trans-unit>
<trans-unit id="111">
<source>The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.</source>
<target>检测到的字符编码无效 ({{ detected }})。允许的编码为 {{ encodings }}。</target>
<target>检测到的字符编码无效 ({{ detected }})。允许的编码为 {{ encodings }} 。</target>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you added a few spaces before the final dots, is this legit? If not can you remove them all?

Copy link
Contributor Author

@siganushka siganushka Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Chinese writing, spaces are often used to separate English characters or numbers from Chinese characters (for example, 我叫Lee我今年18岁 would be written as 我叫 Lee 我今年 18 岁) for visual clarity, so I've adopted this style.

In versions 7.3 and earlier, the trailing spaces have always been there; I just made them consistent in style.

https://github.com/symfony/validator/blob/7.3/Resources/translations/validators.zh_CN.xlf#L111C38-L111C39
https://github.com/symfony/validator/blob/7.3/Resources/translations/validators.zh_CN.xlf#L67C90-L67C91
https://github.com/symfony/validator/blob/7.3/Resources/translations/validators.zh_CN.xlf#L71C67-L71C68

@symfony symfony deleted a comment from carsonbot Sep 2, 2025
@fabpot fabpot modified the milestones: 7.4, 6.4 Sep 3, 2025
@fabpot
Copy link
Member

fabpot commented Sep 3, 2025

Thank you @siganushka.

@fabpot fabpot merged commit 1207f74 into symfony:6.4 Sep 3, 2025
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants