Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: What function loads a .lang file?

Re: What function loads a .lang file?

From: TP Diffenbach <rockbox_at_diffenbach.org>
Date: Tue, 29 Apr 2003 13:10:09 -0400

Quoting Daniel Stenberg <daniel_at_haxx.se>:

> On Tue, 29 Apr 2003, TP Diffenbach wrote:
>

> I am only for this kind of operation if the lang system is written to
> maintain order and gapless state among such 'enums' and similar. As things
> are now, if we figure out that item 5 out of 10 items is unnecessary, we
> simply blank it and it won't be used in the software but there will be a
> blank position.
>
> Simply assuming this won't happen is like begging for trouble, if you ask
> me.

If we were to blank out these strings we would also be changing the settings code that had provided these strings as options. That's what would have impelled us to consider the string uneccesary. The setting value range would also change, and as that value is what's used as the index, we'd still index corectly. It';s the same sort of issue as with any inter-operable code; we just need the equivalent of a "compiler error" -- an error in the make file --to flag this. So we modify the lang file to include groups, and the perl scripts appropriately.


>
> I have two main arguments against translated config files:
>
> 1. When I've change language and don't keep the previous language file
> around at the correct place, I can't load my own older config files
> anymore?

So, reload the appropriate .lang file and see below...

 
> 2. I can't interchange config files with my friends, or even post them in
> bug
> reports and have the developers understand them. Reading them becomes a
> pain, and I think one of the main reasons for having them in plain ASCII
> is to keep them readable.

Load the translated config file, change your language setting to english, and save a config file. Voila, a "standard" (english) config file to post.

This is also what you'd do if you decided to remove a particulat .lang file: translate all your configs before removing it.

> The existing translated phrases won't cover the settings keywords all the
> way, so you'd need to add a bunch of new ones there too.

Yes, and I'd remove the hard-coding and duplication too. Which is in fact what I'm working on. If the consensus is that this isn't good, I'll drop it.

But I really think the "average user" benefits from configs translated into his native lanaguge. Why support multiple langauges and then force users to translate from technical audio jargon in English? The developers (who speak great English, which is a great boon for me, and thank you, considering that my Swedish is about as good as most Americans -- i.e., non-existant) have no problem with English configs, but the developers also have no problem writing assembly at the MAS chip, too. :)
 
Even if the consensus is that translated configs isn't good -- and I think it is good for users, especially users who don't speak English -- getting rid of hardcoded and duplicated strings is just good code cleanup.


-- 
Archos FM needs a Rockbox!
Received on 2003-04-29

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy