Giter VIP home page Giter VIP logo

Comments (7)

jrconlin avatar jrconlin commented on June 20, 2024 1

@shane-tomlinson @l-hedgehog, damn good note. To be honest, I don't see these as being replacements, rather, a cascade of "best effort" type attempts. Since the GCP headers will probably be more "up-to-date" than the MaxMind db, I can see using those preferentially, then falling back to doing a MaxMind if GCP comes up empty for whatever reason.

A bit more sensitive question might be determining how we actually localize a locality (e.g. Hong Kong, or disputed areas in the Kashmir). Granted, with some of those spots, not quite sure getting Firefox sync working right is the highest priority item...

from channelserver.

rfk avatar rfk commented on June 20, 2024

Oh that is rad. This and the mooted rate-limiting headers injected from elsewhere will simplify the application code a lot!

We will need to think about l10n but that should be solvable.

from channelserver.

jrconlin avatar jrconlin commented on June 20, 2024

Note, should make mmdb an optional data source, and take the header value as preferred.

from channelserver.

shane-tomlinson avatar shane-tomlinson commented on June 20, 2024

We will need to think about l10n but that should be solvable.

It should be, but we should figure this out sooner rather than later, I wouldn't want to force our l10n team to translate city and town names world-wide, because from the description of client_city, this field is in English and there is no "canonical list". Perhaps there's a library that does this already.

Name of the city from which the request originated, for example, “Mountain View” for Mountain View, California. There is no canonical list of valid values for this variable. The city names may contain US-ASCII letters, numbers, spaces, and the following characters: !#$%&'*+-.^_`|~.

From the description, the city names will never contain locale specific characters, e.g., an ñ in Spanish.

from channelserver.

jrconlin avatar jrconlin commented on June 20, 2024

I suspect that the level of granularity for location is probably the same as the MaxMind DB, so probably draws the line at incorporated cities. I also strongly suspect that the suggested course for getting localization is to use the Translate service, and probably some heavy server side caching.

I'm guessing that the channel server should probably do the translation based on the UA provided Accept-Language header. I'm already doing that for the MaxMind stuff, so not a big deal. I would probably have to add in a DB cache mechanism which might impact initial response time for the first query for an unknown language. I'm also guessing that we'd want to be super careful about checking some city names like "Intercourse, PA" or "Anus, FR".

from channelserver.

shane-tomlinson avatar shane-tomlinson commented on June 20, 2024

@l-hedgehog raised concerns about using GCP specific headers for this functionality since Moz China's FxA stack will remain in AWS.

from channelserver.

jrconlin avatar jrconlin commented on June 20, 2024

Added w/ #63

from channelserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.