- 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
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.
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
6652 | Rockbox | Very Low | Low | bagder | |||
7215 | Rockbox | Very Low | Low |
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
6159 | Rockbox | Very Low | Low | ||||
6387 | Rockbox | Very Low | Low | ||||
6993 | Rockbox | 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
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
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Looks good
A few comments though…
* The reason that “Mic” was “Internal Mic” for iriver h1xx/h3xx is because those have an actual
* To remain consistant in the code i guess “colourlcd” should be called “colorlcd”
* 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
Possibly
FS#6387andFS#6403should 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#6403and the lang changes fromFS#6387.* AGC feature added for AGC related strings
* colourlcd feature renamed to lcd_color
* A whole bunch of new feature strings
* Renamed LANG_UNPLUG_* to LANG_HEADPHONE_UNPLUG_*
With this patch, plain recorder rombox builds are only 1280 too large.
A few more bytes saved.
* 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.
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
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
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
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.
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.
* 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
* Found one problem that I haven’t investigated – when a .lng file is loaded from disk
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
New version of the patch, I think this is mostly finished now.
* Regrouped the strings in english.lang (it’s quite difficult to
* Removed lots more unused strings that wreren’t marked as deprecated
What is neede now except closing
FS#6652is a system for target specificheaders 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
possible.
* 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.
* Synced with svn.
* Removed 2 newly deprecated strings
* Added two more feature categories, recording_swcodec, and recording_hwcodec.
* sync
* 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
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.
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.
* 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.
* Include a fix by Dave Chapman for the last remaining issue in
FS#6652* Use -imacros in the makefile to include button.h to avoid having the
* Added comment to the top of features.txt about that backwards
* Make all occurrences of NONE → none to make genlang output correct string
* 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: http://repo.or.cz/w/Rockbox.git?a=shortlog;h=lang_cleanup
* Merge in the patch from
FS#7215as both patches were changing some* Fix building of voice files
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…
* Synced with current svn (r14113)
fix breakage of the anti skip setting
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!
Yes, the bug has been fixed and all is working fine, now to get this committed
Thanks!