summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 13:11:27 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 13:11:27 +0000
commit12b38f6e0866c6a88f0724395ed8a60a8eaf1bd3 (patch)
tree5de2d2daf4c51abdef4184208436ebb2ba6ca283
parent7cfb25047b7c7d463b0293854c55242798cd9d33 (diff)
downloadchromium_src-12b38f6e0866c6a88f0724395ed8a60a8eaf1bd3.zip
chromium_src-12b38f6e0866c6a88f0724395ed8a60a8eaf1bd3.tar.gz
chromium_src-12b38f6e0866c6a88f0724395ed8a60a8eaf1bd3.tar.bz2
Use jstemplates in merge and sync setup page.
BUG=19896 Review URL: http://codereview.chromium.org/194092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26102 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/resources/merge_and_sync.html32
-rw-r--r--chrome/browser/views/sync/sync_setup_wizard.cc20
2 files changed, 38 insertions, 14 deletions
diff --git a/chrome/browser/sync/resources/merge_and_sync.html b/chrome/browser/sync/resources/merge_and_sync.html
index 58a769b..ec0e299 100644
--- a/chrome/browser/sync/resources/merge_and_sync.html
+++ b/chrome/browser/sync/resources/merge_and_sync.html
@@ -27,21 +27,28 @@
function showMergeAndSyncDone() {
var throbber = document.getElementById('throbber_container');
throbber.style.display = "none";
- document.getElementById("header").innerHTML =
- "<font size='-1'><b>All done!</b></font>";
- document.getElementById("close").value = "Close";
+ document.getElementById("header").style.display = "none";
+ document.getElementById("header_done").style.display = "block";
+ var closebutton = document.getElementById("close");
+ closebutton.value = document.getElementById("close_txt").innerHTML;
setTimeout(Close, 1600);
}
</script>
</HEAD>
<BODY onload="setInterval(advanceThrobber, 30);">
-<p id="header"><font size="-1"><b>Your bookmarks will be merged.</b></font></p><br />
-<img src="merge_and_sync.png" alt="Merge and sync" />
+<div id="header">
+ <p><font size="-1"><b><span i18n-content="titlewarning"></span></b>
+ </font></p>
+</div>
+<div id="header_done" style="display:none">
+ <p><font size="-1">
+ <b><span i18n-content="alldone"></span></b>
+ </font></p>
+</div>
<br />
-<p><font size="-1">
-Your existing online bookmarks will be merged with the
-bookmarks on this machine. You can use the Bookmark Manager to organize
-your bookmarks after the merge.</font></p>
+<img src="merge_and_sync.png" i18n-values="alt:mergeandsynclabel" />
+<br />
+<p><font size="-1"><span i18n-content="mergeandsyncwarning"></span></font></p>
<br />
<table align="right">
<tr>
@@ -54,11 +61,14 @@ your bookmarks after the merge.</font></p>
</td>
<td>
<input id="acceptMerge" type="button" class="gaia le button" name="accept"
- value="Merge and sync"
+ i18n-values="value:mergeandsynclabel"
onclick="acceptMergeAndSync();" />
</td>
<td>
- <input id="close" type="button" value="Abort" onclick="Close();"/>
+ <input id="close" type="button" i18n-values="value:abortlabel"
+ onclick="Close();"/>
+ <span id="close_txt" i18n-content="closelabel" style="display:none">
+ </span>
</td>
</tr>
</table>
diff --git a/chrome/browser/views/sync/sync_setup_wizard.cc b/chrome/browser/views/sync/sync_setup_wizard.cc
index 3103fb8..be051d1 100644
--- a/chrome/browser/views/sync/sync_setup_wizard.cc
+++ b/chrome/browser/views/sync/sync_setup_wizard.cc
@@ -54,7 +54,7 @@ void SyncResourcesSource::StartDataRequest(const std::string& path_raw,
localized_strings.SetString(L"settingupsync",
"Setting up Bookmarks Sync");
localized_strings.SetString(L"errorsigningin", "Error signing in");
- localized_strings.SetString(L"introduction",
+ localized_strings.SetString(L"introduction",
"Google Chrome can store your bookmark data with your Google account."
"Bookmarks that you create on this computer will instantly be made"
"available on all the computers synced to this account.");
@@ -72,16 +72,30 @@ void SyncResourcesSource::StartDataRequest(const std::string& path_raw,
"I cannot access my account");
localized_strings.SetString(L"createaccount",
"Create a Google Account");
-
+
static const base::StringPiece html(ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_GAIA_LOGIN_HTML));
response = jstemplate_builder::GetI18nTemplateHtml(
html, &localized_strings);
} else if (path_raw == chrome::kSyncMergeAndSyncPath) {
+ DictionaryValue localized_strings;
+ localized_strings.SetString(L"mergeandsyncwarning",
+ "Your existing online bookmarks will be merged with the "
+ "bookmarks on this machine. You can use the Bookmark Manager to "
+ "organize your bookmarks after the merge.");
+ localized_strings.SetString(L"titlewarning",
+ "Your bookmarks will be merged.");
+ localized_strings.SetString(L"mergeandsynclabel", "Merge and sync");
+ localized_strings.SetString(L"abortlabel", "Abort");
+ localized_strings.SetString(L"alldone", "All Done!");
+ localized_strings.SetString(L"closelabel", "Close");
+
static const base::StringPiece html(ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_MERGE_AND_SYNC_HTML));
- response = html.as_string();
+
+ response = jstemplate_builder::GetI18nTemplateHtml(
+ html, &localized_strings);
} else if (path_raw == chrome::kSyncSetupFlowPath) {
static const base::StringPiece html(ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_SYNC_SETUP_FLOW_HTML));