Changeset 238406 in webkit


Ignore:
Timestamp:
Nov 20, 2018 2:09:23 PM (5 years ago)
Author:
chris.reid@sony.com
Message:

Remove the need for LocalizedStringsWPE.cpp
https://bugs.webkit.org/show_bug.cgi?id=191854

Reviewed by Michael Catanzaro.

No change in behavior.

Consolidate "Search the Web" as the default search context menu text on non-COCOA ports.

GTK, WPE, and non-CF WIN all had the same default localizedString function
of String::fromUTF8. Move that to LocalizedString.cpp as the default implementation
for all ports not using CF.

  • en.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:
  • platform/gtk/LocalizedStringsGtk.cpp:
  • platform/win/LocalizedStringsWin.cpp:
  • platform/wpe/LocalizedStringsWPE.cpp: Removed.
Location:
trunk/Source/WebCore
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238405 r238406  
     12018-11-20  Christopher Reid  <chris.reid@sony.com>
     2
     3        Remove the need for LocalizedStringsWPE.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=191854
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        No change in behavior.
     9
     10        Consolidate "Search the Web" as the default search context menu text on non-COCOA ports.
     11
     12        GTK, WPE, and non-CF WIN all had the same default localizedString function
     13        of String::fromUTF8. Move that to LocalizedString.cpp as the default implementation
     14        for all ports not using CF.
     15
     16        * en.lproj/Localizable.strings:
     17        * platform/LocalizedStrings.cpp:
     18        * platform/gtk/LocalizedStringsGtk.cpp:
     19        * platform/win/LocalizedStringsWin.cpp:
     20        * platform/wpe/LocalizedStringsWPE.cpp: Removed.
     21
    1222018-11-20  Zan Dobersek  <zdobersek@igalia.com>
    223
  • trunk/Source/WebCore/SourcesWPE.txt

    r238336 r238406  
    7272platform/unix/LoggingUnix.cpp
    7373
    74 platform/wpe/LocalizedStringsWPE.cpp
    7574platform/wpe/PlatformScreenWPE.cpp
    7675platform/wpe/RenderThemeWPE.cpp
  • trunk/Source/WebCore/en.lproj/Localizable.strings

    r238342 r238406  
    599599"Search with %@" = "Search with %@";
    600600
    601 /* Search with Google context menu item */
    602 "Search with Google" = "Search with Google";
     601/* Search the Web context menu item */
     602"Search the Web" = "Search the Web";
    603603
    604604/* Validation message for required file inputs that have no value */
  • trunk/Source/WebCore/platform/LocalizedStrings.cpp

    r238342 r238406  
    7373}
    7474
     75#if !USE(CF)
     76String localizedString(const char* key)
     77{
     78    return String::fromUTF8(key, strlen(key));
     79}
     80#endif
     81
    7582#if ENABLE(CONTEXT_MENUS)
    7683
     
    406413    return WEB_UI_STRING_WITH_MNEMONIC("Inspect Element", "Inspect _Element", "Inspect Element context menu item");
    407414}
     415
     416#if !PLATFORM(COCOA)
     417String contextMenuItemTagSearchWeb()
     418{
     419    return WEB_UI_STRING_WITH_MNEMONIC("Search the Web", "_Search the Web", "Search the Web context menu item");
     420}
     421#endif
    408422
    409423#endif // ENABLE(CONTEXT_MENUS)
     
    10841098#endif
    10851099
     1100#if USE(SOUP)
     1101String unacceptableTLSCertificate()
     1102{
     1103    return WEB_UI_STRING("Unacceptable TLS certificate", "Unacceptable TLS certificate error");
     1104}
     1105#endif
     1106
    10861107} // namespace WebCore
  • trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp

    r214244 r238406  
    109109}
    110110
    111 String contextMenuItemTagSearchWeb()
    112 {
    113     return String::fromUTF8(_("_Search the Web"));
    114 }
    115 
    116111String contextMenuItemTagUnicodeInsertLRMMark()
    117112{
     
    177172}
    178173
    179 String unacceptableTLSCertificate()
    180 {
    181     return String::fromUTF8(_("Unacceptable TLS certificate"));
    182 }
    183 
    184 String localizedString(const char* key)
    185 {
    186     return String::fromUTF8(key, strlen(key));
    187 }
    188 
    189174} // namespace WebCore
  • trunk/Source/WebCore/platform/win/LocalizedStringsWin.cpp

    r214244 r238406  
    4343namespace WebCore {
    4444
     45#if USE(CF)
    4546String localizedString(const char* key)
    4647{
    4748    ASSERT(isMainThread());
    4849
    49 #if USE(CF)
    5050    static CFStringRef notFound = CFSTR("localized string not found");
    5151
     
    5555
    5656    return result.get();
    57 #else
    58     // FIXME: Implement localizedString() for !USE(CF).
    59     return String::fromUTF8(key, strlen(key));
    60 #endif
    61 }
    62 
    63 #if ENABLE(CONTEXT_MENUS)
    64 String contextMenuItemTagSearchWeb()
    65 {
    66     return WEB_UI_STRING("Search with Google", "Search with Google context menu item");
    6757}
    6858#endif
Note: See TracChangeset for help on using the changeset viewer.