Re: [Evolution-hackers] Language selection in composer



On Tue, 2004-09-21 at 15:12 -0400, Jeffrey Stedfast wrote:
On Tue, 2004-09-21 at 20:42 +0200, Jan Krčál wrote:
> Hi,
> 
> I would like to implement this feature (bug #127530)

there is no such bug # that I can find. the bug numbers only go up to
~68000 afaik.
Gnome bugzilla jeff ... which you obviously worked out afterwards.
>  and I've got some essential questions that aren't related to any
> component, so I don't know, who should I address...
> 
> First of all, how can I retrieve the list of all languages available
> to the user? Should it be that languages that have evolution
> localization available (How can I determine which languages have
> evolution l10n? Should I go through $prefix/share/locale/ and find
> evolution-1.5.mo?) Or should it be just all languages that are defined
> in ISO 639 (Is there any other way than to hardcode it, than?).
> It seems usefull to have names of all languages localized to all
> languages (because evolution needs to show a list of available
> languages to the user). How can I get this?
I don't think you can.  You can get a list of locales, and you can get a list of the locales and possibly languages the user wants to see, but that isn't the same as a language list.

I think you would have to hard-code the list, and let the translators translate the language names appropriately.   Actually getting the translated attribution strings seems rather more difficult though.

I'm not sure 639 will suffice, since you need to take into account localisation, not just base language.  e.g. americans and their funny date format, vs the rest of the world.
what does this list of languages supposed to provide? other than "ooh,
look. I have a menu dingus that I can click"

without knowing what this language info will *actually* be used for, I
can't help you...

(the only language thing I can think of that'd be useful to have in the
composer would be for providing hints in constructing the MIME message
where there are numerous charset encodings that the strings could be
encoded in - but generally these are limited to asian and cyrillic
afaik)

> 
> Second, I need to get strings from different locales (because of
> changing those "On DATE, PERSON wrote:" labels).

we plan to make this user-configurable, and not based on locale (altho
currently it is based on the string the translator provides for your
locale)
Well the bounty says it should change based on the language you set.  Making it user-configurable seems a much different problem, and one that hits user-interface issues otherwise it's too

If you're writing to a french person it makes sense to change it to french, if you had a customised setting you'd have to customise it for each language you know, and it would still have to choose from one of those.  It could still be an override, so isn't the same issue.
>  Should I do it using setlocale() before and after obtaining that
> strings, or any other way?
You can't change the locale, because evolution is a mutli-threaded application and it could break things.
no, do not do this.

anyways, I have no idea what you are trying to solve so I can't really
help you.
The ximian bug has more info, which wasn't hard to find.

I'm not really convinced this entire idea is all that practical anyway, or even a very good idea.

But FWIW.

- I don't see why the spell checking language should be changed by any such setting, since mails could contain multiple languages.
- I don't see where the 'language list' is defined or should be defined.  This list makes the spell checking language list redudant, but they might not be able to match exactly.  It should probably be part of some gnome-global locale (timezone) and preferred-language setting.
- There seems no practical way to get the base attribution string translated to multiple languages.  You'd probably have to list the language-specific string in the C file too, or use some pre-processing script to create it.
- There isn't an easy way to even change the attribution text since it is just inserted into a stream at reply-creation time.  You'd have to do something like the signature does, i guess that might work, but it will impact on more bits of code.

--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]