From 56917048940d4ecd4854416cee2901965320dc89 Mon Sep 17 00:00:00 2001 From: mnaganov Date: Fri, 7 Aug 2015 09:48:33 -0700 Subject: [Android WebView] Prepare loading error messages for TC While trying to hook up new strings from crrev.com/1270793002 into TC, I have realized that some changes need to be made to their definitions. 1. In Chrome, html fragments (grit 'structures') are not used. Instead, they just put into .grd files as regular messages, with markup being isolated inside fake placeholders to avoid the translators messing with it. (and grit also requires non-empty 'example' tags to present for them). Thus, removed 'structure.html' and put its contents into a scary-looking message. 2. .grd files containing messages must not include anything, as only .grd files themselves are copied into the internal tree for processing. Thus, split the messages into a separate .grd file with no includes. 3. From the strings .grd, per-locale .pak files must be produced, and then all those xxx_strings_xx.pak files repacked into a single xx.pak file. As WebView already uses content_strings, changed the script to pack content_strings together with the new strings, and renamed the script accordingly. 4. As I would not like to repeat this process again would we need some native strings on the browser part, and as we share native resources between the browser and the renderer, moved the .grd files out from 'renderer' into a new 'ui' subdir. BUG=515691 Review URL: https://codereview.chromium.org/1273263002 Cr-Commit-Position: refs/heads/master@{#342367} --- android_webview/ui/aw_resources.grd | 14 +++++ android_webview/ui/aw_strings.grd | 78 ++++++++++++++++++++++++++++ android_webview/ui/resources/load_error.html | 20 +++++++ 3 files changed, 112 insertions(+) create mode 100644 android_webview/ui/aw_resources.grd create mode 100644 android_webview/ui/aw_strings.grd create mode 100644 android_webview/ui/resources/load_error.html (limited to 'android_webview/ui') diff --git a/android_webview/ui/aw_resources.grd b/android_webview/ui/aw_resources.grd new file mode 100644 index 0000000..9bb0cb7 --- /dev/null +++ b/android_webview/ui/aw_resources.grd @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/android_webview/ui/aw_strings.grd b/android_webview/ui/aw_strings.grd new file mode 100644 index 0000000..44d5135 --- /dev/null +++ b/android_webview/ui/aw_strings.grd @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Webpage not available + + + The webpage at <strong>$1</strong>page.html could not be loaded because: + + + The webpage at <strong>$1</strong>page.html might be temporarily down or it may have moved permanently to a new web address. + + <strong>_Suggestions:</strong><ul><li>_Make sure you have a data connection</li><li>_Reload this webpage later</li><li>_Check the address you entered</li></ul>_ + + + + diff --git a/android_webview/ui/resources/load_error.html b/android_webview/ui/resources/load_error.html new file mode 100644 index 0000000..fc64efd --- /dev/null +++ b/android_webview/ui/resources/load_error.html @@ -0,0 +1,20 @@ + + + + $1 + + + + + +

$1

+ +

$2

+ +

$3

+ + + -- cgit v1.1