Closed shimizukawa closed 9 years ago
From Robert Lehmann on 2011-04-14 17:57:12+00:00
Reproduced bug with the current Sphinx docs. It is a regression introduced during versioning support: previously, all nodes were hashed by their message string only and duplicates were squashed. This is no longer the case with unique IDs tracking nodes along document changes.
Formerly, {{{catalog}}} was a list of messages and blindly merged all duplicate messages. It simulated an ordered set as message ordering should be retained in catalogs (and if they occurred twice they only showed up at the first slot). This behaviour was useful and should be restored.
UIDs should be merged into the comments of their corresponding message. Using them as the {{{msgid}}} itself would hide stale messages from translators without tool support. They //could// be supplied as a {{{msgctxt}}} (which is not natively supported by Python's {{{gettext}}}) but that would needlessly separate identical messages (eg. in glossaries).
Version tracking is hard, let's go shopping!
From Kouhei Sutou on 2011-05-08 09:08:01+00:00
I've created a patch to fix it: https://bitbucket.org/kou/sphinx/changeset/9710b94ba9dd. It is included in my i18n-generate-valid-pot branch: https://bitbucket.org/kou/sphinx/src/01a51aa9f73e
The branch also has reference comment support described in GNU gettext document: "3 The Format of PO Files" http://www.gnu.org/s/hello/manual/gettext/PO-Files.html
From Kouhei Sutou on 2011-05-15 10:56:39+00:00
It seems that this issue has been resolved because patches in my branches are pulled. Robert, could you confirm it?
From Robert Lehmann on 2011-07-06 07:22:51+00:00
Thanks all, this issue is now resolved. Special thanks go out to <
See <<cset 0c9c9e8bee0f7e44fd3c095f38c2f0f061dddc51>> and the following commits for details.
The I18nBuilder class uses the ID of a doctree node to hash messages. This may lead to duplicate messages in the *.pot file: