.pot file msgid order while using the gettext builder

WAKAYAMA shirou avatarWAKAYAMA shirou created an issue

I think it seems the gettext builder in sphinx creates a .pot (and .po) file with different order msgids from original .rst sentence order.

While translating to other language, some word have several meanings and should be translated to different word. Since it depends on the "context", I think .pot and .po file keeping order is important to translate a long text not just a message.

I think it occurred because of using a defaultdict(dict) in builders/gettext.py. I changed it to defaultdict(OrderedDict) and get the result I want. However, OrderdDict comes from Python 2.6/3.2, this may be implemented using a list.

If you think this is a good idea, would you be able to change the implementation?

Thank you.

Comments (1)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.