diff options
author | Philip Chimento <philip@endlessm.com> | 2013-09-10 17:43:25 -0700 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2013-09-16 10:30:42 -0700 |
commit | e4048bffd4153f7d7bd978f5779caaec8e76a069 (patch) | |
tree | d1cbcae017c6a05a2bccb5ae1a85f76c33376e9b /test/webhelper | |
parent | e05a96375c7e6f26af836bd7e19bf99014a1e7cf (diff) |
Do translation with webhelper
Previously, the translation was such that it did a dummy translation,
italicizing the text to be translated. Now it looks for a translationFunction
property on the app object, and calls that on the text.
[endlessm/eos-sdk#290]
Diffstat (limited to 'test/webhelper')
-rw-r--r-- | test/webhelper/smoke-tests/webview.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/webhelper/smoke-tests/webview.js b/test/webhelper/smoke-tests/webview.js index c3c7dd5..fe2a655 100644 --- a/test/webhelper/smoke-tests/webview.js +++ b/test/webhelper/smoke-tests/webview.js @@ -52,7 +52,7 @@ using the <input>\'s ID</a> \ <p><a href="endless://addStars?id=starspan">I want \ stars!</a> <span id="starspan"/></p> \ \ -<p>This is text that will be translated: <span name="translatable">Hello, \ +<p>This is text that will be italicized: <span name="translatable">Hello, \ world!</span></p> \ \ </body> \ @@ -62,6 +62,10 @@ const TestApplication = new Lang.Class({ Name: 'TestApplication', Extends: WebHelper.Application, + _translationFunction: function(string) { + return string.italics(); + }, + /* *** ACTIONS AVAILABLE FROM THE WEB VIEW *** */ _webActions: { |