Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add locale (i18n) support #81

Open
lidel opened this issue Oct 19, 2020 · 1 comment
Open

Add locale (i18n) support #81

lidel opened this issue Oct 19, 2020 · 1 comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up

Comments

@lidel
Copy link
Member

lidel commented Oct 19, 2020

New source dataset format introduced in #80 provides country and city names in other languages than English
(at the time of writing this, we have names in: de, en, es, fr, ja, pt-BR, ru and zh-CN).

We could add support for passing optional language code to the lookup method.

Details of how to modify b-tree format remain TBD.

Open questions:

  • should we have separate b-tree for each language, or should we keep all translations in a single tree?
    • if it is a single tree, how to ensure client is not fetching strings that they do not need?
@lidel lidel added kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue exp/expert Having worked on the specific codebase is important labels Oct 19, 2020
@lidel
Copy link
Member Author

lidel commented Oct 19, 2022

fwiw source CSV identified by DATA_HASH in src/generate/index.js includes a few locales:

$ ipfs ls bafybeicfcxk4bx3nwmg3hwjmlc6n2qzn73mfm5itfpadwh5w7bux2chgz4
bafkreihes7r7nzovjeihybcvm7r4wofc4raq4auw56ufn2dnte4tioso2e 55        COPYRIGHT.txt
bafybeihdsvtywrrbmoqisqrltapw2zbgbu5tl6x5ijjmrauo6boeqo3vay 218942111 GeoLite2-City-Blocks-IPv4.csv
bafybeibvkpyxiad2at2ld4hgjat2boqkpolg3niqekp67fugrnp4pbvihi 80894247  GeoLite2-City-Blocks-IPv6.csv
bafybeicrybijxosuh4l4mrtfc6hi4ey6rvv5pluqhnqzdozqkk34svp4yy 8730908   GeoLite2-City-Locations-de.csv
bafybeiatzmaijbha4n6fmfqiy3vm4k62k5jbeu27rtkdcdjhgslcadxqqa 10432599  GeoLite2-City-Locations-en.csv
bafybeifqloagg3fjnyt5loeac4j2xl6nuav4mgywkk5x7tqe6exxirv2wy 8663321   GeoLite2-City-Locations-es.csv
bafybeiaqi4ayqxex2y4szinily32bah2vahhbkxb6j2xiamtpf7am56kte 9258315   GeoLite2-City-Locations-fr.csv
bafybeiguklag6kpmr3nvtrqrthj7m4lhi5dst4ems25h2mdswkgzultnxa 11645375  GeoLite2-City-Locations-ja.csv
bafybeie2hoxesntzwzwrpzeaxrb3wiudgoy2j3a2umnb5jyqom7s6zkyiu 8668327   GeoLite2-City-Locations-pt-BR.csv
bafybeic5yeidvb7dsreanhhlxllm7wacnkbwwrczcjk5o3hzayl3lznuva 11729812  GeoLite2-City-Locations-ru.csv
bafybeicvkmkdettefag6ai6v6uwf5hp6f2knjlvwpqsrdpgbk6ieuruca4 9019475   GeoLite2-City-Locations-zh-CN.csv
bafkreic7pswr7zmeynivapbgoi44p5fauyhofvfhhidefqhxziixfuqvom 398       LICENSE.txt

We are not using them during b-tree generation, but we could store a map with Location names in available locales, and either accept optional language code as new lookup parameter, or simply return them as a Locales map.

@lidel lidel added exp/novice Someone with a little familiarity can pick up P2 Medium: Good to have, but can wait until someone steps up and removed exp/expert Having worked on the specific codebase is important labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

1 participant