casa icon indicating copy to clipboard operation
casa copied to clipboard

Remove Translations 14: update t() in app/views/learning_hours/_confirm_note.html.erb

Open compwron opened this issue 3 years ago • 2 comments

Thank you for coming to our workshop!

To complete this issue:

  1. open app/views/learning_hours/_confirm_note.html.erb
  2. find each call of t(STRING)
  3. look up STRING in config/locales/views.en.yml
    1. the YAML file is nested, first with the language (always en here), then the view name, then the action name
    2. so for your STRING, look under en: then learning_hours: then some_action_name: and then STRING:
    3. if you need any help figuring the view or action name to look up the translation with, please ask a workshop helper
  4. replace the usage of t( with the translation you found in config/locales/views.en.yml

This will simplify our templates and make it easier to maintain the code going forward.

Example:

Before:
<span><%= t(".title") %></span>

In config/locales/views.en.yml:
en:
  learning_hours:
    some_action_name:
      title: Hello world

After:
<span>Hello world</span>

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Tuesday 6-8pm Pacific), stakeholder news, and upcoming new issues.

compwron avatar Sep 14 '22 01:09 compwron

The button text ( lines 17 & 19) was missing in the .yml file. I followed the example from the app/views/learning_hours/_form.html.erb page.

Also, line 10 t(".note") is also missing. I tried going to the route locally to see what is displaying but I can't access it.

image

wanderlust-create avatar Oct 04 '22 21:10 wanderlust-create

This issue has been inactive for 243 hours (10.13 days) and will be unassigned after 117 more hours (4.88 days). If you have questions, please visit the #casa channel in slack during Tuesdays 6-8 PM PST. Link: https://rubyforgood.herokuapp.com/

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Oct 15 '22 00:10 github-actions[bot]

This issue has been inactive for 363 hours (15.13 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

github-actions[bot] avatar Oct 20 '22 00:10 github-actions[bot]

I would like to take this issue.

dvsconcept1986 avatar Oct 28 '22 19:10 dvsconcept1986

Looks like all of the t(STRING) instances have been removed already.

dvsconcept1986 avatar Oct 28 '22 20:10 dvsconcept1986

I agree with @dvsconcept1986. I think this is completed and should be closed.

elhalvers avatar Nov 03 '22 01:11 elhalvers