Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: chrome/browser/resources/sync_setup_overlay.js

Issue 7709012: Sync Setup UI: Fix Hebrew and Arabic word order on title of dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 const OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 7
8 // Variable to track if a captcha challenge was issued. If this gets set to 8 // Variable to track if a captcha challenge was issued. If this gets set to
9 // true, it stays that way until we are told about successful login from 9 // true, it stays that way until we are told about successful login from
10 // the browser. This means subsequent errors (like invalid password) are 10 // the browser. This means subsequent errors (like invalid password) are
(...skipping 24 matching lines...) Expand all
35 /** 35 /**
36 * Initializes the page. 36 * Initializes the page.
37 */ 37 */
38 initializePage: function() { 38 initializePage: function() {
39 OptionsPage.prototype.initializePage.call(this); 39 OptionsPage.prototype.initializePage.call(this);
40 40
41 var acct_text = $('gaia-account-text'); 41 var acct_text = $('gaia-account-text');
42 var translated_text = acct_text.textContent; 42 var translated_text = acct_text.textContent;
43 var posGoogle = translated_text.indexOf('Google'); 43 var posGoogle = translated_text.indexOf('Google');
44 if (posGoogle != -1) { 44 if (posGoogle != -1) {
45 var ltr = templateData['textdirection'] == 'ltr';
46 var googleIsAtEndOfSentence = posGoogle != 0; 45 var googleIsAtEndOfSentence = posGoogle != 0;
47 if (googleIsAtEndOfSentence == ltr) { 46
48 // We're in ltr and in the translation the word 'Google' is AFTER the 47 if (googleIsAtEndOfSentence) {
49 // word 'Account' OR we're in rtl and 'Google' is BEFORE 'Account'.
50 var logo_td = $('gaia-logo'); 48 var logo_td = $('gaia-logo');
51 logo_td.parentNode.appendChild(logo_td); 49 logo_td.parentNode.appendChild(logo_td);
52 } 50 }
53 acct_text.textContent = translated_text.replace('Google',''); 51 acct_text.textContent = translated_text.replace('Google','');
54 } 52 }
55 53
56 var self = this; 54 var self = this;
57 $('gaia-login-form').onsubmit = function() { 55 $('gaia-login-form').onsubmit = function() {
58 self.sendCredentialsAndClose_(); 56 self.sendCredentialsAndClose_();
59 return false; 57 return false;
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 808
811 SyncSetupOverlay.showStopSyncingUI = function() { 809 SyncSetupOverlay.showStopSyncingUI = function() {
812 SyncSetupOverlay.getInstance().showStopSyncingUI_(); 810 SyncSetupOverlay.getInstance().showStopSyncingUI_();
813 }; 811 };
814 812
815 // Export 813 // Export
816 return { 814 return {
817 SyncSetupOverlay: SyncSetupOverlay 815 SyncSetupOverlay: SyncSetupOverlay
818 }; 816 };
819 }); 817 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698