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

Need to complete localization of text throughout the app #344

Open
monfresh opened this issue May 22, 2015 · 6 comments
Open

Need to complete localization of text throughout the app #344

monfresh opened this issue May 22, 2015 · 6 comments

Comments

@monfresh
Copy link
Member

There are still many places where text can and should be localized so that it can more easily be translated in non-English deployments.

To fix:

  • Find text that can be localized (such as notices, error messages, button text, labels, help text, etc.)

  • Copy and paste it into a new entry in config/locales/en.yml and use keys that relate to the text. For example, if you're localizing a button, add a new buttons key, and then a separate key that describes each button, such as:

    buttons:
      add_new_location: 'Add a new location'
  • Replace the text in the code with a reference to the localization by using the t helper, like this:

    t('buttons.add_new_location')

    If you're not in a view template, you'll need to use I18n.t instead of the t shortcut.

@tannerj
Copy link
Contributor

tannerj commented Aug 14, 2015

I've wanted so badly to contribute to something open source. This feels like low hanging fruit that I can handle. I'll take a stab at this and submit a pull request. Thanks!

@monfresh
Copy link
Member Author

@tannerj Great! Thanks for doing this.

@tannerj
Copy link
Contributor

tannerj commented Aug 15, 2015

No problem, I'm working on it now. A few questions.

  • Do you want to distinguish between navigation and buttons? (i.e. navigation.edit_account and buttons.add_new_oganization)
  • If a navigation link is repeated in the admin and developer sections (i.e. "Edit account") do you want them namespaced and repeated (i.e. admin.navigaiton.edit_account and navigation.edit_account)? I'm going to start with only navigation and buttons and submit that as a pull-request to make sure we are on the same page. If that looks good, I'll continue hitting the labels and messages.

@monfresh
Copy link
Member Author

Those are good questions. I think distinguishing between nav and buttons is a good idea, but repeating the same text is probably not.

@tannerj
Copy link
Contributor

tannerj commented Aug 17, 2015

@monfresh Pull request #360 is my first take at adding I18n. Please let me know if there are any issues. If not, I'll get started on form labels, error messages, etc.

tannerj added a commit to tannerj/ohana-api that referenced this issue Aug 30, 2015
…ation and buttons in views and specs. Admin buttons are namespaced with "admin".
@tannerj
Copy link
Contributor

tannerj commented Sep 22, 2015

Just a quick update, I haven't abandoned this. I've been on vacation/out of town constantly for the last 3 weeks, I'm hoping to spend some time on this over the next week. Sorry for the delay.

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

2 participants