chromium / hstspreload.org

:lock: Chromium's HSTS preload list submission website.
https://hstspreload.org
BSD 3-Clause "New" or "Revised" License
772 stars 90 forks source link

Could you create a translation system? #149

Open cherinyy opened 6 years ago

cherinyy commented 6 years ago

I think website should have multiple language versions.

lgarron commented 6 years ago

A good goal! In fact, this came up at the HSTS meetup: https://docs.google.com/document/d/1d21wtTCQ-a6vN7yDwyhLkuBpgmLoJCKMI7aRrXNBIbI/edit#bookmark=id.rnxjoi2ypbuw

Unfortunately, I never had the time to act on it. One-off Google sites also didn't have a good mechanism for accommodating translations. If someone contributes a PR to add support without increasing future maintenance burden (apart from the string translations themselves), @nharper might be able to look into a way to translate the site using Google's process, similar to Chromium.

ExE-Boss commented 6 years ago

This could potentially be done using fluent.js npm, which is the JS implementation of Project Fluent.

To do this server-side, it might be easier to use some templating and fluent-rs Crates.io, since Rust is compiled to a native binary like Go, but I don’t know how well those two languages interface with each other.

lgarron commented 6 years ago

I think it would be strongly preferable to do this using the existing languages.

There are mainly two kinds of strings:

It would be nice to handle both in Go, although a smooth solution in JS can be useful for most users.