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

Issue 523108: Port back CLD to Linux and Mac and fix Trad Chinese detection (Closed)

Created:
10 years, 11 months ago by jungshik at Google
Modified:
9 years, 7 months ago
Reviewers:
jcampan
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Port back CLD to Linux and Mac by replacing Windows API calls with ICU's equivalent APIs for normalization and lowercasing. I also fixed bug 23553 (Traditional Chinese is not detected) by calling LanguageCode instead of LanguageCode_ISO_639_1 (the latter covers only ISO-639-1, but there are languages detected by CLD that are not covered by ISO 639-1 codes). The html file for CLD testing (french_sentence.html) is explicitly labelled with charset=ISO-8859-1. BUG=25206, 23553 TEST=1. CLD is built on Linux/Mac and the following test pass: - unit_tests: Extension*.DetectTabLanguage and CompactLangDetTest.* - browser_tests: ExtensionBrowserTest.Toolstrip 2. Install the 'cld extension' in chrome/common/extensions/docs/examples/api/i18n/cld and go to http://news.google.com.tw. 'zh-TW' should show up in the upper right hand corner instead of '???'. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=36541

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 3

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Patch Set 25 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -242 lines) Patch
M build/all.gyp View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_browsertests_misc.cc View 16 17 18 19 1 chunk +1 line, -7 lines 0 comments Download
M chrome/browser/extensions/extension_tabs_module.cc View 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/chrome_browser.gypi View 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_renderer.gypi View 17 18 19 3 chunks +2 lines, -4 lines 0 comments Download
M chrome/chrome_tests.gypi View 11 12 13 14 15 16 17 18 19 3 chunks +1 line, -5 lines 0 comments Download
M chrome/renderer/extensions/extension_api_client_unittest.cc View 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/renderer/render_view.h View 17 18 19 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/render_view.cc View 17 18 19 20 21 22 23 24 3 chunks +9 lines, -14 lines 0 comments Download
M chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/french_sentence.html View 21 22 23 24 1 chunk +1 line, -0 lines 0 comments Download
M third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -6 lines 0 comments Download
M third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h View 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +30 lines, -78 lines 0 comments Download
M third_party/cld/base/string_util.h View 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/cld/cld.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +126 lines, -112 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jungshik at Google
Jay, can you take a look? DetectLanguageOfUnicodeText can be changed to accept string16 intead of ...
10 years, 11 months ago (2010-01-12 23:37:53 UTC) #1
jcampan
LGTM with few small nits. Thanks for porting this! Note that I moved the CLD ...
10 years, 11 months ago (2010-01-13 00:24:18 UTC) #2
jungshik at Google
Thanks for the review and the note about the language detection moving to the renderer. ...
10 years, 11 months ago (2010-01-13 07:11:21 UTC) #3
jungshik at Google
Jay, can you take another look? There have been some changes that may warrant another ...
10 years, 11 months ago (2010-01-19 19:31:28 UTC) #4
jcampan
10 years, 11 months ago (2010-01-19 19:42:58 UTC) #5
LGTM

Powered by Google App Engine
This is Rietveld 408576698