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

Side by Side Diff: chrome/browser/resources/options/language_options.js

Issue 23708004: Translate: Remove --enable-translate-settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify TranslateManagerBrowserTest.NeverTranslateLanguagePref Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // TODO(kochi): Generalize the notification as a component and put it 5 // TODO(kochi): Generalize the notification as a component and put it
6 // in js/cr/ui/notification.js . 6 // in js/cr/ui/notification.js .
7 7
8 cr.define('options', function() { 8 cr.define('options', function() {
9 /** @const */ var OptionsPage = options.OptionsPage; 9 /** @const */ var OptionsPage = options.OptionsPage;
10 /** @const */ var LanguageList = options.LanguageList; 10 /** @const */ var LanguageList = options.LanguageList;
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 }, 673 },
674 674
675 /** 675 /**
676 * Updates the checkbox for stopping translation. 676 * Updates the checkbox for stopping translation.
677 * @param {string} languageCode Language code (ex. "fr"). 677 * @param {string} languageCode Language code (ex. "fr").
678 * @private 678 * @private
679 */ 679 */
680 updateOfferToTranslateCheckbox_: function(languageCode) { 680 updateOfferToTranslateCheckbox_: function(languageCode) {
681 var div = $('language-options-offer-to-translate'); 681 var div = $('language-options-offer-to-translate');
682 682
683 if (!loadTimeData.getBoolean('enableTranslateSettings')) {
684 div.hidden = true;
685 return;
686 }
687
688 // Translation server supports Chinese (Transitional) and Chinese 683 // Translation server supports Chinese (Transitional) and Chinese
689 // (Simplified) but not 'general' Chinese. To avoid ambiguity, we don't 684 // (Simplified) but not 'general' Chinese. To avoid ambiguity, we don't
690 // show this preference when general Chinese is selected. 685 // show this preference when general Chinese is selected.
691 if (languageCode != 'zh') { 686 if (languageCode != 'zh') {
692 div.hidden = false; 687 div.hidden = false;
693 } else { 688 } else {
694 div.hidden = true; 689 div.hidden = true;
695 return; 690 return;
696 } 691 }
697 692
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 1298
1304 LanguageOptions.onComponentManagerInitialized = function(componentImes) { 1299 LanguageOptions.onComponentManagerInitialized = function(componentImes) {
1305 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes); 1300 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes);
1306 }; 1301 };
1307 1302
1308 // Export 1303 // Export
1309 return { 1304 return {
1310 LanguageOptions: LanguageOptions 1305 LanguageOptions: LanguageOptions
1311 }; 1306 };
1312 }); 1307 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698