• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category User Interface → Language
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by safetydan - 2007-01-25
Last edited by nls - 2007-08-05

FS#6574 - Lang v2 cleanup

Here’s my first pass at removing lang strings from targets that don’t actually use them. Many things left to do yet. Uses the “lang features” approach that Bagder was working on. See apps/features.txt in the patch.

Currently this saves about 1000 bytes from rombox builds for Recorder. Other targets don’t seem to benefit as much.

The task depends upon
ID Project Summary Priority Severity Assigned To Progress
6652 Rockbox  FS#6652 - 'none' keyword in english.lang messes up string order  Very Low Low bagder
7215 Rockbox  FS#7215 - Make .lng and .voice files target specific  Very Low Low
The task blocks these from closing
ID Project Summary Priority Severity Assigned To Progress
6159 Rockbox  FS#6159 - Add voice to roughly 100 splash screens and yes-no menus  Very Low Low
6387 Rockbox  FS#6387 - Get rid of SYSFONT_PITCH_xxx strings  Very Low Low
6993 Rockbox  FS#6993 - iaudio m5 missing in english.lang  Very Low Low
Closed by  nls
2007-08-05 19:22
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

committed, finally :-)

nls commented on 2007-01-25 21:21

Looks good :-)

A few comments though…

* The reason that “Mic” was “Internal Mic” for iriver h1xx/h3xx is because those have an actual

internal mic, the other targets which used just "Mic" have mic input for external mic's.

* To remain consistant in the code i guess “colourlcd” should be called “colorlcd”

(code -> American spelling, UI -> Brittish spelling)

* Backdrop is supported on iriver h1xx which doesn’t have color lcd.

* AGC is iriver h1xx/h3xx only right now but could probably be left in for other swcodec

targets, however I'm not sure AGC will ever be available for Hwcodec...
And the "sysfont" version of the AGC strings are only included for those irivers
but the other non sysfont string is included for "recording"

Possibly  FS#6387  and  FS#6403  should be comitted together with this.

Well I’ve made this a more general task for cleaning up the translation files.

In addition to what Nils said above, there’s some other things that should be changed.

* LANG_UNPLUG_* and friends should be LANG_HEADPHONE_UNPLUG_* as it’s a little unclear what feature they’re for without that.
* The strings should be sorted and grouped by feature.

And of course, other things as I think of them.

New version of the cleanup patch which includes:

* Include  FS#6403  and the lang changes from  FS#6387 .
* AGC feature added for AGC related strings
* colourlcd feature renamed to lcd_color
* A whole bunch of new feature strings

With this patch, plain recorder rombox builds are only 1280 too large.

A few more bytes saved.

nls commented on 2007-01-26 13:55

* Fixed building for h300 and sansa.

* Unified a couple of *_RECORDER and *_PLAYER strings into just *

* Removed a few duplicates of identical strings

* Renamed a couple of strings with confusing names.

* Changed lcd_charcell: strings into player:

* This patch is turning into a monster ;-)

iPod Mini 2G build is broken
make[1]: *** No rule to make target ‘features.txt’, needed by ‘/rockbox/ipodmini/apps/features’. Stop.

iPod Color 4G and iPod Video 5G builds also broken, same error. Perhaps you should move the features.txt to this flyspray instead? Or was the last .diff file not a full patch?

Looks like Nils version of the patch is missing the features.txt file. You should be able to take it from the v3 diff file.

Bugger me the two seem to conflict each other lol… could you merge V3 and V4? Cheers

Also, this conflicts with FS6554 >< Barry’s unified bootloader patch

It’s going to conflict with a heck of a lot more patches than just that one. There really isn’t much point in people who aren’t working on it to apply this patch. It doesn’t really bring that much benefit to most targets except for maybe 2K more RAM for things like buffers.

nls commented on 2007-01-28 12:24

Sorry, for being slow but was out during the weekend :-) Here’s a working patch, same as the previous one but now it also includes features.txt

Getting a stack of errors during compile for 5G Video

settings_list.c:661: ‘LANG_UNPLUG’ undeclared here (not in a function)
settings_list.c:662: warning: missing initialiser etc

nls commented on 2007-01-28 21:27

Yes, those were the same type of errors that I got for the h300 and sansa.
The problem is that the settings list uses LANG id’s for the settings but
they aren’t properly #ifdefe’d out so settings for features that are unsupported
on a target are still included.

