Add translations to-spreadsheet (template generation) - #101
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extract translationFieldToProperty and use _.snakeCase so properties with more than one underscore (e.g. LEFT_SIDE_DESCRIPTION) convert correctly. Reuse it in the import repository instead of the previous inline conversion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate a styled xlsx (one tab per model) from a DHIS2 instance, mirroring 'from-spreadsheet'. Per-model translatable fields are required (model[field1,...]), locales are selected by name in the given order, and --include-data fills source values and existing translations (otherwise a header-only template is produced). The sheet groups columns by field, color-codes each group, freezes the header row and first three columns, and is re-importable by 'from-spreadsheet'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extract ExportTranslationsSpreadsheetRepository.buildSheet (name/header/rows, separate from styling and file IO) and export parseModels/parseModelsOption from the command, so the column layout and the --models validation can be unit-tested. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add tests for translationFieldToProperty (incl. multi-word fields), ExportTranslationsUseCase (locale resolution/order, model pluralization, options passthrough), ExportTranslationsSpreadsheetRepository.buildSheet plus a file round-trip, and the --models parsing/validation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ations-generation
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.
ClickUp: https://app.clickup.com/t/4528615/869dek7uv
Translations:
to-spreadsheetAdds
translations to-spreadsheet, the reverse offrom-spreadsheet: generate a styled, re-importable xlsx of metadata translations straight from a DHIS2 instance (one tab per model, color-coded field groups, frozen header/columns, configurable models/fields/locales, header-only template or--include-data).Usage and options are documented in the README on this branch: README → To spreadsheet.