carpentries / sandpaper

User Interface for The Carpentries Workbench
https://carpentries.github.io/sandpaper
Other
41 stars 26 forks source link

refactor test-translate #558

Closed zkamvar closed 7 months ago

zkamvar commented 7 months ago

This refactors test-translate for preparation of refactoring the translation machinery.

@foggleston has correctly pointed out that updating the translations in the future is going to be a bit of a slog because the developers would need to not only modify the translations used within the tr_() function, but also modify the expectations in tests/testthat/test-translate.R.

The solution is to pack all of the translated strings into a single file so that they could be evaluated later (see the commit comment on https://github.com/carpentries/sandpaper/commit/b7d380e5e43bf5fae39c6f5ed9970cd3a0b22189 for details). In order to do that, we should shore up the tests, which is what this PR does.