Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/humanize/locale/zh_CN/LC_MESSAGES/humanize.po
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ msgstr[1] "兆"
#: src/humanize/number.py:182
msgid "quadrillion"
msgid_plural "quadrillion"
msgstr[0] "万亿"
msgstr[1] "万亿"
msgstr[0] "千万亿"
msgstr[1] "千万亿"

#: src/humanize/number.py:183
msgid "quintillion"
Expand Down
4 changes: 2 additions & 2 deletions src/humanize/locale/zh_HK/LC_MESSAGES/humanize.po
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ msgstr[1] "兆"
#: src/humanize/number.py:182
msgid "quadrillion"
msgid_plural "quadrillion"
msgstr[0] "萬億"
msgstr[1] "萬億"
msgstr[0] "千萬億"
msgstr[1] "千萬億"

#: src/humanize/number.py:183
msgid "quintillion"
Expand Down
13 changes: 13 additions & 0 deletions tests/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,19 @@ def test_naturaldelta() -> None:
@pytest.mark.parametrize(
"locale, number, expected_result",
[
# Quadrillion is 10**15, or a thousand times a trillion.
("zh_CN", 10**12, "1.0 兆"),
("zh_CN", 10**15 - 1, "1.0 千万亿"),
("zh_CN", 10**15, "1.0 千万亿"),
("zh_CN", 2 * 10**15, "2.0 千万亿"),
("zh_CN", -(10**15), "-1.0 千万亿"),
("zh_CN", 10**18, "1.0 百京"),
("zh_HK", 10**12, "1.0 兆"),
("zh_HK", 10**15 - 1, "1.0 千萬億"),
("zh_HK", 10**15, "1.0 千萬億"),
("zh_HK", 2 * 10**15, "2.0 千萬億"),
("zh_HK", -(10**15), "-1.0 千萬億"),
("zh_HK", 10**18, "1.0 百京"),
# Italian uses comma as decimal separator
("it_IT", 1_000_000, "1,0 milione"),
("it_IT", 1_200_000, "1,2 milioni"),
Expand Down
Loading