summaryrefslogtreecommitdiffstats
path: root/remoting/webapp
diff options
context:
space:
mode:
authorjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 18:24:49 +0000
committerjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 18:24:49 +0000
commit159407f4e3b39981c6fd4c883eefdfa56e4b8cea (patch)
treeff69935ca40e1337c12156400112fd300bff3b52 /remoting/webapp
parente95db56091fad94c9f7f028fb19d08e8d9652971 (diff)
downloadchromium_src-159407f4e3b39981c6fd4c883eefdfa56e4b8cea.zip
chromium_src-159407f4e3b39981c6fd4c883eefdfa56e4b8cea.tar.gz
chromium_src-159407f4e3b39981c6fd4c883eefdfa56e4b8cea.tar.bz2
Fixed footer i18n so that 3 entries are no longer needed.
BUG=None TEST=Manual Review URL: http://codereview.chromium.org/7661033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97340 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r--remoting/webapp/me2mom/_locales/en/messages.json236
-rw-r--r--remoting/webapp/me2mom/choice.html79
-rw-r--r--remoting/webapp/me2mom/l10n.js23
-rw-r--r--remoting/webapp/me2mom/manifest.json4
-rw-r--r--remoting/webapp/me2mom/remoting.js18
5 files changed, 191 insertions, 169 deletions
diff --git a/remoting/webapp/me2mom/_locales/en/messages.json b/remoting/webapp/me2mom/_locales/en/messages.json
index 116649b..c0dab30 100644
--- a/remoting/webapp/me2mom/_locales/en/messages.json
+++ b/remoting/webapp/me2mom/_locales/en/messages.json
@@ -1,143 +1,157 @@
{
- "accessCode": {
+ "ACCESS_CODE": {
"message": "Access code",
- "description": "Label for the access code entry box"
+ "description": "Label for the access code entry box. This is where the client user enters the code that permits access to the host."
},
- "accessCodeTimer": {
- "message": "This access code will expire in",
- "description": "Text preceding the access code timer"
+ "ACCESS_CODE_TIMER": {
+ "message": "This access code will expire in $timeout$",
+ "description": "Text displayed when the access code is due to time out within 30 seconds.",
+ "placeholders": {
+ "timeout": {
+ "content": "$1",
+ "example": "0:30"
+ }
+ }
},
- "cancel": {
+ "CANCEL": {
"message": "Cancel",
- "description": "Label for general-purpose Cancel buttons"
+ "description": "Label for general-purpose Cancel buttons."
},
- "closePrompt": {
+ "CLOSE_PROMPT": {
"message": "Navigating away from this page will end your Chromoting session.",
"description": "Message shown when the Chromoting client tab is closed while a connection is active."
},
- "connectButton": {
+ "CONNECT_BUTTON": {
"message": "Connect",
- "description": "Label for the connect button"
+ "description": "Label for the connect button. Clicking this button will start the Chromoting session if the access code is correct."
},
- "continueButton": {
+ "CONTINUE_BUTTON": {
"message": "Continue",
- "description": "Label for the continue button on the pre-authorization page"
+ "description": "Label for the continue button on the pre-authorization page. Clicking this button takes the user to the standard Google Accounts authorization page."
},
- "continuePrompt": {
+ "CONTINUE_PROMPT": {
"message": "You are currently sharing this machine with another user. Please confirm that you want to continue sharing.",
- "description": "Message displayed when the session has lasted longer than five minutes, explaining that the host computer is being shared and asking whether or not the user wants to continue sharing it"
+ "description": "Message displayed when the session has lasted longer than five minutes, explaining that the host computer is being shared and asking whether or not the user wants to continue sharing it."
},
- "debugButton": {
+ "DEBUG_BUTTON": {
"message": "Debug Log",
- "description": "Label for the debug log button"
+ "description": "Label for the debug log button. Clicking this button reveals log of debug messages at the bottom of the page."
},
- "descriptionConnect": {
+ "DESCRIPTION_AUTHORIZE": {
+ "message": "In order to use Chromoting you must first grant extended access permissions to your computer. Click Continue to authorize. You only have to do this once.",
+ "description": "Text shown when the app first starts, or if the access token is invalidated, explaining the need to authorize the Chromoting app before use."
+ },
+ "DESCRIPTION_CONNECT": {
"message": "Have the user whose computer you wish to access click ‘Share this computer’ and then have them read their access code to you.",
- "description": "Description for the client app"
+ "description": "Description for the client app. This is shown to the client user above the access code entry box before the connection is started."
},
- "descriptionShare": {
+ "DESCRIPTION_SHARE": {
"message": "With Chromoting you can easily let another Chrome user see and control your computer.",
- "description": "Description for the host app"
+ "description": "Description for the host app. This is shown to the host above the 'Share' button user before the client connects."
},
- "disconnectButton": {
+ "DISCONNECT_BUTTON": {
"message": "Disconnect",
- "description": "Label for the disconnect button"
+ "description": "Label for the disconnect button, without keyboard shortcuts. Only used in case we aren't able to enable hot-key support."
},
- "disconnectButtonPlusShortcutLinux": {
+ "DISCONNECT_BUTTON_PLUS_SHORTCUT_LINUX": {
"message": "Disconnect (Ctrl+Alt+Esc)",
- "description": "Shortcut for the disconnect action on Linux"
+ "description": "Label for the disconnect button including the Linux keyboard shortcut."
},
- "disconnectButtonPlusShortcutMacOSX": {
+ "DISCONNECT_BUTTON_PLUS_SHORTCUT_MAC_OS_X": {
"message": "Disconnect (⌥⌃⎋)",
- "description": "Shortcut for the disconnect action on Mac OS X. This probably doesn't need localizing since it is common practise on this platform to refer to the keys involved using symbols."
+ "description": "Label for the disconnect button including the Mac OS X keyboard shortcut."
},
- "disconnectButtonPlusShortcutWindows": {
+ "DISCONNECT_BUTTON_PLUS_SHORTCUT_WINDOWS": {
"message": "Disconnect (Ctrl+Alt+Esc)",
- "description": "Shortcut for the disconnect action on Windows"
+ "description": "Label for the disconnect button including the Windows keyboard shortcut."
},
- "errorGeneric": {
+ "ERROR_GENERIC": {
"message": "An error occurred.",
- "description": "Generic error message"
+ "description": "Generic error message, displayed if something went wrong, but we aren't able to determine what, or the cause is too technical to be of use to a typical user."
},
- "errorInvalidAccessCode": {
+ "ERROR_INVALID_ACCESS_CODE": {
"message": "Invalid access code.",
- "description": "Error displayed if an invalid access code is entered"
+ "description": "Error displayed if an invalid access code is entered."
},
- "errorMissingPlugin": {
+ "ERROR_MISSING_PLUGIN": {
"message": "The viewer plugin is missing or out-of-date. Please upgrade to a more recent version of Chrome.",
- "description": "Error displayed if the client plugin fails to load"
+ "description": "Error displayed if the client plugin fails to load. The most common reason for this is that the web-app is being used in a version of Chrome that doesn't support it."
},
- "errorNoResponse": {
+ "ERROR_NO_RESPONSE": {
"message": "Failed to get response from server.",
- "description": "Error displayed if an XHR request comes back empty"
- },
- "errorOAuthFailed": {
- "message": "Unable to fetch OAuth2 token. Try logging out and re-authorizing.",
- "description": "Error displayed if the OAuth2 token cannot be refreshed"
+ "description": "Error displayed by the client if the server does not respond to a network request."
},
- "footerClient1": {
- "message": "Click here to ",
- "description": "Instructions to switch to host mode (first part, before the hyperlink--can be empty)"
+ "ERROR_AUTHENTICATION_FAILED": {
+ "message": "Authentication failed. Try logging out and re-authorizing.",
+ "description": "Error displayed if authentication fails. This can be caused by stale credentials, in which logging out of the web-app and retrying can fix the problem."
},
- "footerClient2": {
- "message": "share this computer",
- "description": "Instructions to switch to host mode (second part, hyperlinked--must not be empty)"
+ "ERROR_UNABLE_TO_GET_TOKEN": {
+ "message": "Unable to get access token.",
+ "description": "Error message displayed if an access token could not be generated."
},
- "footerClient3": {
- "message": " with another user.",
- "description": "Instructions to switch to host mode (third part, after the hyperlink--can be empty)"
+ "FOOTER_CLIENT": {
+ "message": "Click here to $linkBegin$share this computer$linkEnd$ with another user.",
+ "description": "Instructions and hyperlink to switch from client mode to host mode.",
+ "placeholders": {
+ "linkBegin": {
+ "content": "$1",
+ "example": "<a href=...>"
+ },
+ "linkEnd": {
+ "content": "$2",
+ "example": "</a>"
+ }
+ }
},
- "footerCrOS": {
+ "FOOTER_CHROME_OS": {
"message": "Currently Hosting is not supported on Chromebooks. Hosting is supported on Windows, Mac OS X and Linux.",
- "description": "Footer text displayed on ChromeOS in lieu of the mode switch hyperlink"
- },
- "footerHost1": {
- "message": "Click here to ",
- "description": "Instructions to switch to client mode (first part, before the hyperlink--can be empty)"
+ "description": "Footer text displayed on ChromeOS in lieu of the mode switch hyperlink."
},
- "footerHost2": {
- "message": "access a shared computer",
- "description": "Instructions to switch to client mode (second part, hyperlinked--must not be empty)"
- },
- "footerHost3": {
- "message": ".",
- "description": "Instructions to switch to client mode (third part, after the hyperlink--can be empty)"
+ "FOOTER_HOST": {
+ "message": "Click here to $linkBegin$access a shared computer$linkEnd$.",
+ "description": "Instructions and hyperlink to switch from host mode to client mode.",
+ "placeholders": {
+ "linkBegin": {
+ "content": "$1",
+ "example": "<a href=...>"
+ },
+ "linkEnd": {
+ "content": "$2",
+ "example": "</a>"
+ }
+ }
},
- "footerWaiting": {
+ "FOOTER_WAITING": {
"message": "waiting for connection…",
- "description": "Footer text at the host when waiting for a client to connect"
+ "description": "Footer text displayed at the host after an access code has been generated, but before a client connects."
},
- "instructionsShareAbove": {
+ "INSTRUCTIONS_SHARE_ABOVE": {
"message": "To begin sharing your desktop, read out the access code below to the person who will be assisting you.",
- "description": "Instructions shown above the access code when it is ready to be conveyed to the client"
+ "description": "Instructions shown above the access code when it is ready to be conveyed to the client."
},
- "instructionsShareBelow": {
+ "INSTRUCTIONS_SHARE_BELOW": {
"message": "Once they enter the code your sharing session will begin.",
- "description": "Instructions shown below the access code when it is ready to be conveyed to the client"
+ "description": "Instructions shown below the access code when it is ready to be conveyed to the client."
},
- "labelConnected": {
+ "LABEL_CONNECTED": {
"message": "Connected:",
- "description": "String displayed in front of the host in the in-session toolbar"
+ "description": "String displayed in front of the host when a connection is active informing the client user who they are connected to."
},
- "logoutButton": {
+ "LOGOUT_BUTTON": {
"message": "Logout",
- "description": "Logout button, visible if the user has authenticated"
- },
- "messageAuthorize": {
- "message": "In order to use Chromoting you must first grant extended access permissions to your computer. Click Continue to authorize. You only have to do this once.",
- "description": "Text shown when the app first starts, or if the access token is invalidated"
+ "description": "Logout button, visible if the user has authenticated. Clicking this clears authentication credentials and returns the web-app to the initial 'unauthenticated' state."
},
- "messageGenerating": {
+ "MESSAGE_GENERATING": {
"message": "Generating access code…",
- "description": "Text shown while generating an access code"
+ "description": "Text shown while generating an access code."
},
- "messageSessionFinished": {
+ "MESSAGE_SESSION_FINISHED": {
"message": "You are no longer connected to the remote desktop.",
- "description": "Message displayed when the client has (been) disconnected"
+ "description": "Message displayed when the client has disconnected."
},
- "messageShared": {
- "message": "Your desktop is currently being shared with $USER$.",
- "description": "Message shown on the host computer while a session is active",
+ "MESSAGE_SHARED": {
+ "message": "Your desktop is currently being shared with $user$.",
+ "description": "Message shown on the host computer while a session is active informing them who is connected.",
"placeholders": {
"user": {
"content": "$1",
@@ -145,50 +159,48 @@
}
}
},
- "modeAuthorize": {
+ "MODE_AUTHORIZE": {
"message": "Authorize",
- "description": "Sub-title for the one-time authorization step"
+ "description": "Sub-title for the one-time authorization step. Displayed after the product name and separated by a chevron."
},
- "modeConnect": {
+ "MODE_CONNECT": {
"message": "Connect",
- "description": "Sub-title for the client app"
+ "description": "Sub-title for the client app. Displayed after the product name and separated by a chevron."
},
- "modeShare": {
+ "MODE_SHARE": {
"message": "Share",
- "description": "Sub-title for the host app"
+ "description": "Sub-title for the host app. Displayed after the product name and separated by a chevron."
},
- "ok": {
+ "OK": {
"message": "OK",
- "description": "Label for general-purpose OK buttons"
+ "description": "Label for general-purpose OK buttons."
},
- "productName": {
- "message": "Chromoting"
+ "PRODUCT_DESCRIPTION": {
+ "message": "Remote support in Chrome.",
+ "description": "Web-app description. Displayed in Chrome's extensions page."
+ },
+ "PRODUCT_NAME": {
+ "message": "Chromoting",
+ "description": "The product name. Displayed in various Chrome page, including the New Tab page, and displayed prominently on the app's main page."
},
- "productNameAndVersion": {
- "message": "Chromoting v1.0"
+ "PRODUCT_NAME_AND_VERSION": {
+ "message": "Chromoting v1.0",
+ "description": "The product name and version number. Displayed in Chrome's extensions page."
},
- "scaleButton": {
+ "SCALE_BUTTON": {
"message": "Fit Screen",
- "description": "Label for the scaling button"
+ "description": "Label for the scaling button. Clicking this toggles between scale-to-fit and 1:1 mode. This is displayed in a tool-bar with limited horizontal space; please try to keep the translation under 20 characters."
},
- "shareButton": {
+ "SHARE_BUTTON": {
"message": "Share This Computer",
- "description": "Label for the share button"
+ "description": "Label for the share button on the host-side. Clicking this button generates an access code to be conveyed to the client."
},
- "stopSharingButton": {
+ "STOP_SHARING_BUTTON": {
"message": "Stop Sharing",
- "description": "Label for the 'stop sharing' button"
- },
- "unableToGetToken": {
- "message": "Unable to get access token.",
- "description": "Error message displayed if an access token could not be generated"
+ "description": "Label for the 'stop sharing' button on the host-side. Clicking this button disconnects the client."
},
- "verifyingCode": {
+ "VERIFYING_CODE": {
"message": "Verifying access code…",
- "description": "Message displayed while the access code is verified"
- },
- "webappDescription": {
- "message": "Remote support in Chrome.",
- "description": "Web-app description"
+ "description": "Message displayed on the client while the access code is verified."
}
-} \ No newline at end of file
+}
diff --git a/remoting/webapp/me2mom/choice.html b/remoting/webapp/me2mom/choice.html
index 9b3c1f1..db7edb0 100644
--- a/remoting/webapp/me2mom/choice.html
+++ b/remoting/webapp/me2mom/choice.html
@@ -22,7 +22,7 @@ found in the LICENSE file.
<script src="plugin_settings.js"></script>
<script src="remoting.js"></script>
<script src="xhr.js"></script>
- <title i18n-content="productName"></title>
+ <title i18n-content="PRODUCT_NAME"></title>
</head>
<body onBeforeUnload="return remoting.promptClose();"
@@ -44,13 +44,13 @@ found in the LICENSE file.
<span id="email-status">
<span id="current-email"></span>
(<a href="#" onclick="remoting.clearOAuth2();"
- i18n-content="logoutButton"></a>)
+ i18n-content="LOGOUT_BUTTON"></a>)
</span>
</div>
<div class="top-secondary" data-ui-mode="auth client host">
<a href="#" onclick="remoting.toggleDebugLog();"
- i18n-content="debugButton"></a>
+ i18n-content="DEBUG_BUTTON"></a>
</div>
<div id="session-toolbar"
@@ -58,15 +58,15 @@ found in the LICENSE file.
class="toolbar-container"
hidden>
<div class="toolbar-border">
- <span id="session-status-message" i18n-content="labelConnected"></span>
+ <span id="session-status-message" i18n-content="LABEL_CONNECTED"></span>
<strong id="connected-to"></strong>
<button type="button" onclick="remoting.disconnect();"
- i18n-content="disconnectButton"></button>
+ i18n-content="DISCONNECT_BUTTON"></button>
<span class="end-align">
<button type="button" onclick="remoting.toggleDebugLog();"
- i18n-content="debugButton"></button>
+ i18n-content="DEBUG_BUTTON"></button>
<button type="button" onclick="remoting.toggleScaleToFit();"
- i18n-content="scaleButton"></button>
+ i18n-content="SCALE_BUTTON"></button>
</span>
</div>
<div class="toolbar-stub">
@@ -79,11 +79,11 @@ found in the LICENSE file.
<header class="choice-header">
<img id="icon" src="chromoting128.png">
<h1 class="icon-label">
- <span i18n-content="productName">
- </span>&nbsp;&rsaquo;&nbsp;<span i18n-content="modeAuthorize"
+ <span i18n-content="PRODUCT_NAME">
+ </span>&nbsp;&rsaquo;&nbsp;<span i18n-content="MODE_AUTHORIZE"
data-ui-mode="auth">
- </span><span i18n-content="modeConnect" data-ui-mode="client">
- </span><span i18n-content="modeShare" data-ui-mode="host">
+ </span><span i18n-content="MODE_CONNECT" data-ui-mode="client">
+ </span><span i18n-content="MODE_SHARE" data-ui-mode="host">
</span>
</h1>
</header>
@@ -91,60 +91,59 @@ found in the LICENSE file.
<img id="divider-top" src="dividertop.png">
<div id="auth-panel" data-ui-mode="auth">
- <div class="description" i18n-content="messageAuthorize"></div>
+ <div class="description" i18n-content="DESCRIPTION_AUTHORIZE"></div>
<div class="centered-button">
<button id="auth-button" class="big-button"
type="button" onclick="remoting.oauth2.doAuthRedirect();"
- i18n-content="continueButton"></button>
+ i18n-content="CONTINUE_BUTTON"></button>
</div>
</div> <!-- auth-panel -->
<div id="host-panel" data-ui-mode="host">
<div data-ui-mode="host.unshared">
- <div class="description" i18n-content="descriptionShare"></div>
+ <div class="description" i18n-content="DESCRIPTION_SHARE"></div>
<div class="centered-button">
<button id="share-button" class="big-button"
type="button" onclick="remoting.tryShare();"
- i18n-content="shareButton"></button>
+ i18n-content="SHARE_BUTTON"></button>
</div>
</div> <!-- host.unshared -->
<div data-ui-mode="host.waiting-for-code" class="message"
- i18n-content="messageGenerating">
+ i18n-content="MESSAGE_GENERATING">
</div> <!-- host.waiting-for-code -->
<div data-ui-mode="host.waiting-for-connection">
- <div class="description" i18n-content="instructionsShareAbove"></div>
+ <div class="description" i18n-content="INSTRUCTIONS_SHARE_ABOVE"></div>
<div id="access-code-display" dir="ltr"></div>
<div id="access-code-countdown-container">
<div id="access-code-countdown" class="expiring" hidden>
- <span i18n-content="accessCodeTimer"></span>
- 0:<span id="seconds-remaining"></span>
+ <span id="seconds-remaining" i18n-content="ACCESS_CODE_TIMER"></span>
</div>
</div>
- <div class="description" i18n-content="instructionsShareBelow"></div>
+ <div class="description" i18n-content="INSTRUCTIONS_SHARE_BELOW"></div>
</div> <!-- host.waiting-for-connection -->
<div data-ui-mode="host.shared">
<div id="host-shared-message" class="message"
- i18n-content="messageShared"></div>
+ i18n-content="MESSAGE_SHARED"></div>
<div class="centered-button">
<button type="button" class="big-button"
onclick="remoting.cancelShare();"
- i18n-content="stopSharingButton">
+ i18n-content="STOP_SHARING_BUTTON">
</button>
</div>
</div> <!-- host.shared -->
<div data-ui-mode="host.share-failed" class="message">
<span id="unable-to-get-token" class="error-state"
- i18n-content="unableToGetToken">
+ i18n-content="ERROR_UNABLE_TO_GET_TOKEN">
</span>
<div class="centered-button">
<button type="button" class="big-button"
onclick="remoting.setMode('host.unshared');"
- i18n-content="ok">
+ i18n-content="OK">
</button>
</div>
</div> <!-- host.share-failed -->
@@ -155,13 +154,13 @@ found in the LICENSE file.
<div id="client-panel" data-ui-mode="client">
<div data-ui-mode="client.unconnected">
- <div class="description" i18n-content="descriptionConnect"></div>
+ <div class="description" i18n-content="DESCRIPTION_CONNECT"></div>
<div id="access-code-entry-row">
<form action="" onsubmit="remoting.tryConnect(); return false;">
- <label for="access-code-entry" i18n-content="accessCode"></label>
+ <label for="access-code-entry" i18n-content="ACCESS_CODE"></label>
<input id="access-code-entry" type="text"/>
<button id="connect-button" class="big-button"
- type="submit" i18n-content="connectButton"></button>
+ type="submit" i18n-content="CONNECT_BUTTON"></button>
</form>
</div> <!-- code-entry-row -->
</div> <!-- client.unconnected -->
@@ -172,7 +171,7 @@ found in the LICENSE file.
Cancel button in the footer.
-->
<div data-ui-mode="client.connecting" class="message"
- i18n-content="verifyingCode">
+ i18n-content="VERIFYING_CODE">
</div> <!-- client.connecting -->
<div data-ui-mode="client.connect-failed"
@@ -181,12 +180,12 @@ found in the LICENSE file.
</div> <!-- client.connect-failed -->
<div data-ui-mode="client.session-finished"
- class="message" i18n-content="messageSessionFinished">
+ class="message" i18n-content="MESSAGE_SESSION_FINISHED">
</div> <!-- client.session-finished -->
<div data-ui-mode="client.connect-failed client.session-finished"
class="centered-button">
- <button type="button" class="big-button" i18n-content="ok"
+ <button type="button" class="big-button" i18n-content="OK"
onclick="remoting.setMode(
remoting.AppMode.CLIENT_UNCONNECTED);">
</button>
@@ -198,30 +197,28 @@ found in the LICENSE file.
<footer class="choice-footer">
<div id="client-footer-text" data-ui-mode="client.unconnected">
- <span i18n-content="footerClient1"></span><a
- class="switch-mode" href="#" i18n-content="footerClient2"
- onclick="remoting.setAppMode(remoting.AppMode.HOST);"></a><span
- i18n-content="footerClient3"></span>
+ <span i18n-content="FOOTER_CLIENT"
+ i18n-value-1="<a href='#' onclick='remoting.setAppMode(remoting.AppMode.HOST);'>"
+ i18n-value-2="</a>"></span>
</div> <!-- client-footer-text -->
<div id="client-footer-text-cros" data-ui-mode="client.unconnected"
- i18n-content="footerCrOS">
+ i18n-content="FOOTER_CHROME_OS">
</div> <!-- client-footer-text-cros -->
<div id="host-footer-text" data-ui-mode="host.unshared">
- <span i18n-content="footerHost1"></span><a
- class="switch-mode" href="#" i18n-content="footerHost2"
- onclick="remoting.setAppMode(remoting.AppMode.CLIENT);"></a><span
- i18n-content="footerHost3"></span>
+ <span i18n-content="FOOTER_HOST"
+ i18n-value-1="<a href='#' onclick='remoting.setAppMode(remoting.AppMode.CLIENT);'>"
+ i18n-value-2="</a>"></span>
</div> <!-- host-footer-text -->
<div id="waiting-footer"
data-ui-mode="host.waiting-for-connection host.waiting-for-code">
<img src="spinner.gif">
- <span class="waiting icon-label" i18n-content="footerWaiting"></span>
+ <span class="waiting icon-label" i18n-content="FOOTER_WAITING"></span>
<button id="cancel-button" class="big-button"
onclick="remoting.cancelPendingOperation();"
- i18n-content="cancel">
+ i18n-content="CANCEL">
</button>
</div> <!-- waiting-footer -->
</footer>
diff --git a/remoting/webapp/me2mom/l10n.js b/remoting/webapp/me2mom/l10n.js
index 409feed..d504f90 100644
--- a/remoting/webapp/me2mom/l10n.js
+++ b/remoting/webapp/me2mom/l10n.js
@@ -9,15 +9,15 @@ var l10n = l10n || {};
* Localize an element by setting its innerText according to its i18n-content
* attribute, and an optional set of substitutions.
* @param {Element} element The element to localize.
- * @param {string=} opt_substitutions An optional set of substitution strings
- * corresponding to the "placeholders"attributes in messages.json.
+ * @param {{string|Object}=} opt_substitutions An optional set of substitution
+ * strings corresponding to the "placeholders" attributes in messages.json.
* @return {boolean} True if the localization was successful; false otherwise.
*/
l10n.localizeElement = function(element, opt_substitutions) {
var tag = element.getAttribute('i18n-content');
var translation = chrome.i18n.getMessage(tag, opt_substitutions);
if (translation) {
- element.innerText = translation;
+ element.innerHTML = translation;
} else {
console.error('Missing translation for "' + tag + '":', element);
}
@@ -25,12 +25,25 @@ l10n.localizeElement = function(element, opt_substitutions) {
};
/**
- * Localize all tags with the i18n-content attribute.
+ * Localize all tags with the i18n-content attribute, using i18n-data-n
+ * attributes to specify any placeholder substitutions.
*/
l10n.localize = function() {
var elements = document.querySelectorAll('[i18n-content]');
for (var i = 0; i < elements.length; ++i) {
var element = elements[i];
- l10n.localizeElement(element);
+ var substitutions = null;
+ for (var j = 1; j < 9; ++j) {
+ var attr = 'i18n-value-' + j;
+ if (element.hasAttribute(attr)) {
+ if (!substitutions) {
+ substitutions = [];
+ }
+ substitutions.push(element.getAttribute(attr));
+ } else {
+ break;
+ }
+ }
+ l10n.localizeElement(element, substitutions);
}
};
diff --git a/remoting/webapp/me2mom/manifest.json b/remoting/webapp/me2mom/manifest.json
index b445a34..8262cf0 100644
--- a/remoting/webapp/me2mom/manifest.json
+++ b/remoting/webapp/me2mom/manifest.json
@@ -1,7 +1,7 @@
{
- "name": "__MSG_productNameAndVersion__ NAME_SUFFIX",
+ "name": "__MSG_PRODUCT_NAME_AND_VERSION__ NAME_SUFFIX",
"version": "1.0.UNIQUE_VERSION",
- "description": "__MSG_webappDescription__",
+ "description": "__MSG_PRODUCT_DESCRIPTION__",
"default_locale": "en",
"app": {
"launch": {
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index 464605b..52c363d 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -39,11 +39,11 @@ remoting.HOST_PLUGIN_ID = 'host-plugin-id';
/** @enum {string} */
remoting.ClientError = {
- NO_RESPONSE: 'errorNoResponse',
- INVALID_ACCESS_CODE: 'errorInvalidAccessCode',
- MISSING_PLUGIN: 'errorMissingPlugin',
- OAUTH_FETCH_FAILED: 'errorOAuthFailed',
- OTHER_ERROR: 'errorGeneric'
+ NO_RESPONSE: 'ERROR_NO_RESPONSE',
+ INVALID_ACCESS_CODE: 'ERROR_INVALID_ACCESS_CODE',
+ MISSING_PLUGIN: 'ERROR_MISSING_PLUGIN',
+ OAUTH_FETCH_FAILED: 'ERROR_AUTHENTICATION_FAILED',
+ OTHER_ERROR: 'ERROR_GENERIC'
};
/**
@@ -275,9 +275,9 @@ remoting.decrementAccessCodeTimeout_ = function() {
}
remoting.updateAccessCodeTimeoutElement_ = function() {
- var pad = (remoting.accessCodeExpiresIn < 10) ? '0' : '';
- document.getElementById('seconds-remaining').innerText =
- pad + remoting.accessCodeExpiresIn;
+ var pad = (remoting.accessCodeExpiresIn < 10) ? '0:0' : '0:';
+ l10n.localizeElement(document.getElementById('seconds-remaining'),
+ pad + remoting.accessCodeExpiresIn);
if (!updateTimeoutStyles_()) {
disableTimeoutCountdown_();
}
@@ -611,7 +611,7 @@ remoting.promptClose = function() {
remoting.currentMode != remoting.AppMode.HOST_UNSHARED) ||
remoting.getMajorMode() == remoting.AppMode.IN_SESSION ||
remoting.currentMode == remoting.AppMode.CLIENT_CONNECTING) {
- var result = chrome.i18n.getMessage('closePrompt');
+ var result = chrome.i18n.getMessage('CLOSE_PROMPT');
return result;
}
}