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 ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
86a98ea030
Коммит
59998b0b84
@@ -113,8 +113,8 @@ func getBaseFileSrcStrings(mattermostDir string) ([]Translation, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var translations []Translation
|
var translations []Translation
|
||||||
_ = json.Unmarshal(jsonFile, &translations)
|
err = json.Unmarshal(jsonFile, &translations)
|
||||||
return translations, nil
|
return translations, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func extractSrcStrings(enterpriseDir, mattermostDir, modelDir, pluginDir, portalDir string) map[string]bool {
|
func extractSrcStrings(enterpriseDir, mattermostDir, modelDir, pluginDir, portalDir string) map[string]bool {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user