New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769160 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 769158



Sign in to add a comment

Location -> Language mapping

Project Member Reported by amoylan@chromium.org, Sep 27 2017

Issue description

Given a CSV mapping S2 cell IDs to language codes, we want to build/code-generate functionality into Chrome that can map a latitude/longitude pair to the corresponding local language.

This can then be used by  crbug.com/769158 .

Dtailed design doc to follow.
 
Cc: napper@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/343b781ab2359724f03847a7ea0f6261fba33ba1

commit 343b781ab2359724f03847a7ea0f6261fba33ba1
Author: Renjie Liu <renjieliu@chromium.org>
Date: Tue Oct 17 11:20:40 2017

Using S2CellId to map location to language code in India.

The cl first generate s2CellId to language code mapping from the
adminregionsdata.csv, and provide a lookup function for any lat/lng
pair to convert to a list of S2CellIds which will be used for query
corresponding language codes.

Design doc:
https://docs.google.com/document/d/1JPuaAsQqSqYELabGla1qn_JKGeB8vNTK8Sa2DgrWQkU/edit?ts=59d2c47b#heading=h.z2uacpmfvnuk

1) Read s2 cellid with lang code data from adminregionsdata.csv;
2) Generate cpp code to look up language code.
3) Lookup logic impl.
4) Add unit test as well.

The generated code will live under <OUT_DIR>/gen/components/language/util

Bug:  769160 
Change-Id: I198488adce31def9741663adf57d59df45a45159
Reviewed-on: https://chromium-review.googlesource.com/559184
Commit-Queue: Renjie Liu <renjieliu@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Jia Meng <jiameng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509360}
[modify] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/BUILD.gn
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/BUILD.gn
[modify] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/DEPS
[modify] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/README
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/adminregionsdata.csv
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/convert_s2_cell.py
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/language_code_locator.cc
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/language_code_locator.h
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/language_code_locator_unittest.cc
[add] https://crrev.com/343b781ab2359724f03847a7ea0f6261fba33ba1/components/language/template/language_code_locator_helper.cc.tmpl

Status: Fixed (was: Started)

Sign in to add a comment