Closed comradekingu closed 1 year ago
Everything is fixed on weblate's side.
We are now using simple dictionarie : { "string":"translation", ... }
and the js takes care of injecting the locale.
Plus, there is now in the dev branch an UI for users to switch from a locale to another in the frontend.
From the discussion in #55
@albancrommer https://docs.weblate.org/en/latest/formats.html#json-files says JSON v3 doesn't have any nesting (or doesn't need to?) and that seems fine.
So I guess that just needs a change from "Nested JSON" in https://hosted.weblate.org/settings/inklewriter/inklewriter-frontend/#files to just "JSON"
Weblate already knows the language (from the filename) because of the file-mask (
public/translations/dictionary.*.json
in https://hosted.weblate.org/settings/inklewriter/inklewriter-frontend/#files)https://docs.weblate.org/en/latest/admin/management.html#import-project The defines file discovery for the repository. It can be either be made simple using wildcards, or it can use the full power of regular expressions.The simple matching uses * for component name and for language, for example: */.po
I guess the specified language tags could then be removed, possibly with the current extra en_EN section for nb_NO removed beforehand to not have a duplicated string.