Hmm is there a way around this? It breaks the compile altogether

nls commented on 2007-01-29 12:55

New patch, fixed building for ipods and ondios.

Test built OK on:
ipods: video, nano, 4G (grayscale)
iriver: h300
archos: ondiofm, ondiosp, player, recoder
sansa: e200
iaudio: x5

nls commented on 2007-01-29 15:57

Previous patch includes features.txt twice, fixed
Unified more identical strings and excluded more unused strings for certain targets.
Cuts about 2k of binary size on a recorder v1 build :-)

Awesome work Nils. Haven’t had as much time to work on this as I’d like. Thanks for picking it up.

Just some minor fixes to features.txt in this version. No new cleanups.

nls commented on 2007-02-01 21:07

It appears like I found some time :-) More unification of identical strings in this one
and added a bit to the comment in the top of english.lang
as well as some other string specific comments.
Renamed a couple more strings to more logical/gneric names.

nls commented on 2007-02-04 18:59

* fix mistake by me in the last version that broke the cliplight menu.
* remove some unused strings
* excluded target specific strings from builds where they weren’t needed.
* Ifdefed out some code in recording.c that was only used for remote lcd

and made it possblie exclude two strings from non remote lcd targets,
also saves about 500 bytes extra on archos (maybe this should be in a seperate patch?)

* Found one problem that I haven’t investigated – when a .lng file is loaded from disk

the strings are in the place, as if they were in the wrong order in the .lng file
Edit: forgot to mention that when english.lng is loaded this behaviour occurs.
That the other .lng files will be broken is expected.
nls commented on 2007-02-05 17:01

Ok doing a little testing I found that the bug with the misplaced
strings is triggered by using the : NONE thing.
It is already the case with the current SVN code, but : NONE is not
currently being used in SVN. This goes beyond my understanding of the
lang build system and thus I need to find a lang wizard somewhere :-)

nls commented on 2007-02-26 13:09

