Skip to content

Commit 418a6ae

Browse files
authored
Correct Chinese quadrillion translations (#473)
1 parent 3c7fea5 commit 418a6ae

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

‎src/humanize/locale/zh_CN/LC_MESSAGES/humanize.po‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ msgstr[1] "兆"
275275
#: src/humanize/number.py:212
276276
msgid "quadrillion"
277277
msgid_plural "quadrillion"
278-
msgstr[0] "万亿"
279-
msgstr[1] "万亿"
278+
msgstr[0] "千万亿"
279+
msgstr[1] "千万亿"
280280

281281
#: src/humanize/number.py:213
282282
msgid "quintillion"

‎src/humanize/locale/zh_HK/LC_MESSAGES/humanize.po‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ msgstr[1] "兆"
276276
#: src/humanize/number.py:212
277277
msgid "quadrillion"
278278
msgid_plural "quadrillion"
279-
msgstr[0] "萬億"
280-
msgstr[1] "萬億"
279+
msgstr[0] "千萬億"
280+
msgstr[1] "千萬億"
281281

282282
#: src/humanize/number.py:213
283283
msgid "quintillion"

‎tests/test_i18n.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ def test_naturaldelta() -> None:
190190
@pytest.mark.parametrize(
191191
"locale, number, expected_result",
192192
[
193+
# Quadrillion is 10**15, or a thousand times a trillion.
194+
("zh_CN", 10**12, "1.0 兆"),
195+
("zh_CN", 10**15 - 1, "1.0 千万亿"),
196+
("zh_CN", 10**15, "1.0 千万亿"),
197+
("zh_CN", 2 * 10**15, "2.0 千万亿"),
198+
("zh_CN", -(10**15), "-1.0 千万亿"),
199+
("zh_CN", 10**18, "1.0 百京"),
200+
("zh_HK", 10**12, "1.0 兆"),
201+
("zh_HK", 10**15 - 1, "1.0 千萬億"),
202+
("zh_HK", 10**15, "1.0 千萬億"),
203+
("zh_HK", 2 * 10**15, "2.0 千萬億"),
204+
("zh_HK", -(10**15), "-1.0 千萬億"),
205+
("zh_HK", 10**18, "1.0 百京"),
193206
# Italian uses comma as decimal separator
194207
("it_IT", 1_000_000, "1,0 milione"),
195208
("it_IT", 1_200_000, "1,2 milioni"),

0 commit comments

Comments
 (0)