opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
90 stars 73 forks source link

Additional languages in client.csv cause all non-default copy to fail #6996

Open rikukissa opened 6 months ago

rikukissa commented 6 months ago

Describe the bug

If there are language copy items in the client.csv files for languages not defined in the overall OpenCRVS config, none of the copy items in the CSV files will work.

Additionally, this does not produce a clear, actionable error message for the user.

So for example, if you have both English and French in your client.csv

id,description,en,fr
advancedSearch.accordion.hide,Label for hide button when accordion is closed,Hide,Cacher
advancedSearch.accordion.show,Label for show button when accordion is closed,Show,Voir

but only English in your client-config.js

window.config = {
  // ...
  LANGUAGES: 'en',

Image

Tech tasks

euanmillar commented 5 months ago

@rikukissa I wonder how to classify this in terms of priority. Is it not just a configuration error?

rikukissa commented 5 months ago

@euanmillar You could say it is, yea. At the same time, intuitively, I would assume providing additional languages from country config wouldn't break the system. Quick fix for this allows us to not have to impose a specific rule for this so less docs to keep up to date.
I'd say because of this, medium priority.