FS#12003 - --deprecate is broken

Attached to Project: Rockbox
Opened by sideral (sideral) - Wednesday, 09 March 2011, 13:54 GMT
Last edited by Nils Wallménius (nls) - Thursday, 07 April 2011, 07:50 GMT
Task Type Bugs
Category Build environment
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.8
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


“ --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, 07:50 GMT
Reason for closing:  Fixed
Additional comments about closing:  Committed fixed version
Comment by Nils Wallménius (nls) - Thursday, 10 March 2011, 20:28 GMT
I'm pretty sure this fixes it
Comment by sideral (sideral) - Monday, 21 March 2011, 19:34 GMT

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.