echarts-maps / echarts-countries-js

Packages countries and regions as an asset for echarts.
https://echarts-maps.github.io/echarts-countries-js/
Open Data Commons Open Database License v1.0
308 stars 291 forks source link

WIP: Add English translation #14

Open bkmgit opened 4 years ago

bkmgit commented 4 years ago

Have added English translation to preview.html as preview-en.html by changing the javascript map files. Is it better to create additional javascript loading options per language (for example using po files), or to have multiple map directories, one for each language?

chfw commented 4 years ago

First of all, welcome onboard! You are making positive contributions now.

Since you are onboard, I need to share some of the maintenance burden with you. echarts-countroes-js is the target folder, containing all minified, uglified javascripts, which is not human readable.

Hence, I prefer that we keep a source directory to keep human readable javascripts, like switzerland country js. Yes, it is arguable where to put yours as the majority of them are from starbucks repo. Suggestion are welcome. But as of the current state of this PR, I am afraid that it is not maintainable for me.

chfw commented 4 years ago

here is the example source directory: https://github.com/echarts-maps/echarts-countries-js/tree/master/geojson/shape-with-internal-borders

chfw commented 4 years ago

here is the pyecharts registry file: https://github.com/echarts-maps/echarts-countries-js/blob/master/registry.json

Yes, pyecharts from Python can use this package too!

chfw commented 4 years ago

please note also, this repo has gulpfile for automation: https://github.com/echarts-maps/echarts-countries-js/blob/master/gulpfile.js. although it is old version 3 style.

bkmgit commented 4 years ago

Thanks for the review. It would be helpful to support more than just Mandarin and English. It seems there is some software for Javascript localization:

Comments on the above options and suggestions for other options or a custom solution are helpful.

So far eCharts seems to have Mandarin and English support, though not yet a localization and internationalization strategy that would allow more languages without increasing developer time.

chfw commented 4 years ago

https://github.com/apache/incubator-echarts/tree/master/src

they support these additional languages: ES, FI, TH

chfw commented 4 years ago

One more thing, I could not follow what's changed in this PR.

what natural earth did to their json assets, they provided name_zh, name_en in properties. but echarts only pick 'name' as its display name.