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

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

Issue 2821463003: Translate: remove alpha language support (Closed)
Patch Set: Merge branch 'master' into translate_remove_alpha Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager_render_view_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 (function() { 5 (function() {
6 'use strict'; 6 'use strict';
7 7
8 cr.define('cr.translateInternals', function() { 8 cr.define('cr.translateInternals', function() {
9 9
10 var detectionLogs_ = null; 10 var detectionLogs_ = null;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 span.textContent = formatDate(new Date(details['last_updated'])); 237 span.textContent = formatDate(new Date(details['last_updated']));
238 238
239 var ul = $('prefs-supported-languages-languages'); 239 var ul = $('prefs-supported-languages-languages');
240 ul.innerHTML = ''; 240 ul.innerHTML = '';
241 var languages = details['languages']; 241 var languages = details['languages'];
242 for (var i = 0; i < languages.length; i++) { 242 for (var i = 0; i < languages.length; i++) {
243 var language = languages[i]; 243 var language = languages[i];
244 var li = document.createElement('li'); 244 var li = document.createElement('li');
245 245
246 var text = formatLanguageCode(language); 246 var text = formatLanguageCode(language);
247 if (details['alpha_languages'].indexOf(language) != -1)
248 text += ' - alpha';
249 li.innerText = text; 247 li.innerText = text;
250 248
251 ul.appendChild(li); 249 ul.appendChild(li);
252 } 250 }
253 } 251 }
254 252
255 /** 253 /**
256 * Handles the message of 'countryUpdated' from the browser. 254 * Handles the message of 'countryUpdated' from the browser.
257 * 255 *
258 * @param {Object} details the object containing the country 256 * @param {Object} details the object containing the country
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 /** 496 /**
499 * The entry point of the UI. 497 * The entry point of the UI.
500 */ 498 */
501 function main() { 499 function main() {
502 cr.doc.addEventListener('DOMContentLoaded', 500 cr.doc.addEventListener('DOMContentLoaded',
503 cr.translateInternals.initialize); 501 cr.translateInternals.initialize);
504 } 502 }
505 503
506 main(); 504 main();
507 })(); 505 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager_render_view_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698