Commit 1d471c1c authored by garykac's avatar garykac Committed by Commit bot

[Chromoting] Merge AppRemoting strings into remoting_strings.grd

This cl:
* Merges in new strings needed by AppRemoting
* Updates some shared strings to make them generic (to
  remove the need for a separate AppRemoting resources target)
* Fixes incorrectly annotated i18n-content strings so that our
  verify_resources script can detect them properly.

Strings that were genericized:
* IDS_DESCRIPTION_AUTHORIZE
* IDS_ERROR_BAD_PLUGIN_VERSION
* IDS_ERROR_INCOMPATIBLE_PROTOCOL
* IDS_ERROR_MISSING_PLUGIN

General strings that were added:
* IDS_ERROR_NOT_AUTHORIZED - Will soon be used by fromHttpStatus

New strings:
* IDS_ERROR_APP_NOT_AUTHORIZED - Used by AppRemoting instead
  of the generic string to provide more info to the user.
* IDS_PRODUCT_NAME_APP_STREAMING - Used instead of IDS_PRODUCT_NAME
  so that we don't need a separate resources target for AppRemoting.
* ...many more, including those that will be used by the host
  code when it is merged...

BUG=

Review URL: https://codereview.chromium.org/873883002

Cr-Commit-Position: refs/heads/master@{#313004}
parent 8fab1bba
This diff is collapsed.
......@@ -17,7 +17,7 @@ found in the LICENSE file.
<meta-include type="javascript"/>
<title i18n-content="PRODUCT_NAME"></title>
<title i18n-content="PRODUCT_NAME_APP_STREAMING"></title>
</head>
<body class="full-height">
......
......@@ -173,7 +173,7 @@ remoting.AppRemoting.prototype.init = function(connector) {
} else if (xhr.status == 401) {
that.handleError(remoting.Error.AUTHENTICATION_FAILED);
} else if (xhr.status == 403) {
that.handleError(remoting.Error.NOT_AUTHORIZED);
that.handleError(remoting.Error.APP_NOT_AUTHORIZED);
} else if (xhr.status == 502 || xhr.status == 503) {
that.handleError(remoting.Error.SERVICE_UNAVAILABLE);
} else {
......@@ -343,7 +343,7 @@ remoting.AppRemoting.prototype.handleError = function(errorTag) {
console.error('Connection failed: ' + errorTag);
remoting.LoadingWindow.close();
remoting.MessageWindow.showErrorMessage(
chrome.i18n.getMessage(/**i18n-content*/'CONNECTION_FAILED'),
chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'),
chrome.i18n.getMessage(/** @type {string} */ (errorTag)));
};
......
......@@ -25,7 +25,7 @@ remoting.LoadingWindow = function() {};
*/
remoting.LoadingWindow.onTimeout_ = function() {
remoting.MessageWindow.showErrorMessage(
chrome.i18n.getMessage(/**i18n-content*/'PRODUCT_NAME'),
chrome.i18n.getMessage(/*i18n-content*/'PRODUCT_NAME_APP_STREAMING'),
chrome.i18n.getMessage(remoting.Error.SERVICE_UNAVAILABLE));
};
......@@ -45,13 +45,13 @@ remoting.LoadingWindow.show = function() {
var transparencyWarning = '';
if (navigator.platform.indexOf('Mac') != -1) {
transparencyWarning =
chrome.i18n.getMessage(/**i18n-content*/'NO_TRANSPARENCY_WARNING');
chrome.i18n.getMessage(/*i18n-content*/'NO_TRANSPARENCY_WARNING');
}
remoting.loadingWindow_ = remoting.MessageWindow.showTimedMessageWindow(
chrome.i18n.getMessage(/**i18n-content*/'PRODUCT_NAME'),
chrome.i18n.getMessage(/**i18n-content*/'FOOTER_CONNECTING'),
chrome.i18n.getMessage(/*i18n-content*/'PRODUCT_NAME_APP_STREAMING'),
chrome.i18n.getMessage(/*i18n-content*/'FOOTER_CONNECTING'),
transparencyWarning,
chrome.i18n.getMessage(/**i18n-content*/'CANCEL'),
chrome.i18n.getMessage(/*i18n-content*/'CANCEL'),
remoting.MessageWindow.quitApp,
kConnectionTimeout,
remoting.LoadingWindow.onTimeout_);
......
......@@ -251,7 +251,7 @@ remoting.MessageWindow.showErrorMessage = function(title, message) {
var options = /** @type {remoting.MessageWindowOptions} */ ({
title: title,
message: message,
buttonLabel: chrome.i18n.getMessage(/**i18n-content*/'OK'),
buttonLabel: chrome.i18n.getMessage(/*i18n-content*/'OK'),
onResult: remoting.MessageWindow.quitApp
});
return new remoting.MessageWindow(options);
......
......@@ -32,7 +32,10 @@ remoting.Error = {
INVALID_HOST_DOMAIN: /*i18n-content*/'ERROR_INVALID_HOST_DOMAIN',
P2P_FAILURE: /*i18n-content*/'ERROR_P2P_FAILURE',
REGISTRATION_FAILED: /*i18n-content*/'ERROR_HOST_REGISTRATION_FAILED',
NOT_AUTHORIZED: /*i18n-content*/'ERROR_NOT_AUTHORIZED'
NOT_AUTHORIZED: /*i18n-content*/'ERROR_NOT_AUTHORIZED',
// TODO(garykac): Move app-specific errors into separate location.
APP_NOT_AUTHORIZED: /*i18n-content*/'ERROR_APP_NOT_AUTHORIZED'
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment