Skip to content

translations to-spreadsheet: export only the changed objects of a metadata file (--metadata-file, --only-changed, --data-set-ids) - #110

Open
tokland wants to merge 4 commits into
feature/translations-generationfrom
feature/translations-export-only-changed
Open

tokland wants to merge 4 commits into
feature/translations-generationfrom
feature/translations-export-only-changed

Conversation

@tokland

@tokland tokland commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Required by https://app.clickup.com/t/4528615/869cxwgvp?comment=90120266489244

Follow-up to #106 (based on feature/translations-generation; merge that one first). Lets translations to-spreadsheet produce the "what do translators need for this feature" sheet: only the objects of a metadata package that are new or re-labelled with respect to a reference instance, restricted to the data sets that are actually translated.

Changes

  • --metadata-file=PATH: read the objects (with their translations) from a DHIS2 metadata JSON export instead of the instance, for packages not yet deployed to a trusted instance. --url is still used for the locales and as the reference.
  • --only-changed (requires --metadata-file): keep only objects that do not exist in the instance, or whose selected fields differ, or whose --default-locale translation of a selected field differs (a label can be changed only through that translation). Non-selected fields are ignored, so a [DEPRECATED] name prefix does not trigger a formName re-translation. The reference objects are fetched by id (id:in filter, chunks of 100), not the whole model.
  • --exclude-names=REGEX: skip objects whose name matches (e.g. '^\[DEPRECATED\]').
  • --program-ids / --data-set-ids: translations to-spreadsheet: --program-id/--data-set-id filters and short locale references #106's --program-id/--data-set-id, renamed to the plural form used by the other commands and taking comma-separated ids;

tokland and others added 4 commits September 18, 2026 13:05
…adsheet'

DHIS2 stores Indonesian translations with locale 'in' while the locales list
may report 'id'. Move the field/translation lookup of metadata objects to the
domain entity so it is shared with the change detection.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…nslations to-spreadsheet'

Export the objects of a DHIS2 metadata JSON export instead of the instance,
and keep only those that are new or whose selected fields (or their
--default-locale translation) differ from the instance, so translators get
just the delta of a feature.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ions to-spreadsheet'

Rename --program-id/--data-set-id (unmerged #106) to the plural form used by
the other commands and take comma-separated ids: the dependency exports of
all of them are merged, and a metadata file is scoped by all of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant