Internationalisation project notes

Hello everyone,

I had a go on the internationalisation stuff. I started with the first
step: replacing all language strings used in the ruby code and move them
to the English language file. Unfortunately, there were a lot more
strings than expected. I found around 400. That took me 16 hours, so we
thought we’d check in and discuss a plan for getting to MVP within the
budgeted resources - which might mean a lighter touch on some other
areas.

So where are we now? Rohan listed the following steps of
internationalisation:

1. replace strings in ruby code

This is done. So the localisation can start. That means that someone can
take the new English language file with all the strings and translates
them into another language. I’m sure there will be difficulties. In some
cases the context of a string might not be clear which makes it hard to
find the right translation. In other cases it might be grammatically
difficult, because there are strings that represent only a part of a
sentence. For example “Filter by” or “products at” assume some data
afterwards. That might not work in all languages. We’ll find out. So
give plenty of feedback.

@RohanM mentioned tools like Transifex and LocaleApp that can help
translating. I think that we should get some experience in translating
first, see were the problems are and then try some of the tools to see
if they solve these problems. Just taking the language file and
translating the strings is the simplest way, so let’s get started with
that.

Currently, the English language file is here:
https://github.com/openfoodfoundation/openfoodnetwork/blob/i18n-replace-strings-in-views/config/locales/en.yml

It contains roughly 450 lines looking like this:
email_signup_greeting: Hello!

“Hello!” is the part to be translated. The labels on the left side
should not be touched. Some translations contain variables like:
email_signup_shop_html: “You can start shopping online now at %{link}.”

It’s important to keep the symbols as they are, but the text around them
can be changed. If the label on the left side ends with “_html” (like
the one above), then you can use HTML tags in your text, but then you
also have to encode HTML entities like & as &. That’s as complicated
as it gets.

So hop to it @lawrence @sylvain @MyriamBoure :smile:

2. use “globalize” to provide multi language versions of user data like enterprise descriptions

The second one is only needed if you would like to have one website
serving several languages. That would make sense in Switzerland for
example. But I think that we should plan that as a separate project,
because there has already been discussion that this is not required in
the first round.

3. change the icon font and replace the open/closed signs

The third one involves some graphics design. As soon as someone
contributes some new, cool and non-language symbols, we can change the
symbol font. We don’t actually have a designer on the team here at the
moment - does someone want to have a go at them? @CynthiaReynolds

###4. replace strings in Javascript code
The fourth one is a bit more tricky. Rohan mentioned already that he’s
not certain how that should be solved. I need some more time on
investigation here, and may post some questions if we need more input
before making a decision how to do it.

Maikel & Kirsten