bikeindex/bike_index

Improve I18n Spec failure reporting

sethherr opened this issue · 4 comments

This is the error I see on CI when something fails:

       Missing 1 i18n keys.

       Run `i18n-tasks missing' to show them

Is there a reason we can't just run the task right there?

The message means there are missing keys in a translation file -- typically because a translate call has been added somewhere (a template, e.g.), but no translation key provided.

Yeah! But rather than showing that error message, why not show:

Missing translations (1) | i18n-tasks v0.9.29
+--------+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Locale | Key                                        | Value in other locales or source                                                                                                                   |
+--------+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|   nl   | organized.users.new.automatic_passwordless | en Your organization is set up for automatic passwordless log in. When you add these users they will receive a link to sign in and will be able to |
+--------+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+

For the normalization task, it make sense that we have to run it ourselves - we can't have it run on CI, because the file changes there won't be committed.

But for this error, I don't see a reason why we couldn't remove the extra step, and just run the check for keys and display which are missing (even though with that table format it's going to be ugly)

I think this is resolved satisfactorily, now that there is only one command to run which does everything.