Changeset 53159 in webkit


Ignore:
Timestamp:
Jan 12, 2010 1:15:28 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-12 Jungshik Shin <jshin@chromium.org>

Reviewed by Darin Adler

https://bugs.webkit.org/show_bug.cgi?id=31597

Make ICU's text breakiterator and string search use Chrome's UI
language instead of 'en-US' or the OS UI language.

As long as the webkit layout tests are run in en-US locale, there'd be
no visible change.

  • platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp: (UILanguage): (WebCore::currentSearchLocaleID): (WebCore::currentTextBreakLocaleID):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53157 r53159  
     12010-01-12  Jungshik Shin  <jshin@chromium.org>
     2
     3        Reviewed by Darin Adler
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=31597
     6
     7        Make ICU's text breakiterator and string search use Chrome's UI
     8        language instead of 'en-US' or the OS UI language.
     9
     10        As long as the webkit layout tests are run in en-US locale, there'd be
     11        no visible change.
     12
     13        * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
     14        (UILanguage):
     15        (WebCore::currentSearchLocaleID):
     16        (WebCore::currentTextBreakLocaleID):
     17
    1182010-01-12  Beth Dakin  <bdakin@apple.com>
    219
  • trunk/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp

    r45762 r53159  
    2323#include "TextBreakIteratorInternalICU.h"
    2424
     25#include "CString.h"
     26#include "Language.h"
     27#include "PlatformString.h"
     28#include <wtf/StdLibExtras.h>
     29
    2530namespace WebCore {
     31
     32static const char* UILanguage()
     33{
     34    // Chrome's UI language can be different from the OS UI language on Windows.
     35    // We want to return Chrome's UI language here.
     36    DEFINE_STATIC_LOCAL(CString, locale, (defaultLanguage().latin1()));
     37    return locale.data();
     38}
    2639
    2740const char* currentSearchLocaleID()
    2841{
    29     // FIXME: Should use system locale.
    30     return "";
     42    return UILanguage();
    3143}
    3244
    3345const char* currentTextBreakLocaleID()
    3446{
    35     // FIXME: Should use system locale.
    36     return "en_us";
     47    return UILanguage();
    3748}
    3849
Note: See TracChangeset for help on using the changeset viewer.