Bubble up parsing error from en.json (#27362)

Running `make i18n-extract` on a en.json file
with bad JSON will just wipe off all keys instead
of throwing the error. This is very confusing
and can lead to a lot of time wasted because
there's no indication that the JSON is incorrect.

Fixing this.

```release-note
NONE
```
This commit is contained in:
Agniva De Sarker 2024-06-26 20:27:22 +05:30 committed by GitHub
parent 86a98ea030
commit 59998b0b84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,8 +113,8 @@ func getBaseFileSrcStrings(mattermostDir string) ([]Translation, error) {
return nil, err
}
var translations []Translation
_ = json.Unmarshal(jsonFile, &translations)
return translations, nil
err = json.Unmarshal(jsonFile, &translations)
return translations, err
}
func extractSrcStrings(enterpriseDir, mattermostDir, modelDir, pluginDir, portalDir string) map[string]bool {