RefugeRestrooms / refugerestrooms

REFUGE restrooms indexes and maps safe restroom locations for trans, intersex, and gender nonconforming individuals.
http://www.refugerestrooms.org
GNU Affero General Public License v3.0
894 stars 261 forks source link

Translations for REFUGE RESTROOMS #396

Closed MatheusFreitag closed 6 years ago

MatheusFreitag commented 6 years ago

Would it be possible to translate this service to other languages?

I'm from Brazil, a country with over 200 million people, and unfortunately the country with the highest rates of violence against trans people in the world.

Services like this can help hundreds of individuals to be safe, but in our reality, most of them do not have access to higher education, and therefore are not able to understand english (Portuguese, for those who don't know, is our native language).

I'm a developer and I would love to help making REFUGE RESTROOMS a more accessible service for those people. Is it possible in anyway?

Thanks for your time!

cllns commented 6 years ago

I think this would be amazing.

In terms of implementation, there are a few steps I can think of: 1) Go through the codebase and replace the English text with i18n (internationalization) keys and helpers. See the comments here: https://github.com/RefugeRestrooms/refugerestrooms/blob/develop/config/locales/en.yml

2) Add some mechanism for inferring someone's language. English by default, then Brazilian Portuguese when we think that's the user's language. We should also let people switch their language from a drop-down or similar, in case we get it wrong, or they prefer a different language.

3) Add translations, in a config/locales/pt-BR.yml file.

A great feature of this is that if this is completed, it makes it very simple to add additional languages, too :)

DeeDeeG commented 6 years ago

Here are some guides, I'm still reading through them:

Intimaria commented 6 years ago

Hi, I so agree with this! Thanks to the clarity of the current .en.yml files, I was able to start to make some translations for the app into Spanish.

I wonder if it would be good to start to systematize into language folders i.e. es_ES for Spanish etc in order for the keep the separate languages organized.

mi-wood commented 6 years ago

@Intimaria that sounds great! I agree on breaking each language down into a subdirectory. Seems like it would make things a little easier to work on.

Intimaria commented 6 years ago

Hey! I tried to do a pull request with the translations, but it seems to have failed the checks. I am not sure what failed, as it did say at the time that it was up-to-date with base branch. Bit of a newbie so any info on how I can sort the errors is appreciated.

DeeDeeG commented 6 years ago

@Intimaria I'm taking a look. Thanks so much for getting the ball rolling!

And generally thanks everyone for pitching in/helping out here!

DeeDeeG commented 6 years ago

The documentation for the built-in Rails I18n system is pretty confusing to me, honestly.

There is this other way to do it that is advertising itself as being simpler, and it's also free for open-source projects: https://translation.io/

Might be worth switching to that? (Thoughts?)

Intimaria commented 6 years ago

@DeeDeeG Glad to help out! It is sorely needed here in Argentina too and I bet there are Spanish speakers all over the world who will be able to access the app once it gets implemented. There are so many incidents of violence and transfemicides related to the discrimination around bathroom use for transgender, intersex and gender non conforming individuals here. Luckily it is becoming a bit more visible as a social issue. I know of a few refuge restrooms here that are not on the map yet probably because the app is only in English. I have contacted people of two local cultural centers that have decided to make their bathrooms gender neutral to let them know this map exists. There are so many languages where it is absolutely necessary. I wish I spoke more!

Re - the question. Personally, I found the current set up very intuitive to work with as a translator (minus the hiccup which you gracefully resolved.).

Anyway, am happy to help further if needed.

DeeDeeG commented 6 years ago

My plan is to keep going through this guide step by step until I get a working demo app with multiple languages... Making the same functionality happen in a separate working branch of refugerestrooms as I go. If there is a lot of interest in collaborating on this, I can try to get a Pull Request open for people to look at as soon as possible. But I'm not at the point where I can post anything new yet, since the next steps are a lot of learning at once and it's taking some time to get through it.

stardust66 commented 6 years ago

@DeeDeeG Check out https://github.com/Intimaria/refugerestrooms/pull/1. I think I've figured out a good way to set the language of the website. What do you think?

DeeDeeG commented 6 years ago

The PR @stardust66 mentioned above got turned into #420, which was just merged.

This sets the language automatically. (It selects the language we have that is the most-preferred according to the user's browser settings, or if we have no language the user prefers, it defaults to English.) I am still hoping/planning that we will have an in-app language switcher, so that users can set the language they prefer.

Thanks again @stardust66 for making this happen. We are making some fairly steady progress, I'd say.

DeeDeeG commented 6 years ago

Translations are working, when tested in Vagrant. (Although users' browsers must be properly configured to request the right language, at the moment...)

[Edit to clarify: Translations other than English are still being worked on, but the underlying system is ready.]

The in-app language switcher functionality still needs some figuring out, basically writing and testing the Ruby code to make it happen. That is discussed in issue #428.

DeeDeeG commented 6 years ago

@MatheusFreitag we are now able to accept translations for the website! If you are interested in adding Portuguese, that would be very cool!

We are also trying to prepare the apps for translation. If you are familiar with translating iOS or Android apps, maybe you can help out with that? That' being discussed in these issues:

In any case, thanks for posting this issue, as things have come a long way since last December when this was originally posted.

MatheusFreitag commented 6 years ago

@DeeDeeG Thank you so much and I loved how people engaged in this!