Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5790)

Unified Diff: chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js

Issue 578303002: Add new braille tables supported by liblouis 2.6.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@libloiusupgrade
Patch Set: Machines are good at sorting, not me... Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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]);
+ }
+};

Powered by Google App Engine
This is Rietveld 408576698