+2007-11-01 Adam Roben <aroben@apple.com>
+
+ Fix the parameter type of WebLocalizedString to match the UI_STRING macro
+
+ Reviewed by Sam.
+
+ * WebLocalizableStrings.cpp:
+ (WebLocalizedString):
+ (WebLocalizedLPCTSTR):
+ * WebLocalizableStrings.h:
+
2007-11-01 Alexey Proskuryakov <ap@webkit.org>
Rubber-stamped by Adam Roben.
localizedStringsMainBundle = bundle;
}
-CFStringRef WebLocalizedString(WebLocalizableStringsBundle* stringsBundle, const UniChar* key)
+CFStringRef WebLocalizedString(WebLocalizableStringsBundle* stringsBundle, LPCTSTR key)
{
static CFStringRef notFound = CFSTR("localized string not found");
stringsBundle->bundle = bundle;
}
}
- CFStringRef keyString = CFStringCreateWithCharacters(0, key, (CFIndex)wcslen(reinterpret_cast<const wchar_t*>(key)));
+ CFStringRef keyString = CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(key), (CFIndex)wcslen(key));
CFStringRef result = CFCopyLocalizedStringWithDefaultValue(keyString, 0, bundle, notFound, 0);
CFRelease(keyString);
ASSERT_WITH_MESSAGE(result != notFound, "could not find localizable string %s in bundle", key);
if (stringsBundle && stringsBundle->bundle == WebKitLocalizableStringsBundle.bundle && frameworkLocStrings.contains(keyString))
return frameworkLocStrings.get(keyString).charactersWithNullTermination();
- CFStringRef cfStr = WebLocalizedString(stringsBundle, reinterpret_cast<const UniChar*>(key));
+ CFStringRef cfStr = WebLocalizedString(stringsBundle, key);
String str(cfStr);
if (cfStr)
CFRelease(cfStr);
extern "C" {
#endif
-CFStringRef WebLocalizedString(WebLocalizableStringsBundle *bundle, const UniChar *key);
+CFStringRef WebLocalizedString(WebLocalizableStringsBundle *bundle, LPCTSTR key);
LPCTSTR WebLocalizedLPCTSTR(WebLocalizableStringsBundle *bundle, LPCTSTR key);
void SetWebLocalizedStringMainBundle(CFBundleRef bundle);