Closed (fixed)
Project:
Localization server
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2008 at 20:36 UTC
Updated:
22 Jan 2008 at 07:51 UTC
works very well, except every time a file gets reparsed the translation line is added one more time in the po file.....
e.g.
#: fivestar_comment.inc:24,24,24,24,24,24,24,24
msgid "Optional rating"
msgstr "Optionele punten"
This happens with the local parser.
Comments
Comment #1
gábor hojtsyHow does the package gets reparsed?
Comment #2
pvasili commentedProbably, I receive the same error: http://drupal.org/node/206126
Comment #3
bwynants commentedYes sometimes the project are reparsed (with reason). if not reparsed it does not get an extra repeat.
ps: I update the archives sometimes to include the latest fixes, hence the reparsing...
Comment #4
gábor hojtsyDoh, just found out that there was a $fid value used in extractor.inc's l10n_community_save_string(), which was never initialized. So all reparsed releases had their lines stored all again, and again. Doh. Now hopefully fixed with this change:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/l10n_server...
Note however that reparsing stuff still keeps old occurrences of strings, so strings removed in the new version will not get removed, and strings moved lines in the new version will get their old and new line numbers stored as well. This is either bad or by design. If we just remove the file/line information when reparsing a package, it could easily lead to data loss if the new package is not properly parseable. The reparsing "feature" is in itself a development feature by nature. The drupal.org install will parse alpha, beta, rc versions (depending on setup), but not nightly development versions, as parsing all nightly development versions again and again each day would add a *huuuuge* data overhead to this system. So this module will only parse fixed code bases, which are not modifiable, and therefore do not require reparsing.
Comment #5
pvasili commented2 Gábor Hojtsy - I can remove data it SQL http://drupal.org/node/203658 ? Lines will be taken again correctly.
Thanks
Comment #6
gábor hojtsySure, feel free to remove file and line data in case you reparse the file again. Keep the strings and translations intact. **Always** make a backup first, in case anything goes wrong.
Comment #7
bwynants commentedso it should be ok to increase the version number to create a clean file? for the way I use it the overhead is not a problem...
Thanks for the fix. Is there a need/way for me to clean up my database?
Comment #8
bwynants commentedstate and answer given during my edit sorry :-)
Comment #9
psicomante commentedCan we reparse all modules from scratch without losing translations? Something like
And reparsing all projects?
Comment #10
bwynants commentedI cleared only l10n_community_file and l10n_community_line touched all archive, reparsed and it was ok....
Comment #11
gábor hojtsyYes, the extractor picks up identifiers of existing source strings, so if you keep the source strings intact, it will add back the file and line information properly. Actually, there was only a problem with the line information, so you should be fine with just truncating the line table and reparsing all source packages. (The code notices that you already have that file recorded, so it should not add that twice, there was only a problem with the lines).
Again, always make a backup first!
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.