Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(911)

Issue 561065: Use LanguageCodeWithDialects instead of LanguageCode to get 'zh-CN' ... (Closed)

Created:
10 years, 10 months ago by jungshik at Google
Modified:
9 years, 7 months ago
Reviewers:
jcampan
CC:
chromium-reviews, brettw+cc_chromium.org, darin (slow to review), jam
Visibility:
Public.

Description

Use LanguageCodeWithDialects instead of LanguageCode to get 'zh-CN' instead of 'zh'. This was a part of http://codereview.chromium.org/549123/show (LGTM'd by jcampan by email), but that CL is failing the unittest after the CLD update by jcampan. So, I'm landing this small change first. BUG=32759 TEST=NONE TBR=jcampan Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=38073

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M chrome/renderer/render_view.cc View 1 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
jungshik at Google
10 years, 10 months ago (2010-02-04 01:21:01 UTC) #1
jcampan
10 years, 10 months ago (2010-02-04 01:28:15 UTC) #2
LGTM

Jay

On Wed, Feb 3, 2010 at 5:21 PM,  <jshin@chromium.org> wrote:
> Reviewers: jcampan,
>
> Description:
> Use LanguageCodeWithDialects instead of LanguageCode to get 'zh-CN'
> instead of 'zh'.
>
> This was a part of http://codereview.chromium.org/549123/show (LGTM'd by
> jcampan
> by email), but that CL is failing the unittest after the CLD update by
> jcampan.
> So,
> I'm landing this small change first.
>
> BUG=32759
> TEST=NONE
> TBR=jcampan
>
>
> Please review this at http://codereview.chromium.org/561065
>
> SVN Base: svn://chrome-svn/chrome/trunk/src/
>
> Affected files:
>  M     chrome/renderer/render_view.cc
>
>
> Index: chrome/renderer/render_view.cc
> ===================================================================
> --- chrome/renderer/render_view.cc      (revision 38030)
> +++ chrome/renderer/render_view.cc      (working copy)
> @@ -3170,9 +3170,11 @@
>       cld_language != TG_UNKNOWN_LANGUAGE) {
>     // We should not use LanguageCode_ISO_639_1 because it does not cover
> all
>     // the languages CLD can detect. As a result, it'll return the invalid
> -    // language code for tradtional Chinese among others. |LanguageCode|
> will go
> -    // through ISO 639-1, ISO-639-2 and 'other' tables to do the 'right'
> thing.
> -    language = LanguageCode(cld_language);
> +    // language code for tradtional Chinese among others.
> +    // |LanguageCodeWithDialect| will go through ISO 639-1, ISO-639-2 and
> +    // 'other' tables to do the 'right' thing. In addition, it'll return
> zh-CN
> +    // for Simplified Chinese.
> +    language = LanguageCodeWithDialects(cld_language);
>   }
>   return language;
>  }
> @@ -4277,4 +4279,3 @@
>   Send(new ViewHostMsg_GPUPluginBuffersSwapped(routing_id(), window));
>  }
>  #endif
> -
>
>
>

Powered by Google App Engine
This is Rietveld 408576698