Last Comment Bug 747896 - Remove hardcoded space inserted before success.title.after (accountProvisioner.dtd)
: Remove hardcoded space inserted before success.title.after (accountProvisione...
: polish
Product: Thunderbird
Classification: Client Software
Component: Account Manager (show other bugs)
: Trunk
: All All
-- minor (vote)
: Thunderbird 14.0
Assigned To: :aceman
Depends on:
  Show dependency treegraph
Reported: 2012-04-23 06:47 PDT by Stefan Plewako [:stef]
Modified: 2012-04-23 11:50 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

patch (1.91 KB, patch)
2012-04-23 10:29 PDT, :aceman
mconley: review+
Details | Diff | Splinter Review

Description User image Stefan Plewako [:stef] 2012-04-23 06:47:56 PDT
Originally reported as bug 4336.

There is hardocoded space inserted before success.title.after label which is problematic when one wants to use sth like comma after login name. (affects l10n and en-US)
Comment 1 User image :aceman 2012-04-23 08:27:43 PDT
The sentence is like this:
&success.title.before;<FirstName> <LastName>&success.title.after; .
The order and also the space is hardcoded.
Have you left FirstName or LastName blank when you created the account?
The whole string could probably be refined into one string with a placeholder for the name so that localizers can play with the position. Were this not in some jquery code I could probably do it.
Comment 2 User image Stefan Plewako [:stef] 2012-04-23 08:54:03 PDT
I don't see FirstName and LastName fields on fresh start or when getting new account…
I only see one field, "Your name, or nickname" with search button on the right.
Comment 3 User image :aceman 2012-04-23 09:00:00 PDT
Maybe that is the problem.
Comment 4 User image :aceman 2012-04-23 10:26:45 PDT
OK, I tested it and I can confirm the problem.

The input box placeholder text says "Your name, or nickname". But the code of the dialog in several places splits the input text into a firstName and lastName. And then it often contatenates them together with a space so that if lastname is empty a trailing space will remain.
Comment 5 User image :aceman 2012-04-23 10:29:27 PDT
Created attachment 617530 [details] [diff] [review]

The attached patch removes the potential trailing space (via .trim) in two places. It does not change the logic wrt. the existing code already coping with empty last name.
Comment 6 User image Mike Conley (:mconley) 2012-04-23 10:49:51 PDT
Comment on attachment 617530 [details] [diff] [review]

Review of attachment 617530 [details] [diff] [review]:

This looks right to me.

Thanks aceman!
Comment 7 User image Mike Conley (:mconley) 2012-04-23 11:50:17 PDT
Committed to comm-central as

Note You need to log in before you can comment on or make changes to this bug.