OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Holds information about a braille table. | 6 * @fileoverview Holds information about a braille table. |
7 */ | 7 */ |
8 | 8 |
9 goog.provide('cvox.BrailleTable'); | 9 goog.provide('cvox.BrailleTable'); |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 return tables.reduce(mostUncontractedOf, table); | 110 return tables.reduce(mostUncontractedOf, table); |
111 }; | 111 }; |
112 | 112 |
113 | 113 |
114 /** | 114 /** |
115 * @param {!cvox.BrailleTable.Table} table Table to get name for. | 115 * @param {!cvox.BrailleTable.Table} table Table to get name for. |
116 * @return {string} Localized display name. | 116 * @return {string} Localized display name. |
117 */ | 117 */ |
118 cvox.BrailleTable.getDisplayName = function(table) { | 118 cvox.BrailleTable.getDisplayName = function(table) { |
119 var msgs = cvox.ChromeVox.msgs; | 119 var localeName = Msgs.getLocaleDisplayName(table.locale); |
120 var localeName = msgs.getLocaleDisplayName(table.locale); | |
121 if (!table.grade && !table.variant) { | 120 if (!table.grade && !table.variant) { |
122 return localeName; | 121 return localeName; |
123 } else if (table.grade && !table.variant) { | 122 } else if (table.grade && !table.variant) { |
124 return msgs.getMsg('braille_table_name_with_grade', | 123 return Msgs.getMsg('braille_table_name_with_grade', |
125 [localeName, table.grade]); | 124 [localeName, table.grade]); |
126 } else if (!table.grade && table.variant) { | 125 } else if (!table.grade && table.variant) { |
127 return msgs.getMsg('braille_table_name_with_variant', | 126 return Msgs.getMsg('braille_table_name_with_variant', |
128 [localeName, table.variant]); | 127 [localeName, table.variant]); |
129 } else { | 128 } else { |
130 return msgs.getMsg('braille_table_name_with_variant_and_grade', | 129 return Msgs.getMsg('braille_table_name_with_variant_and_grade', |
131 [localeName, table.variant, table.grade]); | 130 [localeName, table.variant, table.grade]); |
132 } | 131 } |
133 }; | 132 }; |
OLD | NEW |