| OLD | NEW |
| 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 | 5 |
| 6 var l10n = l10n || {}; | 6 var l10n = l10n || {}; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Localize a tag, returning the tag itself and logging an error if no | 9 * Localize a tag, returning the tag itself and logging an error if no |
| 10 * translation exists. | 10 * translation exists. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 var titleTag = element.getAttribute('i18n-title'); | 98 var titleTag = element.getAttribute('i18n-title'); |
| 99 if (titleTag) { | 99 if (titleTag) { |
| 100 element.title = l10n.getTranslationOrError(titleTag, substitutions); | 100 element.title = l10n.getTranslationOrError(titleTag, substitutions); |
| 101 } else { | 101 } else { |
| 102 l10n.localizeElement(element, substitutions, | 102 l10n.localizeElement(element, substitutions, |
| 103 substitutions.length != 0); | 103 substitutions.length != 0); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 }; | 106 }; |
| OLD | NEW |