Add ability to provide changelog for add-ons#52
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
|
Test with an add-on including a changelog not translated: pass. The generated json file includes translated summary and description, and the changelog, but the changelog is not included in translations: https://github.com/nvdaes/addon-datastore/actions/runs/19206166951/job/54901672327 |
|
Test submitting an add-on with a translated changelog: pass. The generated json file contains the changelog and the translated changelog for es: https://github.com/nvdaes/addon-datastore/actions/runs/19206387890/job/54902181767 |
|
Test submitting an add-on without a changelog (and without translations): Pass. The generated json file contains a line with the following contents, which doesn't produce errors:
https://github.com/nvdaes/addon-datastore/actions/runs/19206656030/job/54902812136#step:15:40 |
|
@seanbudd, I think this is ready for review and perhaps merging. |
|
This looks good to me, just need the copilot suggestions implemented |
Co-authored-by: Sean Budd <seanbudd123@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Test with an add-on with a translated changelog: pass https://github.com/nvdaes/addon-datastore/actions/runs/19277774486/job/55121659461 |
|
Sorry, unfortunately, the changelog, which should be translated into Spanish, is in English in the json file. Seems a regression introduced by the parseConfigValue function or its application. I'll look at this in the next days. |
|
Test with an add-on with translated changelog: pass, and the changelog is translated in the json file: https://github.com/nvdaes/addon-datastore/actions/runs/19287166274/job/55150234283#step:15:40 |
|
Thanks for this nice work! Will the data be regenerated for existing add-ons of the store that already include a change log in their manifest? |
|
Cyrille wrote:
As far as I know, just translations (including translated changelogs), will be regenerated, but not all add-on data, i.e., if an add-on includes a changelog, but it was submitted before this PR is merged, the original changelog won't be available when data is regenerated in the future. |
|
@nvdaes - it might be worth updating the regenerateTranslations script to be a generic "regenerateFromManifest" script.
|
|
@seanbudd and @CyrilleB79 , I'll try to create a PR to regenerate the full json file. |
|
@nvdaes, no need to spend time on this regarding my add-ons. There will be new releases in any case when 2026.1 stable will be released. |
This pull request adds support for a new
changelogfield to the add-on manifest and submission JSON schema, enabling tracking and validation of changes between add-on versions. The changes ensure that both the manifest and all related processing, validation, and test code can handle the newchangelogfield, including its translation in localized manifests.Schema and Manifest Updates:
changelogfield to theAddonManifestclass in_validate/addonManifest.py, and updated the manifest parsing logic to support reading and translating this field. [1] [2]_validate/addonVersion_schema.jsonto define thechangelogfield for both the base and translations, including examples and descriptions. [1] [2]changelogfield. [1] [2]Data Model and Processing:
AddonDatadataclass and related processing functions in_validate/createJson.pyto includechangelogand its translations, handlingNonevalues properly. [1] [2] [3]_validate/regenerateTranslations.pyto process thechangelogfield for both the main manifest and translations.Validation Logic:
checkChangelogMatchesin_validate/validate.pyto ensure the submissionchangelogmatches the manifest, and integrated it into the submission validation pipeline. [1] [2]Tests:
changelogfield, and updated existing tests and test data to include the new field and its expected values. [1] [2]These changes collectively introduce the
changelogfield into the add-on manifest and submission workflow, ensuring proper handling, validation, and testing throughout the codebase.