Conversation
Add a --program-id option to `translations to-spreadsheet`. When set, objects
are taken from that program's metadata dependency export
(/api/programs/{id}/metadata) instead of the whole instance, so each generated
spreadsheet is scoped to a single program.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…aders Locale references passed to `translations to-spreadsheet --locales` now match by exact base name first, then by substring, so "Sotho" resolves to "Southern Sotho (Lesotho)". A reference matching more than one locale is ambiguous and errors; no match warns and is skipped (as before). The resolved locale's " (...)" suffix is stripped from the column header, so headers are shorter and round-trip with `from-spreadsheet`, which matches headers against suffix-stripped DB names. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`buildObject` returned the internal MetadataObject verbatim, leaking the `model` bookkeeping field (used only for grouping) into the posted payload as `"model": "dataElements"`. Omit it when building the D2 object. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The export sheet now includes a dedicated Name (object.name) column after UID. Update the spec expectations (header, row values, autofilter refs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ations-generation
Scope the export to a data set's metadata dependency export
(/api/dataSets/{id}/metadata), mirroring --program-id. Both options share the
same code path (getDependencyMetadataObjects) and are mutually exclusive.
Document --program-id/--data-set-id in the README.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://app.clickup.com/t/4528615/869dc4guz?comment=90120236273934
Follow-up to #101, adding scoping and locale-matching capabilities to
translations to-spreadsheet.Changes
--program-id/--data-set-idfilters (mutually exclusive). When set, objects are taken from that program's or data set's metadata dependency export (/api/programs/{id}/metadata,/api/dataSets/{id}/metadata) instead of the whole instance, so each generated spreadsheet is scoped to a single program or data set. Only the requested--modelsare kept from the export.--localesnow matches by exact base name first, then by substring, soSothoresolves toSouthern Sotho (Lesotho). A reference matching more than one locale is ambiguous and errors; no match warns and is skipped (as before).(...)qualifier is dropped from the column header (formName: Southern Sothoinstead offormName: Southern Sotho (Lesotho)). This also fixes the round-trip:from-spreadsheetmatches headers against suffix-stripped DB names, so previously any locale with a(country)suffix would not re-import.Namecolumn added afterUIDin every sheet, for readability.Test plan
ExportTranslationsUseCase.spec.ts(short/substring match, ambiguity error, stripped header, program-scoped fetch, data-set-scoped fetch, program/data-set exclusivity).yarn testgreen (91 tests);tsc --noEmitclean.Sotho→Southern Sothoheader; afrom-spreadsheet --postround-trip added ast_LStranslation while preserving existing ones.--data-set-id kQRnZsbyV40 --models 'dataSets[name,shortName,description],sections[name],dataElements[name,shortName,formName,description]' --locales French,Spanish) produces 1 dataSet / 4 sections / 12 dataElements; every cell (165) compared against the API matched.