8000 gh-131725: Generate GNU hash table in `msgfmt.py` by StanFromIreland · Pull Request #131727 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-131725: Generate GNU hash table in msgfmt.py #131727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
update tests
  • Loading branch information
StanFromIreland committed Mar 30, 2025
commit a16a6c3755eb69c8d11439c6063a3085f3082f6a
4 changes: 2 additions & 2 deletions Lib/test/test_tools/test_msgfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def test_binary_header(self):
self.assertEqual(num_strings, 9)
self.assertEqual(orig_table_offset, 28)
self.assertEqual(trans_table_offset, 100)
self.assertEqual(hash_table_size, 0)
self.assertEqual(hash_table_offset, 0)
self.assertEqual(hash_table_size, 13)
self.assertEqual(hash_table_offset, 172)

def test_translations(self):
with open(data_dir / 'general.mo', 'rb') as f:
Expand Down
4 changes: 2 additions & 2 deletions Tools/i18n/msgfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

This program converts a textual Uniforum-style message catalog (.po file) into
a binary GNU catalog (.mo file). This is essentially the same function as the
GNU msgfmt program, however, it is a simpler implementation. Currently it
does not handle plural forms but it does handle message contexts.
GNU msgfmt program. Currently it does not handle plural forms but it does
handle message contexts.

Usage: msgfmt.py [OPTIONS] filename.po

Expand Down
Loading
0