datasette icon indicating copy to clipboard operation
datasette copied to clipboard

i18n support

Open johnfelipe opened this issue 3 years ago • 8 comments

I want contribute for translate UI to es, de, de and it if you share strings

johnfelipe avatar Jul 31 '22 02:07 johnfelipe

I also would like a French version UI and am prepared to contribute to this translation.

Having worked an i18n project in the past, there can be complexities with the strings and the various grammars and syntaxes, depending on how things are set up. It's a pretty big job to retroactively i18n-ify things, but for us at least we have requirements to provide French-language interfaces at our University, so I would be willing to participate in this initiative.

sachaj avatar Aug 31 '22 18:08 sachaj

I want contribute if strings is in pot file, or Json, yml, yaml, Js or other type ..

johnfelipe avatar Aug 31 '22 19:08 johnfelipe

OK, I'm convinced that it's time to start figuring this out.

I've done a little bit of this with Django in the past, but Datasette isn't built on Django.

It looks to me like the key library for implementing this is Babel: https://babel.pocoo.org/en/latest/

It's been around since 2007 and is very widely used: https://github.com/python-babel/babel/network/dependents?package_id=UGFja2FnZS01MDM0NTU3NQ%3D%3D

Also found these hints on getting it to work with Jinja: https://stackoverflow.com/questions/12046998/babel-doesnt-recognize-jinja2-extraction-method-for-language-support

simonw avatar Sep 01 '22 03:09 simonw

My hope is that Datasette actually has a relatively small i18n footprint - there really aren't that many screens with strings that will need translating.

Translating the documentation would be a much bigger task, but that's not a blocker on getting the interface itself internationalized.

simonw avatar Sep 01 '22 03:09 simonw

Some tutorials that look useful:

  • https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xiii-i18n-and-l10n
  • https://phrase.com/blog/posts/i18n-advantages-babel-python/

simonw avatar Sep 01 '22 03:09 simonw

I want to begin translation to es and it documentation, if u like i would do PR asap. But user interface, frontend and backend is a good feature be i18n support. When you have may be .pot file I can translate to, or Json file with all strings for internationalized

johnfelipe avatar Sep 01 '22 03:09 johnfelipe

I don't want to start any efforts around documentation translation until after the Datasette 1.0 release, because I'd like to be confident that we're not translating documentation that may have some big changes before Datasette is fully stable!

simonw avatar Sep 01 '22 03:09 simonw

I want to do may be 3 or 4 PR for your evaluation, and when you allowed then I want supporting that effort

El mié, 31 de ago. de 2022, 10:36 p. m., Simon Willison < @.***> escribió:

I don't want to start any efforts around documentation translation until after the Datasette 1.0 release, because I'd like to be confident that we're not translating documentation that may have some big changes before Datasette is fully stable!

— Reply to this email directly, view it on GitHub https://github.com/simonw/datasette/issues/1775#issuecomment-1233697166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFDUWQ22P3KVJVMRC7TV4AQFNANCNFSM55EFFS5Q . You are receiving this because you authored the thread.Message ID: @.***>

johnfelipe avatar Sep 01 '22 03:09 johnfelipe

Is this where we talk about i18n of results? Or is that a separate thread.

e.g. Having country_long show España in the Spanish version of the global power plants demo site instead of Spain.

metamoof avatar Feb 10 '23 18:02 metamoof