After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 210577 - language pop-up menu in composer
language pop-up menu in composer
Status: RESOLVED WONTFIX
Product: evolution
Classification: Applications
Component: Mailer
3.4.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[composer]
: 127530 212770 213747 (view as bug list)
Depends on:
Blocks: 228772 263678
 
 
Reported: 2001-09-21 15:37 UTC by Dan Winship
Modified: 2018-10-29 11:15 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Dan Winship 2001-09-21 15:37:23 UTC
There should be a language pop-up menu in the composer (with probably
configurable contents, and I guess it wouldn't appear if you only
configure one language).

Changing the language would change:
  - outgoing Content-Language header
  - default spell-checking language
  - language that things like "On DATE, PERSON wrote:" and "Forwarded
    Message" appear in
  - sig file?
  - ...
Comment 1 Dan Winship 2001-10-24 21:13:10 UTC
*** bug 212770 has been marked as a duplicate of this bug. ***
Comment 2 mair 2001-10-25 03:30:51 UTC
In addition to this pop-up menu there ought to be a per-domain based
language selection feature as described in bug 212770 (not really a
duplicate IMHO). The pop-up menu would OTOH be a perfect complement to
that feature.
Comment 3 Dan Winship 2001-10-27 19:09:29 UTC
*** bug 213747 has been marked as a duplicate of this bug. ***
Comment 4 Vivek Bhanuprakash 2003-12-14 10:36:13 UTC
The mockup shows that the language/country can be chosen by clicking
on an image of 'flag'. Recently, there was a spate of mails in the
news group regarding the political nature of shipping flags. The
discussion ended with the members confirming that no flags will be
shipped with Gnome. In view of this, what can be used in liu of the
'flag' selection box for country/language ?
Comment 5 Dan Winship 2003-12-15 13:58:49 UTC
cc: our UI and art guys, but they're both on vacation right now,
so don't expect any ideas from them until after new year's.

One solution might be to have the menu be an icon that generically
represents language somehow, and when you pop it up, it just has
language names rather than icons.
Comment 6 Jakub Steiner 2003-12-15 14:29:53 UTC
Dan is right. Although a complete set of flags is not kosher for
political reasons, a single icon config_language.png shipped in
gnome-icon-theme should be used in the toolbar as the mockup shows.

Also note the http://bugzilla.ximian.com/show_bug.cgi?id=127812 that deals with the proper way to use icons
in future. The mess in art/ is going away.
Comment 7 Changwoo Ryu 2004-03-18 14:36:48 UTC
About the string, "On DATE, PERSON wrote:",

gettext depends on POSIX locale value.  So the only way for a process
to retrieve various languages translations of a given msgid is,
changing POSIX locale. But changing locales with setlocale()
before/after gettext() is never thread-safe.

1. If Evolution is not (and will not) using multi-threads, it can just
use setlocale() before/after gettext().  But I guess it could cause
problems if the composer is used by other programs as a component.

2. Modifying or forking gettext is another solution.  But it might
take a long time.

3. Calling another process with different LANG envvar is, IMHO, the
only feasible solution now.  For example, popen("LANG=ll gettext
evolution 'On %s, %s wrote:'")
Comment 8 Jeffrey Stedfast 2004-03-18 14:44:28 UTC
Changwoo: huh? what are you talking about? I don't see how gettext has
anything to do with this bug?
Comment 9 Changwoo Ryu 2004-03-18 15:19:11 UTC
Sorry.  My English's poor.

This is just a possible problem when implementing the language popup
menu.  When a language is selected from the language pop-up menu, then
the "On_DATE,_PERSON_wrote:" string has to be written in the chosen
language, like the mockup screenshot, right?  Then it is required to
retrieve gettext translation of the chosen language.

I said, gettext() is not suitable for this purpose, because the target
language can't be selected without changing global (thread unsafe)
POSIX locale.
Comment 10 André Klapper 2004-09-23 17:08:44 UTC
a quick back reference to the same one at
<http://www.gnome.org/bounties/Mailer.html#127530>.
if one gets solved, close the other one :-)
Comment 11 Jorn Baayen 2005-01-10 19:45:11 UTC
If the "on date someone wrote" string should not be effected by this
(See http://bugzilla.gnome.org/show_bug.cgi?id=127530), then basically
the only user-visible thing left is the spell checking language: The
"Forwared message" string is so minor that I personally don't think it
is worth introducing the popup for. 

Just taking the Content-Language header, and then using that to set
the spell check language in the composer would seem like a better
solution. But this is problematic, take for example this case:

Somebody runs evo in a Swedish locale and then sends a message to a
Gnome mailing list. The Content-Language header is set to Swedish, as
the Swede doesn't bother to select a different language just for
typing a message. Then another Swede replies, and then the spell check
language is suddenly set to Swedish, and suddenly everything he types
in perfectly valid English is marked as misspelled. Bork.
Comment 12 André Klapper 2006-07-05 11:17:04 UTC
still missing in 2.7.3.
Comment 13 Matthew Barnes 2008-03-11 00:29:30 UTC
Bumping version to a stable release.
Comment 14 Matthew Barnes 2008-07-08 14:30:44 UTC
Andre, do you recall if there were any mockups for that bounty you mentioned four years ago?  The link is dead now.  The composer is already getting a facelift for 2.24, so now is a good time to investigate enhancements like this.
Comment 15 André Klapper 2012-02-19 16:52:08 UTC
*** Bug 127530 has been marked as a duplicate of this bug. ***
Comment 16 André Klapper 2012-02-19 16:59:16 UTC
This bounty was available in 2003 and is not available anymore. 
Closing as OBSOLETE.
Comment 17 André Klapper 2013-07-01 09:09:20 UTC
*** Bug 694066 has been marked as a duplicate of this bug. ***
Comment 18 Ángel 2016-04-03 19:25:19 UTC
I disagree with Jeffrey Stedfast  on bug 127530#c4 that the attribution string should not change. Of course, if you have a custom composer-message-attribution on org.gnome.evolution.mail, it shouldn't change, but on the default case where it is loaded from the UI language, it should.

The language of the email messages is different than UI language. It's not uncommon to use one language for the UI (in your mother tongue, or perhaps in a foreign language you're learning) but have most of your mail in a different language.
As a workaround, you can set composer-message-attribution with dconf-editor to a custom string appropiate for most of your emails. And change the rest manually.
Comment 19 Milan Crha 2018-09-24 09:26:02 UTC
This is related to bug #228772 and bug #561799
Comment 20 Milan Crha 2018-10-29 11:15:57 UTC
Changing the attribution text once it's part of the composer body is problematic. Users can change it, it can wrap, the information from the original message is lost. Thus I'd rather skip it.

The selection of the attribution language per account can be done since bug #228772 and it adds also that language for spell-checking, if available.

As there can be multiple languages selected for spell-checking, I'd not use the spell-checker as the place to get the Content-Language header from. Neither I'd use this header value of the original message to preselect anything in the composer. Also due to reasons outlined in comment #11.

I'm afraid we cannot do the code that smart to cover all the cases. How much faulty it would be is hard to guess.

In any case, I'm closing this in favor of bug #228772.