New version of the patch, I think this is mostly finished now.
* Regrouped the strings in english.lang (it’s quite difficult to

get a good structure but I don't think I can do it any better)

* Removed lots more unused strings that wreren’t marked as deprecated

What is neede now except closing  FS#6652  is a system for target specific
headers for the lng and voice files. And it would be nice to have a script
that would reorganize the translations in the same way as english.lang as
well as take care of the changed ID strings to help translators as much as

nls commented on 2007-03-02 01:43

* Synced with svn.

* Removed new duplicate strings added with the root menu commit.

* Removed one string that was now unused

* Fixed “alarm” in features.txt to use the new define.

I also now include the entire patched english.lang as most of the file
is changed anyway and patch doesn’t handle failed hunks very nicely when
they are as big as this. The patch also includes the changes to english.lang
but will fail to apply after even the smallest change.

nls commented on 2007-03-04 11:50

* Synced with svn.

* Removed 2 newly deprecated strings

* Added two more feature categories, recording_swcodec, and recording_hwcodec.

nls commented on 2007-03-08 21:39

* sync

nls commented on 2007-03-14 12:50

* sync

Here’s my contribution so far - even though it’s not completely working in this stage, but I hope it helps in a way.
The work isn’t lost and someone more knowledgeable can take it from here (as I don’t have much time during the weekend.
I’ll attach a english_lang.txt that contains comments on _corresponding_ lines to english.lang and explains the changes I made - there were I didn’t change something it’s blanked out.

- synced to the guisplash changes
- invented a few more categories - pitily I haven’t done all the work to the new categries yet (some only exists in the lang file, some are already in the features.txt but probably need also changes somewhere else - hope the commented text helps to figure out)
- moved a few things back for pending features (is commented)
- in the lang.txt: the paragraphs that are inside html-style comments are to be found in the english.lang already - if not it’s a suggestion or a question what to do with it

nls commented on 2007-03-17 16:38

Synced, included most of pixelma’s changes and made some minor tweaks.
(forgot to say that it now builds fine on all targets I tested)

This patch isn’t forgotten, I’m working on getting it back in sync with the trunk. This may take a while though.

Very rough sync to r13123. Some things may be missing, but I’m hoping it’s the same as the v16 patch. Only tested one build so far.

I synced the v17.patch and thought I was done. Now I read the comment above again and am not so sure anymore…

I think I can look into comparing with v16 later today. Just want to ask if there’s anything in particular that I have to keep an eye on? Is it just english.lang where something could be missing or also somewhere else? Would help me a lot if you could answer that, safetydan.

I think I was just saying that I wasn’t sure that I’d kept all the new lang strings that had been added since the last sync. There’s no easy way to diff the lang file anymore now that the strings have been sorted.

Noticed… that’s how I did to. So in addition to what I got before, I just looked through the changes to english.lang in svn since version 16 and I think there was nothing missing (nothing against another pair of eyes though).

Attached is the synced patch (to r13369) - a few notes:

- I couldn’t decide where to put the new strings “Context Menu”, “Playlist Viewer Menu” and the “Menu Set Rating” that was already the last one from the previous sync. These three are at the end for the moment, please move it to a more appropriate place.
- fixed a few strings regarding keymaps (some that had “x5” were missing the “m5”; exchanged “gigabeat” with “gigabeatf” like in svn, I think the new button lights settings would only be needed for the F series but I don’t know whether it’s necessary to make an exception for the X series just for this; also added h10_5gb to it like in svn - maybe it’s possible to use “h10*” in this case (?), I haven’t tried but could be replaced easily now)
- removed the “LANG_PLAYLIST_MENU” and used “LANG_PLAYLIST” instead, because it only contained the string “Playlist” in svn anyways. I discovered that there are still two almost similar strings “LANG_PLAYLIST” and “LANG_PLAYLISTS” - Do we need both?
- Successfully testcompiled a few sims plus M5 and OndioFM target… the patch saves about 2500 bytes bin size for the latter.

nls commented on 2007-05-15 19:15

Nice work, btw bagder said he will take a look at the bug blocking this when he gets back from his vacation.
h10* is not going to work because it will also match the h100 target.

nls commented on 2007-05-26 12:29

* Synced with svn (r13496)

* Sorted newly added strings, and made some tweaks here and there

* features.txt is now included with the patch, it was missing from v17 and v18

Synced with SVN r13965.

nls commented on 2007-07-24 17:26

* Include a fix by Dave Chapman for the last remaining issue in  FS#6652 

which caused .lng files being generated without the features list

* Use -imacros in the makefile to include button.h to avoid having the

function prototypes in the features list.

* Added comment to the top of features.txt about that backwards

compatibility with .lng and .voice files will probably break if that file is changed.

* Make all occurrences of NONE → none to make genlang output correct string

id numbers (it doesn't like NONE )

* synced, sorted new strings etc…

Please test and comment on this so that any issue can be worked out and the patch committed.

Sync to r14042

I’ve added a lang_cleanup branch to the public git repo:;h=lang_cleanup

nls commented on 2007-07-29 13:57

* Merge in the patch from  FS#7215  as both patches were changing some

of the same things and really should be committed together anyway

* Fix building of voice files

nls commented on 2007-07-30 11:10

Genlang appears to have a problem with translations not specifying the same targets as the english.lang file.

in the attached file englishtest.lang the “No” sting is specified only for the target ‘recorder’ but in translationtest.lang
it is specified for the ‘*’ target.

running genlang with these switches.

./genlang -b=test.lng -e=englishtest.lang -t=h300 translationtes.lang

this yields a .lng file with both the “Yes” and “No” strings having the same id 0. because the “Yes” sting is first and already had id 0

Ok, I put back the “#else” between the anti-skip buffer setting as discussed in IRC but now it doesn’t build for the Ondio at all.
When compiling I get the following error which leads to the following definitions being wrong too.:

settings_list.c:638: error: ‘LANG_MP3BUFFER_MARGIN’ undeclared here (not in a function)

I think that it has to do witch the exclusion of “Anti-skip buffer” for Ondios that is introduced with this patch (and is correct).
Probably it needs some other ifdef’ing or an addition to the features.txt - but it seems I’m unable to figure that one out ATM…

nls commented on 2007-08-01 09:23

* Synced with current svn (r14113)

fix breakage of the anti skip setting

Project Manager

I committed a genlang fix just now that fixed the problems in my tests. Please check and see if it did so in your end too!

nls commented on 2007-08-05 18:45

Yes, the bug has been fixed and all is working fine, now to get this committed :-) Thanks!


Available keyboard shortcuts


Task Details

Task Editing