# 在发现路线的标题中翻译 %{filter}

**URL:** <https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520>\
**Category:** Translations\
**Created:** [2025年四月25日 22:18 UTC](https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520 "2025-04-25T22:18:02Z")\
**Posts on this page:** 4\
**Page:** 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:** [2025年四月25日 22:18 UTC](https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520/1 "2025-04-25T22:18:02Z")

</div>

我很难将以下文本翻译成德语。在德语中，“hot”或“unread”等形容词会根据上下文改变形式，因此静态的 `%{filter}` 在语法上不起作用。

其他语言也受到影响吗？[@translators](https://meta.discourse.org/groups/translators)，你们在你们的语言中是如何解决这个问题的？

我有一个想法，就是在英文中目前缺失“all”的地方添加“all”——例如：“all %{filter} topics in %{category}”。但到处添加“all”可能有点多余。

下表显示了德语中形容词词尾的变化：

| %{filter} | “所有 %{filter} 主题” | “%{category} 中的 %{filter} 主题” |
| --- | --- | --- |
| latest | Alle aktuelle **n** Themen | Aktuelle Themen in %{category} |
| top | Alle angesagte **n** Themen | Angesagte Themen in %{category} |
| hot | Alle heiße **n** Themen | Heiße Themen in %{category} |
| new | Alle neue **n** Themen | Neue Themen in %{category} |
| unread | Alle ungelesene **n** Themen | Ungelesene Themen in %{category} |
| unseen | Alle ungesehene **n** Themen | Ungesehene Themen in %{category} |

我还想知道 `category_tag:` 中的 `%{tags}` 是否总是指多个标签。在上面的行中，`%{tag}` 用于单个标签，`%{tags}` 用于多个标签，但我没有找到类别和单个标签的版本。

> **供参考的字符串**
>
> ```plaintext
> discovery:
> headings:
> all:
> default: "All %{filter} topics"
> posted: "All topics you’ve posted in"
> bookmarks: "All topics you’ve bookmarked"
> 
> category:
> default: "%{filter} topics in %{category}"
> posted: "Topics in %{category} you’ve posted in"
> bookmarks: "Topics in %{category} you’ve bookmarked"
> 
> no_tags:
> all_default: "All topics without tags"
> category_default: "%{filter} topics in %{category} without tags"
> all:
> posted: "All topics without tags you've posted in"
> bookmarks: "All topics without tags you've bookmarked"
> category:
> posted: "Topics in %{category} without tags you've posted in"
> bookmarks: "Topics in %{category} without tags you've bookmarked"
> 
> single_tag:
> default: "%{filter} topics tagged %{tag}"
> posted: "Topics tagged %{tag} you've posted in"
> bookmarks: "Topics tagged %{tag} you’ve bookmarked"
> 
> multi_tag:
> default: "%{filter} topics tagged %{tags}"
> posted: "Topics tagged %{tags} you've posted in"
> bookmarks: "Topics tagged %{tags} you’ve bookmarked"
> 
> category_tag:
> default: "%{filter} topics in %{category} tagged %{tags}"
> posted: "Topics in %{category} tagged %{tags} you’ve posted in"
> bookmarks: "Topics in %{category} tagged %{tags} you’ve bookmarked"
> 
> categories: "All categories"
> 
> filter_labels:
> latest: "Latest"
> top: "Top"
> new: "New"
> unread: "Unread"
> hot: "Hot"
> unseen: "Unseen"
> 
> ```

---

<div class="post-metadata">

**Author:** ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)\
**Post date:** [2025年四月28日 04:06 UTC](https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520/6 "2025-04-28T04:06:22Z")

</div>

感谢您的反馈@Moin。我已经告知负责此功能的小组成员，但我们必须看看哪种方法阻力最小，因为您可以想象这会产生更多字符串。

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2025年四月28日 13:59 UTC](https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520/9 "2025-04-28T13:59:30Z")

</div>

啊，我明白了，这说得通……也许在我们得到其他反馈之前，先别尝试翻译了。希望有一个适用于大多数语言的解决方案。也许将这些结构化为句子过于雄心勃勃，应该简化为更像面包屑导航。

> [@Moin](#):
>
> 我也想知道 `category_tag:` 中的 `%{tags}` 是否总是指多个标签。在上面的行中，`%{tag}` 用于单个标签，`%{tags}` 用于多个标签，但我没有找到类别和单个标签的版本。

是的，抓得好，这应该使用单数版本，因为我们无法使用过滤器来处理类别和多标签。我将把它改为 %{tag}

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2025年五月22日 18:51 UTC](https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520/12 "2025-05-22T18:51:51Z")

</div>

I’ve reworked these headings in [A11Y: Update accessible headings for more flexible translations by awesomerobot · Pull Request #32863 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/32863)

Now each route will have a full string to translate:

> <https://github.com/discourse/discourse/blob/9d7469c4685d9c3cbb85df1ceb072ac75083fe5f/config/locales/client.en.yml#L5215-L5287>
