| Index: chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js b/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
|
| index 17a18b29564fd1e727d1228f2237be3fe51af33a..e3689000ce96a61150003362d43ffa1f42bb2daa 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js
|
| @@ -15,6 +15,7 @@ goog.provide('cvox.BrailleTable');
|
| * dots:string,
|
| * id:string,
|
| * grade:(string|undefined),
|
| + * variant:(string|undefined),
|
| * fileName:string
|
| * }}
|
| */
|
| @@ -91,3 +92,25 @@ cvox.BrailleTable.getUncontracted = function(tables, table) {
|
| }
|
| return tables.reduce(mostUncontractedOf, table);
|
| };
|
| +
|
| +
|
| +/**
|
| + * @param {!cvox.BrailleTable.Table} table Table to get name for.
|
| + * @return {string} Localized display name.
|
| + */
|
| +cvox.BrailleTable.getDisplayName = function(table) {
|
| + var msgs = cvox.ChromeVox.msgs;
|
| + var localeName = msgs.getLocaleDisplayName(table.locale);
|
| + if (!table.grade && !table.variant) {
|
| + return localeName;
|
| + } else if (table.grade && !table.variant) {
|
| + return msgs.getMsg('braille_table_name_with_grade',
|
| + [localeName, table.grade]);
|
| + } else if (!table.grade && table.variant) {
|
| + return msgs.getMsg('braille_table_name_with_variant',
|
| + [localeName, table.variant]);
|
| + } else {
|
| + return msgs.getMsg('braille_table_name_with_variant_and_grade',
|
| + [localeName, table.variant, table.grade]);
|
| + }
|
| +};
|
|
|