This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12003 - langtool.pl --deprecate is broken
Attached to Project:
Rockbox
Opened by sideral (sideral) - Wednesday, 09 March 2011, 14:54 GMT+2
Last edited by Nils Wallménius (nls) - Thursday, 07 April 2011, 09:50 GMT+2
Opened by sideral (sideral) - Wednesday, 09 March 2011, 14:54 GMT+2
Last edited by Nils Wallménius (nls) - Thursday, 07 April 2011, 09:50 GMT+2
|
Details“langtool.pl --deprecate” does not deprecate strings correctly. Currently, it replaces each string with “none” (without the quotes) and deletes value of the “user:” attribute. Doing it this way effectively removes the string ID and renumbers all subsequent IDs. This definitely is wrong for the english.lang (master) file, as it breaks voice files and compiled translations. (I'm not sure whether it's a good thing to do for any other lang file.)
As per IRC wisdom, the correct way to deprecate a lang ID seems to be to change each string to “""” (the double-quoted empty string). In this case, genlang also requires a value in the “user:” attribute, so I suggest not deleting this value. (Apparently, changing the strings to “deprecated” used to be supported as well, but that is currently rejected by genlang.) |
This task depends upon
Closed by Nils Wallménius (nls)
Thursday, 07 April 2011, 09:50 GMT+2
Reason for closing: Fixed
Additional comments about closing: Committed fixed version
Thursday, 07 April 2011, 09:50 GMT+2
Reason for closing: Fixed
Additional comments about closing: Committed fixed version
This almost does the trick. But as it deletes the “user” attribute, genlang now whines:
.../rockbox/apps/lang/english.lang:12878:1: warning: missing user!
Also, if there's no plan to allow “deprecated” as an alias for “""”, the corresponding comment should be deleted from the top of the english.lang file.