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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_commands.js

Issue 1362223003: Improve braille related message descriptions and clean up message handling in Chromevox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputtypeexception
Patch Set: Move another braille message to Msgs.Untranslated Created 5 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/chromevox/injected/user_commands.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_commands.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_commands.js
index 70c23884d20c2156133fd6dc74e02b23c56bccac..db2c7243cb1c51909e468d96ae3f55b3d976eea9 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_commands.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_commands.js
@@ -299,11 +299,11 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
var error = '';
var wrap = '';
if (cmdStruct.forward) {
- wrap = cvox.ChromeVox.msgs.getMsg('wrapped_to_top');
- error = cvox.ChromeVox.msgs.getMsg(NodeInfoStruct.forwardError);
+ wrap = Msgs.getMsg('wrapped_to_top');
+ error = Msgs.getMsg(NodeInfoStruct.forwardError);
} else if (cmdStruct.backward) {
- wrap = cvox.ChromeVox.msgs.getMsg('wrapped_to_bottom');
- error = cvox.ChromeVox.msgs.getMsg(NodeInfoStruct.backwardError);
+ wrap = Msgs.getMsg('wrapped_to_bottom');
+ error = Msgs.getMsg(NodeInfoStruct.backwardError);
}
var found = null;
var status = cmdStruct.status || cvox.UserEventDetail.Status.PENDING;
@@ -504,7 +504,7 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
if (url != '') {
cvox.ChromeVox.tts.speak(url, cvox.QueueMode.QUEUE);
} else {
- cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg('no_url_found'),
+ cvox.ChromeVox.tts.speak(Msgs.getMsg('no_url_found'),
cvox.QueueMode.QUEUE);
}
break;
@@ -527,12 +527,12 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
}
break;
case 'forceClickOnCurrentItem':
- prefixMsg = cvox.ChromeVox.msgs.getMsg('element_clicked');
+ prefixMsg = Msgs.getMsg('element_clicked');
var targetNode = cvox.ChromeVox.navigationManager.getCurrentNode();
cvox.DomUtil.clickElem(targetNode, false, false);
break;
case 'forceDoubleClickOnCurrentItem':
- prefixMsg = cvox.ChromeVox.msgs.getMsg('element_double_clicked');
+ prefixMsg = Msgs.getMsg('element_double_clicked');
var targetNode = cvox.ChromeVox.navigationManager.getCurrentNode();
cvox.DomUtil.clickElem(targetNode, false, false, true);
break;
@@ -559,7 +559,7 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
break;
case 'toggleSelection':
var selState = cvox.ChromeVox.navigationManager.togglePageSel();
- prefixMsg = cvox.ChromeVox.msgs.getMsg(
+ prefixMsg = Msgs.getMsg(
selState ? 'begin_selection' : 'end_selection');
break;
case 'startHistoryRecording':
@@ -651,7 +651,7 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
case 'passThroughMode':
cvox.ChromeVox.passThroughMode = true;
cvox.ChromeVox.tts.speak(
- cvox.ChromeVox.msgs.getMsg('pass_through_key'), cvox.QueueMode.QUEUE);
+ Msgs.getMsg('pass_through_key'), cvox.QueueMode.QUEUE);
break;
case 'toggleSearchWidget':
cvox.SearchWidget.getInstance().toggle();
@@ -659,8 +659,8 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
case 'toggleEarcons':
prefixMsg = cvox.ChromeVox.earcons.toggle() ?
- cvox.ChromeVox.msgs.getMsg('earcons_on') :
- cvox.ChromeVox.msgs.getMsg('earcons_off');
+ Msgs.getMsg('earcons_on') :
+ Msgs.getMsg('earcons_off');
break;
case 'showHeadingsList':
@@ -689,7 +689,7 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
});
} else {
cvox.ChromeVox.tts.speak(
- cvox.ChromeVox.msgs.getMsg('no_long_desc'),
+ Msgs.getMsg('no_long_desc'),
cvox.QueueMode.FLUSH,
cvox.AbstractTts.PERSONALITY_ANNOTATION);
}
@@ -709,10 +709,10 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
// Math specific commands.
case 'toggleSemantics':
if (cvox.TraverseMath.toggleSemantic()) {
- cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg('semantics_on'),
+ cvox.ChromeVox.tts.speak(Msgs.getMsg('semantics_on'),
cvox.QueueMode.QUEUE);
} else {
- cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg('semantics_off'),
+ cvox.ChromeVox.tts.speak(Msgs.getMsg('semantics_off'),
cvox.QueueMode.QUEUE);
}
break;
@@ -748,7 +748,7 @@ cvox.ChromeVoxUserCommands.doCommand_ = function(cmdStruct) {
if (errorMsg != '') {
cvox.ChromeVox.tts.speak(
- cvox.ChromeVox.msgs.getMsg(errorMsg),
+ Msgs.getMsg(errorMsg),
cvox.QueueMode.FLUSH,
cvox.AbstractTts.PERSONALITY_ANNOTATION);
} else if (cvox.ChromeVox.navigationManager.isReading()) {

Powered by Google App Engine
This is Rietveld 408576698