summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 21:12:02 +0000
committerpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 21:12:02 +0000
commit3e0e269d2f7f92d2409d9e328f678189b158c6b6 (patch)
tree6f18e76e12d4811599f350307050c7bc86bf9d3a
parent0faf0bd93ce937ae915999b694ccf0b59d6c7ce9 (diff)
downloadchromium_src-3e0e269d2f7f92d2409d9e328f678189b158c6b6.zip
chromium_src-3e0e269d2f7f92d2409d9e328f678189b158c6b6.tar.gz
chromium_src-3e0e269d2f7f92d2409d9e328f678189b158c6b6.tar.bz2
define constants for strings in absence of GRIT machinery on mac&linux as a temporary boostraping measure.
Review URL: http://codereview.chromium.org/1854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1929 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/bogus_webkit_strings.h40
-rw-r--r--webkit/glue/localized_strings.cc10
2 files changed, 49 insertions, 1 deletions
diff --git a/webkit/glue/bogus_webkit_strings.h b/webkit/glue/bogus_webkit_strings.h
new file mode 100644
index 0000000..790883f
--- /dev/null
+++ b/webkit/glue/bogus_webkit_strings.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_BOGUS_WEBKIT_STRINGS_H_
+#define WEBKIT_GLUE_BOGUS_WEBKIT_STRINGS_H_
+
+// TODO(pinkerton): This file is temporary for bootstrapping mac&linux.
+//
+// The real webkit_strings.h is generated from a .grd file to create a .h file
+// and the associated resource file. We don't have the GRIT machinery on the
+// Mac (yet) so we cheat here by defining a whole bunch of constants. The calls
+// to webkit_glue::GetLocalizedString will actually try to use NSBundle to load
+// them. It'll fail at runtime, harshly.
+
+
+#define IDS_SEARCHABLE_INDEX_INTRO 1
+#define IDS_FORM_SUBMIT_LABEL 2
+#define IDS_FORM_INPUT_ALT 3
+#define IDS_FORM_RESET_LABEL 4
+#define IDS_FORM_FILE_BUTTON_LABEL 5
+#define IDS_FORM_FILE_NO_FILE_LABEL 6
+#define IDS_RECENT_SEARCHES_NONE 7
+#define IDS_RECENT_SEARCHES 8
+#define IDS_RECENT_SEARCHES_CLEAR 9
+#define IDS_AX_ROLE_WEB_AREA 10
+#define IDS_AX_ROLE_LINK 11
+#define IDS_AX_ROLE_LIST_MARKER 12
+#define IDS_AX_ROLE_IMAGE_MAP 13
+#define IDS_AX_ROLE_HEADING 14
+#define IDS_AX_BUTTON_ACTION_VERB 15
+#define IDS_AX_RADIO_BUTTON_ACTION_VERB 16
+#define IDS_AX_TEXT_FIELD_ACTION_VERB 17
+#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18
+#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 19
+#define IDS_AX_LINK_ACTION_VERB 20
+#define IDS_KEYGEN_HIGH_GRADE_KEY 21
+#define IDS_KEYGEN_MED_GRADE_KEY 22
+
+#endif // WEBKIT_GLUE_BOGUS_WEBKIT_STRINGS_H_
diff --git a/webkit/glue/localized_strings.cc b/webkit/glue/localized_strings.cc
index 094e9c1..d654e93 100644
--- a/webkit/glue/localized_strings.cc
+++ b/webkit/glue/localized_strings.cc
@@ -29,17 +29,25 @@
#include "IntSize.h"
#undef LOG
+#include "webkit/glue/glue_util.h"
#include "webkit/glue/webkit_glue.h"
#include "base/logging.h"
#include "base/string_util.h"
+#include "build/build_config.h"
+#if defined(OS_WIN)
#include "webkit_strings.h"
+#else
+// TODO:(pinkerton): only windows has the GRIT machinery, so we've created a
+// temporary generated header until we can figure out the l10n strategy.
+#include "bogus_webkit_strings.h"
+#endif
using namespace WebCore;
inline String GetLocalizedString(int message_id) {
const std::wstring& str(webkit_glue::GetLocalizedString(message_id));
- return String(str.c_str());
+ return webkit_glue::StdWStringToString(str);
}
String WebCore::searchableIndexIntroduction() {