Skip to content

Commit 30ca107

Browse files
committed
Correct Chinese quadrillion translations
1 parent a2006ea commit 30ca107

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
@@ -145,8 +145,8 @@ msgstr[1] "兆"
145145
#: src/humanize/number.py:182
146146
msgid "quadrillion"
147147
msgid_plural "quadrillion"
148-
msgstr[0] "万亿"
149-
msgstr[1] "万亿"
148+
msgstr[0] "千万亿"
149+
msgstr[1] "千万亿"
150150

151151
#: src/humanize/number.py:183
152152
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
@@ -146,8 +146,8 @@ msgstr[1] "兆"
146146
#: src/humanize/number.py:182
147147
msgid "quadrillion"
148148
msgid_plural "quadrillion"
149-
msgstr[0] "萬億"
150-
msgstr[1] "萬億"
149+
msgstr[0] "千萬億"
150+
msgstr[1] "千萬億"
151151

152152
#: src/humanize/number.py:183
153153
msgid "quintillion"

‎tests/test_i18n.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@ def test_naturaldelta() -> None:
185185
@pytest.mark.parametrize(
186186
"locale, number, expected_result",
187187
[
188+
# Quadrillion is 10**15, or a thousand times a trillion.
189+
("zh_CN", 10**12, "1.0 兆"),
190+
("zh_CN", 10**15 - 1, "1.0 千万亿"),
191+
("zh_CN", 10**15, "1.0 千万亿"),
192+
("zh_CN", 2 * 10**15, "2.0 千万亿"),
193+
("zh_CN", -(10**15), "-1.0 千万亿"),
194+
("zh_CN", 10**18, "1.0 百京"),
195+
("zh_HK", 10**12, "1.0 兆"),
196+
("zh_HK", 10**15 - 1, "1.0 千萬億"),
197+
("zh_HK", 10**15, "1.0 千萬億"),
198+
("zh_HK", 2 * 10**15, "2.0 千萬億"),
199+
("zh_HK", -(10**15), "-1.0 千萬億"),
200+
("zh_HK", 10**18, "1.0 百京"),
188201
# Italian uses comma as decimal separator
189202
("it_IT", 1_000_000, "1,0 milione"),
190203
("it_IT", 1_200_000, "1,2 milioni"),

0 commit comments

Comments
 (0)