Adium 1.4.3
Evan Schoenberg, M.D.
evan.s at dreskin.net
Wed Jun 29 21:59:45 UTC 2011
On Jun 29, 2011, at 4:48 PM, Thijs Alkemade wrote:
> On 26 jun 2011, at 21:23, commits at adium.im wrote:
>
>> details: http://hg.adium.im/adium-1.4/rev/89e0195da5b0
>> revision: 3555:89e0195da5b0
>> branch: (none)
>> author: Evan Schoenberg
>> date: Sun Jun 26 14:22:43 2011 -0500
>>
>> If the auth window closes, let the facebook account know that auth failed. Also, provide a bit more information when migrating accounts: 'The new version of Adium has a much more reliable Facebook Chat service. Log in to use your Facebook account with Adium.'
>> (transplanted from ac7aa9e12a561b4c7c4b0f841500e732b8c85e78)
>>
>> diffs (224 lines):
>> [...]
>> @@ -91,6 +103,15 @@
>> if ([frame.dataSource.request.URL.host isEqual:@"www.facebook.com"] && [frame.dataSource.request.URL.path isEqual:@"/login.php"]) {
>> //Set email and password
>> DOMDocument *domDoc = [frame DOMDocument];
>> +
>> + if (self.isMigrating) {
>> + NSString *text = domDoc.body.innerHTML;
>> + text = [text stringByReplacingOccurrencesOfString:@"Log in to use your Facebook account"
>> + withString:@"The new version of Adium has a much more reliable Facebook Chat service. Log in to use your Facebook account"];
>> + domDoc.body.innerHTML = text;
>> + }
>> +
>> +
>> [[domDoc getElementById:@"email"] setValue:self.autoFillUsername];
>> [[domDoc getElementById:@"pass"] setValue:self.autoFillPassword];
>> [...]
>
>
> While I understand why this was added, this is going to be quite hard to localize correctly. Simply wrapping the second string in AILocalizedString is not enough, it appears Facebook is automatically sending a localized window (probably using whatever is send in "Accept-Language:"), though I'm not sure we can assume it always returns the same language as the user is using. (maybe some cookies he has tell Facebook to use a different language?). Besides, it would require each localizer to copy that string exactly from the login window.
That's why I didn't wrap it in AILocalizedString; it's simply not localizable. It's a little extra help for our English-speakiing users who are upgrading.
> Is there no more reliable DOM-modifying way to do this?
Facebook doesn't assign a DOM-element to the instructional text, so I don't see a better approach. Definitely open to one. but don't plan to spend any more time thinking about it myself...
Ultimately I don't think it matters, as I agree with you:
> To be honest, I think it's unnecessary: if we make a good blog post about it, make it very clear in the release notes, (hell, maybe even put the Facebook logo in the Sparkle changelog if we can do that) then I don't think many users are going to be confused about it.
> It also feels a bit wrong to me to tell the user they're using this "secure login" and modifying it behind the scenes, but that might just be me...
It is no more or less secure if we change it. It's up to the user to remember that any program could pop up a window which looks like Facebook but isn't... they have to trust us, in any case. :)
-Evan
>
>
> Thijs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20110629/421b4e03/attachment-0002.html>
More information about the devel
mailing list