Well, some translations are used not only in Bulk Coop, but in Orders & Fulfillment Reports or Orders And Distributors. Or, for example, order has products, order_cycle has products and variant belongs to product.
I have no opinion about
app.yes but it doesn’t let you have symbols
t(:yes) anymore and if you have symbol, you already know that it is global translation, right?
Still not sure translations by file path is good though still need to maintain activerecord/spree etc.
Another thought is to do some “hacking” to introduce some
i18n_namespace = lib.open_food_network/bulk_coop_report into classes or something like that.
My main concern is that if we have many layers it is harder to maintain it. For example, I need to add
abn_placeholder to shopfront somewhere and in en.yml I find it is in
admin.enterprises.form.business_details.abn_placeholder: eg. 99 123 456 789 already. In this case instead of thinking how to refactor it, it would be easier just to create another one
shopfront.enterprises.index.abn_placeholder. Are we find with this kind of duplication? Because then every language needs that duplicated translation as well. (
shopfront namespaces where just examples, not sure those are good).
But if we maintain only 2-3 layers then developer would just need to move layer up or so.
I still need to contemplate about it