Skip to content

Commit

Permalink
fix up for translations
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbudd committed Feb 9, 2024
1 parent bb3aaa7 commit 71733fe
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions _validate/createJson.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,17 @@ def _createDictMatchingJsonSchema(

addonData["translations"] = []
for langCode, manifest in getAddonManifestLocalizations(manifest):
addonData["translations"].append(
{
"language": langCode,
"displayName": manifest["summary"],
"description": manifest["description"],
}
)
try:
addonData["translations"].append(
{
"language": langCode,
"displayName": manifest["summary"],
"description": manifest["description"],
}
)
except KeyError as e:
manifest._errors = f"Translation for {langCode} missing required key '{e.args[0]}'."
raise

return addonData

Expand Down

0 comments on commit 71733fe

Please sign in to comment.