rubyforgood / coral

An upcoming project for Ruby for Good
MIT License
13 stars 11 forks source link

Internationalize all the things #69

Closed nihonjinrxs closed 4 years ago

nihonjinrxs commented 4 years ago

Resolves #47 , Resolves #48

Description

This change deals with finishing the internationalization work started during the Ruby for Good weekend. Specifically, it:

Type of change

How Has This Been Tested?

A few tests are currently failing due to the use of @restoration_activity_log_entry.nursery_table.name in /rails/app/views/restoration_activity_log_entries/show.html.erb. I poked at updating the FactoryBot definitions to fix that but got into association land really quickly.

Hoping someone with more experience with FactoryBot can help patch the tests.

Tests are fixed with the last commit 2cf33aa. All is passing.

Also manually tested quite a bit, and everything looks good.

Review appreciated.

cflipse commented 4 years ago

Restoration activities depend on a nursery table; just create one before creating the activity.

Under no circumstances should creating a new restoration activity result in the creation of a new table. Down that path lies the interconnected tangle of dependencies that makes an older AR project such a mess to deal with and change. FactoryBot excels at surfacing that particular mess; unfortunately people listen to the wrong signal when that happens.

Considered another way, even going through the interface: one of the pre-requisites for creating a log activity is that the table it applies to actually exists. Specs shouldn't be trying to find fancy ways to avoid fulfilling that pre-req