@@ -32,9 +32,10 @@ class AddonData:
3232 sourceURL : str
3333 license : str
3434 homepage : str | None
35+ changelog : str | None
3536 licenseURL : str | None
3637 submissionTime : int
37- translations : list [dict [str , str ]]
38+ translations : list [dict [str , str | None ]]
3839
3940
4041def getSha256 (addonPath : str ) -> str :
@@ -108,17 +109,31 @@ def _createDataclassMatchingJsonSchema(
108109
109110 # Add optional fields
110111 homepage : str | None = manifest .get ("url" ) # type: ignore[reportUnknownMemberType]
111- if not homepage or homepage == "None" :
112+ if homepage == "None" :
113+ # The config default is None
114+ # which is parsed by configobj as a string not a NoneType
112115 homepage = None
113-
114- translations : list [dict [str , str ]] = []
116+ changelog : str | None = manifest .get ("changelog" ) # type: ignore[reportUnknownMemberType]
117+ if changelog == "None" :
118+ # The config default is None
119+ # which is parsed by configobj as a string not a NoneType
120+ changelog = None
121+ translations : list [dict [str , str | None ]] = []
115122 for langCode , translatedManifest in getAddonManifestLocalizations (manifest ):
123+ # Add optional translated changelog.
124+ translatedChangelog : str | None = translatedManifest .get ("changelog" ) # type: ignore[reportUnknownMemberType]
125+ if translatedChangelog == "None" :
126+ # The config default is None
127+ # which is parsed by configobj as a string not a NoneType
128+ translatedChangelog = None
129+
116130 try :
117131 translations .append (
118132 {
119133 "language" : langCode ,
120134 "displayName" : cast (str , translatedManifest ["summary" ]),
121135 "description" : cast (str , translatedManifest ["description" ]),
136+ "changelog" : translatedChangelog ,
122137 },
123138 )
124139 except KeyError as e :
@@ -141,6 +156,7 @@ def _createDataclassMatchingJsonSchema(
141156 sourceURL = sourceUrl ,
142157 license = licenseName ,
143158 homepage = homepage ,
159+ changelog = changelog ,
144160 licenseURL = licenseUrl ,
145161 submissionTime = getCurrentTime (),
146162 translations = translations ,
0 commit comments