Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @fileoverview | 6 * @fileoverview |
| 7 * 'I18nBehavior' is a behavior to mix in loading of | 7 * 'I18nBehavior' is a behavior to mix in loading of |
| 8 * internationalization strings. | 8 * internationalization strings. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Returns true if a translation exists for |id|. | 62 * Returns true if a translation exists for |id|. |
| 63 * @param {string} id | 63 * @param {string} id |
| 64 * @return {boolean} | 64 * @return {boolean} |
| 65 */ | 65 */ |
| 66 i18nExists: function(id) { | 66 i18nExists: function(id) { |
| 67 return loadTimeData.valueExists(id); | 67 return loadTimeData.valueExists(id); |
| 68 }, | 68 }, |
| 69 }; | 69 }; |
| 70 | |
| 71 /** | |
| 72 * @typedef {{ | |
|
michaelpg
2016/09/15 02:35:19
sweet. consider a "TODO(b/24294625): remove duplic
stevenjb
2016/09/15 18:01:20
Done.
| |
| 73 * i18n: function(string, ...string): string}}, | |
| 74 * i18nAdvanced: function({ | |
| 75 * substitutions: (Array<string>|undefined), | |
| 76 * attrs: (Object<function(Node, string):boolean>|undefined), | |
| 77 * tags: (Array<string>|undefined)}, opts), | |
| 78 * i18nExists: function(string) | |
| 79 * }} | |
| 80 */ | |
| 81 I18nBehavior.Proto; | |
| OLD | NEW |