# 我认为 MessageFormat 在复数形式多于或少于英语的语言中存在问题

**URL:** https://meta.discourse.org/t/there-is-a-problem-with-messageformat-and-languages-with-a-country-code-like-pl-pl-and-zh-cn/394016
**Category:** Bug
**Tags:** translation
**Created:** [2026年一月21日 19:56 UTC](https://meta.discourse.org/t/there-is-a-problem-with-messageformat-and-languages-with-a-country-code-like-pl-pl-and-zh-cn/394016 "2026-01-21T19:56:12Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2026年一月21日 19:56 UTC](https://meta.discourse.org/t/there-is-a-problem-with-messageformat-and-languages-with-a-country-code-like-pl-pl-and-zh-cn/394016/1 "2026-01-21T19:56:12Z")

</div>

继续讨论自 [Message Format support for localization](https://meta.discourse.org/t/message-format-support-for-localization/7035)：

> [@Discourse](#):
>
> **重要提示：** 如果您的语言使用的复数形式多于“one”和“other”两种，则需要修改翻译中的复数形式。您可以通过在 `{ FOO, plural, ... }` 块中添加或删除形式来使其适用于您的语言。

我在用不同语言测试我的文本与 MessageFormat 时遇到了问题，因为它在波兰语中不起作用。

但在查看现有文本后，我认为问题不在我这边，而是某些地方没有按预期工作。

我查看的示例在邀请模态框中：`js.user.invited.invite.link_validity_MF`

## 英文中一切正常：

> <https://github.com/discourse/discourse/blob/50799f3557a6db6c816913315604ee5922cab7a0/config/locales/client.en.yml#L2272-L2279>

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/0/0/60086081b78cee67cbafeb00d184e4daa0f0b2ec.png)

## 德语中也有效：

> <https://github.com/discourse/discourse/blob/50799f3557a6db6c816913315604ee5922cab7a0/config/locales/client.de.yml#L2116-L2124>

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/a/1/ea1601ad99342190dd126f8fca476732c1fa37cb.png)

## 但在波兰语中无效：

> <https://github.com/discourse/discourse/blob/50799f3557a6db6c816913315604ee5922cab7a0/config/locales/client.pl_PL.yml#L2343-L2354>

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/4/b/e4bced96c1abadc8305a56a8ccc232ef29b92e72.png)

## 在中文中也无效：

> <https://github.com/discourse/discourse/blob/50799f3557a6db6c816913315604ee5922cab7a0/config/locales/client.zh_CN.yml#L2027-L2032>

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/c/3/5c3248cb721acc6ff99bd6eb8585a670b0bd864f.png)

根据文档主题，我期望所有这些翻译都能工作，而不仅仅是德语翻译。因此，我怀疑在影响具有不同复数数量的语言的地方存在错误。

---

_[View the full topic](https://meta.discourse.org/t/there-is-a-problem-with-messageformat-and-languages-with-a-country-code-like-pl-pl-and-zh-cn/394016)._
