1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# Locked renderings for the documentation's terms of art.
#
# A machine translation of technical prose does not fail by producing unreadable text; it
# fails by rendering a term of art with a dictionary synonym, so that two pages of the same
# site name the same concept differently and the reader cannot tell whether a distinction is
# meant. Each term below therefore has exactly one rendering per language, and
# `scripts/check_doc_i18n.py` enforces it: where the English page uses a listed term, the
# translated page has to use the locked equivalent.
#
# Fields:
# en the English term, matched case-insensitively on word boundaries
# en_match optional regex replacing that default match (for irregular plurals or spellings)
# ru, zh the locked rendering, and what a translator must write
# ru_match optional regex accepting inflected forms of the Russian rendering
# zh_match optional regex, same purpose, rarely needed
#
# A term kept in Latin script in a target language is a deliberate choice, not an oversight:
# `ack`, `trait` and `crate` are what Russian and Chinese Rust texts actually write, and
# replacing them with a translated coinage would make the page harder to read, not easier.
#
# Adding a term here is cheap and retroactive: the check reports every existing translated
# page that does not yet honour it, so add terms only once their rendering is settled.
[[]]
= "ack"
= "ack"
= "ack"
[[]]
= "nack"
= "nack"
= "nack"
[[]]
= "broker"
= "brokers?"
= "брокер"
= "брокер"
= "Broker"
= "(?i)broker"
[[]]
= "subscriber"
= "subscribers?"
= "подписчик"
= "подписчик"
= "订阅者"
[[]]
= "publisher"
= "publishers?"
= "издатель"
= "издател"
= "发布者"
[[]]
= "capability"
= "capabilit(y|ies)"
= "совместимость"
= "совместимост"
= "能力"
[[]]
= "batch"
= "batch(es|ed|ing)?"
= "пакет"
= "пакет"
= "批"
[[]]
= "subscription"
= "subscriptions?"
= "подписка"
= "подписк"
= "订阅"
[[]]
= "handler"
= "handlers?"
= "обработчик"
= "обработчик"
= "处理器"
[[]]
= "message"
= "messages?"
= "сообщение"
= "сообщени"
= "消息"
[[]]
= "middleware"
= "middleware"
= "中间件"
[[]]
= "router"
= "routers?"
= "роутер"
= "роутер"
= "路由器"
[[]]
= "codec"
= "codecs?"
= "кодек"
= "кодек"
= "编解码器"
[[]]
= "back-pressure"
= "back[-\\s]?pressure"
= "обратное давление"
= "обратн\\w*\\s+давлени"
= "背压"
[[]]
= "at-least-once"
= "at-least-once"
= "至少一次"
[[]]
= "at-most-once"
= "at-most-once"
= "至多一次"
[[]]
= "cancel safety"
= "cancel[-\\s]safe(ty)?"
= "безопасность при отмене"
= "безопасн\\w*\\s+при\\s+отмене"
= "取消安全"
[[]]
= "compile time"
= "compile[-\\s]time"
= "время компиляции"
= "компиляци"
= "编译期"
= "编译(期|时)"
[[]]
= "zero-cost"
= "zero-cost"
= "零成本"
[[]]
= "trait"
= "traits?"
= "трейт"
= "трейт"
= "trait"
[[]]
= "crate"
= "crates?"
= "крейт"
= "крейт"
= "crate"
[[]]
= "typestate"
= "typestate"
= "typestate"