| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 })(); |
| OLD | NEW |