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 506250 - Improvements to password prompt text
Improvements to password prompt text
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
1.12.x (obsolete)
Other Linux
: Normal trivial
: Future
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on: 503400
Blocks:
 
 
Reported: 2007-12-29 13:46 UTC by Ted Percival
Modified: 2008-01-21 13:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Proposed patch (6.58 KB, patch)
2008-01-14 13:01 UTC, Matthew Barnes
reviewed Details | Review
Screenshot (16.79 KB, image/png)
2008-01-14 13:02 UTC, Matthew Barnes
  Details
Introduces camel_session_build_password_prompt() (11.88 KB, patch)
2008-01-14 23:26 UTC, Matthew Barnes
committed Details | Review
Patch for evolution-exchange (2.05 KB, patch)
2008-01-17 21:19 UTC, Matthew Barnes
committed Details | Review

Description Ted Percival 2007-12-29 13:46:18 UTC
Three suggestions for password prompt text, originally from http://mail.gnome.org/archives/evolution-patches/2007-December/msg00001.html

1. Terminate the prompt sentence with a full stop.

2. Make the password prompts consistent across protocols, for example:
> "Please enter the <protocol> password for <user> on <host>."
Considering that usernames are sometimes full email addresses in themselves, it's best to avoid printing "<user>@<host>" (and it might be confused with an email address, which it's not).

3. Make <user> and <host> bold to distinguish them from the surrounding text (and the trailing full stop).

I'll prepare a patch.
Comment 1 Ted Percival 2007-12-29 18:10:53 UTC
Making the username and hostname bold will be about 100 times easier when the new password dialog goes in (bug #503400). I'm marking it as a dependency.
Comment 2 André Klapper 2008-01-14 08:23:00 UTC
tedp: if you add a string like "Please enter the %s password for %s on %s", please add a translator comment so this can be translated properly.
http://live.gnome.org/TranslationProject/DevGuidelines/Use_comments

anybody committing this please also note the announcement period/freezes at
http://live.gnome.org/Schedule
Comment 3 Matthew Barnes 2008-01-14 13:01:39 UTC
Created attachment 102808 [details] [review]
Proposed patch
Comment 4 Matthew Barnes 2008-01-14 13:02:51 UTC
Created attachment 102809 [details]
Screenshot

Shows the bold user and host names and full stop.
Comment 5 Srinivasa Ragavan 2008-01-14 20:07:10 UTC
Matt the patch seems fine to me. But as Andre says, we may need a translator comment. Also IIRC, I read some where 'avoid markup inside translatable text'. I think we are gonna break that. I dont think we can achieve it without breaking, but I think its ok. 
Comment 6 Matthew Barnes 2008-01-14 21:30:16 UTC
Right, forgot about the translator comment.

As I was trying to prepare the first patch in time for 2.21.5 I noticed all our password prompts have the same form now, so I was thinking about going back later and introducing a camel_session_build_password_prompt() function to construct a  standard prompt string for you from "type", "user", and "host" arguments.

If we centralize the prompt string I could more easily avoid using markup in the translatable part.  The translatable part would be:

   /* Translators: The first argument is the account type
    * (e.g. "IMAP"), the second is the user name, and the
    * third is the host name. */
   _("Please enter the %s password for %s on host %s")

Then I could allocate a couple more strings to throw bold tags around the "user" and "host" arguments.

Is it too late for to get something like this into 2.21.90?  We're supposed to be under an API freeze now, but strictly speaking Camel isn't a platform library.
Comment 7 Srinivasa Ragavan 2008-01-14 22:15:34 UTC
Matt, I would say that leave it. We can commit it. I really dont want to break api. Though we aren't under platform. there are lots of apps that depend on us. I wouldn't break API for this for sure :)
Comment 8 Matthew Barnes 2008-01-14 23:14:49 UTC
This doesn't break the API, it extends it.  But it would require a soname bump.  Being that we're under an API freeze now, I'll target this for "Future" (2.23).
Comment 9 Matthew Barnes 2008-01-14 23:26:43 UTC
Created attachment 102865 [details] [review]
Introduces camel_session_build_password_prompt()

Here's what I had in mind.
Comment 10 Ted Percival 2008-01-15 02:23:10 UTC
Matthew, I think we share a brain :)

There are a couple of places outside camel where there are password prompts, I found them by doing a `grep -Rni 'enter.*password' .`
Comment 11 Matthew Barnes 2008-01-15 03:40:51 UTC
There's a couple in servers/exchange that might be worth looking at.
The rest are in libraries that don't link against Camel.
Comment 12 Srinivasa Ragavan 2008-01-17 08:27:20 UTC
Matt, I think you can do this now it self. You can extend the API in 2.22 itself. I would say. Looks nice announce and go ahead. We aren't yet in platform. So it wont break any thing. 

Comment 13 Matthew Barnes 2008-01-17 21:07:30 UTC
Committed to trunk (revision 8390) and announced.
Comment 14 Matthew Barnes 2008-01-17 21:19:53 UTC
Created attachment 103092 [details] [review]
Patch for evolution-exchange

May as well do evolution-exchange while we're at it.

I also added a version check for camel-1.2 to the configure script.
Comment 15 Matthew Barnes 2008-01-18 02:09:33 UTC
Small side-effect of this in bug #510303.  I forgot to escape the user and host name strings when generating the markup text.  The fix is simple enough that I'm just gonna commit it straightaway.
Comment 16 Matthew Barnes 2008-01-18 02:24:17 UTC
Fixed bug #510303 in revision 8392.

http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=8392
Comment 17 Srinivasa Ragavan 2008-01-20 11:35:13 UTC
Looks fine. 
Comment 18 Matthew Barnes 2008-01-21 13:14:26 UTC
Committed the Exchange patch to trunk (revision 1545).