Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalise strings throughout the website (i18n) #658

Closed
Skud opened this issue Jan 19, 2015 · 11 comments
Closed

Internationalise strings throughout the website (i18n) #658

Skud opened this issue Jan 19, 2015 · 11 comments

Comments

@Skud
Copy link
Contributor

Skud commented Jan 19, 2015

Taken from this discussion thread:

Here's a list of priorities of strings to be i18n'd by turning "foo" into t("foo") and putting the relevant string in config/locales/en.yml

  • top navbar items ("Crops", "Community", etc)
  • bottom navbar items ("Contact", "Terms of Service", etc)
  • page titles throughout the site, eg. "Edit planting"
  • action buttons, eg. "Save", "Plant this", etc.
  • field names on forms throughout the site, eg. "Planted at:"
  • items shown in the "thumbnail" and "index card" views for plantings, crops, members, etc
  • Note that as we go, we should definitely think about creating helpers or view partials for anything that gets reused frequently, to avoid repetition and make sure there's only one string to translate (see the signup_signin partial as an example).

So the task here is to slog through all of this. I don't expect anyone will do it all at one hit, but feel free to do a handful and issue a PR for any small amount you like.

I've marked this as "curated: beginner" as it seems like a beginner-friendly thing to do. A step by step howto would probably also help with that.

@roryaronson
Copy link

We're just looking into translating our i18n strings for OpenFarm. You might find the discussion/links helpful: openfarmcc/OpenFarm#429

Have you researched any ways/services to translate your strings? Perhaps we can work together considering we have very similar ones?

@Skud
Copy link
Contributor Author

Skud commented Jan 20, 2015

I suspect our strings are sufficiently different that it might not
actually help that much, just looking through some of the text on your
site. We have a few short strings in common ("search", "about",
"privacy") but not much else. I did a rough review of Growstuff's
app/views and found around 1500 strings in our app so there's obviously
a lot there.

Wrt our plans: we'll be working with our community for translations,
taking our lead from a few other open source projects we're familiar
with. We've been looking around for a good web UI for l10n but haven't
found much that impresses us as yet. For now it's just locales/*.yml.

A.

On 21/01/2015 6:57 am, Rory Aronson wrote:

We're just looking into translating our i18n strings for OpenFarm. You
might find the discussion/links helpful: openfarmcc/OpenFarm#429
openfarmcc/OpenFarm#429

Have you researched any ways/services to translate your strings?
Perhaps we can work together considering we have very similar ones?


Reply to this email directly or view it on GitHub
#658 (comment).

Alex "Skud" Bayley
[email protected]
http://growstuff.org/

@roryaronson
Copy link

Right on, that makes sense about most of the strings being different. Thanks for the quick update!

@cesy cesy mentioned this issue Aug 12, 2015
@cesy
Copy link
Member

cesy commented Aug 12, 2015

That linked pull request is an example, if anyone wants to have a go at this.

pozorvlak added a commit that referenced this issue Aug 17, 2015
@jestallin
Copy link

I will take a stab at this.

@cesy
Copy link
Member

cesy commented Aug 21, 2015

Footer will no longer apply as that's now using our CMS. We'll need to investigate how translation for CMS works.

@jestallin
Copy link

@jestallin
Copy link

@cesy 85f7ca4 for drop down and some page titles

@cesy
Copy link
Member

cesy commented Aug 30, 2015

@jestallin looks good, so PR?

@jestallin
Copy link

POC for automating the process using rake and haml-i18n-extractor - 9858180 @cesy

@maco
Copy link
Member

maco commented May 26, 2016

In a lot of these cases, we're dealing with a model's name. We should use .model_name methods. Most likely, that's Model.model_name.singular and Model.model_name.plural (or in situations where we don't know whether singular or plural, Model.model_name.human, but #919 is a separate issue for that)

@CloCkWeRX CloCkWeRX self-assigned this Dec 2, 2016
@maco maco closed this as completed in #1111 Dec 2, 2016
maco added a commit that referenced this issue Dec 2, 2016
@maco maco removed the in progress label Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants