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

Creating translation for pt-BR language #362

Merged
merged 1 commit into from Apr 28, 2016
Merged

Creating translation for pt-BR language #362

merged 1 commit into from Apr 28, 2016

Conversation

ghost
Copy link

@ghost ghost commented Apr 28, 2016

  • Cloned en.yml file and translated available keys (except for the "types" collection)
  • Change the test "contains localization file paths..." to now get the 2nd file in the
    path, because the pt-BR file appears before (I guess it's because of the dash and upper
    letters)
  • Duplicated the english translation test and switched the context to brazilian portuguese
  • Added the pt-BR language to the available locales in spec_helper.rb

If anything is missing, please, ping me and I'll fix it.

I didn't translated the types collection, to match the fr.yml translation.

- Cloned en.yml file and translated available keys (except for the "types" collection)
- Change the test "contains localization file paths..." to now get the 2nd file in the
path, because the pt-BR file appears before (I guess it's because of the dash and upper
letters)
- Duplicated the english translation test and switched the context to brazilian portuguese
- Added the pt-BR language to the available locales in spec_helper.rb

Fixing translation for the invalid_type key
@tfausak tfausak self-assigned this Apr 28, 2016
@tfausak
Copy link
Collaborator

tfausak commented Apr 28, 2016

This looks great, thank you!

The tests are failing because the locale files aren't in the order they expect. That's hardly a real problem, so I'll go ahead and merge this and then fix the build in master.

@tfausak tfausak merged commit 159d603 into AaronLasseigne:master Apr 28, 2016
@tfausak
Copy link
Collaborator

tfausak commented Apr 28, 2016

Would it be appropriate to provide this translation as pt instead of pt-BR? I'm not familiar with Portuguese, but Rails tends to avoid the regional part of locales. For instance, the default translation is en instead of en-US. The documentation says:

The i18n library takes a pragmatic approach to locale keys, including only the locale part, like :en, :pl, not the region part, like :en-US or :en-GB, which are traditionally used for separating "languages" and "regional setting" or "dialects".

@ghost
Copy link
Author

ghost commented Apr 28, 2016

I think that if this is the case, then both should be provided, because there are some minor variations in words. I'll need to look at the file to see if that's not the case and then supply only the pt.yml.

Later today (after work), I'll take a look at that and supply a PR with the modifications. Is that ok?

@tfausak
Copy link
Collaborator

tfausak commented Apr 28, 2016

Yes, that's perfect!

@AaronLasseigne
Copy link
Owner

@ramirovjr thanks for the translation!

@ghost
Copy link
Author

ghost commented Apr 28, 2016

I've seen that it's merged the PR. It's still necessary to add a pt.yml file?

@tfausak
Copy link
Collaborator

tfausak commented Apr 28, 2016

I would like to provide a pt translation in addition to the pt-BR one. If they are the same, I can copy the file myself. If there are any differences, can you open another PR with the pt translation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants