#2257: .po files : same msgid records could be "deduplicated"
-------------------------+--------------------------------------------------
Reporter: rejoc | Owner: rejoc
Type: enhancement | Status: new
Priority: normal | Milestone: 1.1b4
Component: I18n | Version: 1.1 HEAD
Severity: normal | Resolution:
Keywords: i18n |
-------------------------+--------------------------------------------------
Comment (by rejoc):
Replying to [comment:6 Gustavo]:
> I don't know how TG1 handles that, since you say it has its own
implementation. What I do know is that xgettext (or equivalent) must *not*
do anything with duplicate messages. Duplicate messages ''must'' be
handled with msguniq and/or msgcomm, or equivalents.
>
I did a few more tests :
tg-admin i18n collect uses pygettext.py to handle the .py files and some
other tools (regex parsing for genshi templates, ...) for other (.kid,
.html, .js) files.
If there are duplicated messages in .py files, you get a single msgid with
a context comment indicating the multiple lines like this :
{{{
#: demo/test.py:20 demo/test.py:25 demo/test.py:27
msgid "some duplicated text"
msgstr ""
}}}
This is what Gettext generates so it actually does something to duplicate
messages.. (I did the same analysis with xgettext and it gives exactly the
same result.
The collect command starts by analysing .py files. This gives the first
part of the .pot file.
Then it analyses successively and independently the .kid, .html an .js
files, appending the collected messages to the .pot file without any
further (global) processing.
This is why (regex analysis + appending results from different sources) we
get duplicated msgids. And again, this is not what merge or compile
expect.
--
Ticket URL: <http://trac.turbogears.org/ticket/2257#comment:7>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---