Skip to content

feat(i18n): extract keys from entity summary tab#17698

Merged
max-datahub merged 4 commits into
masterfrom
i18n/extract-entity-summary
Jun 4, 2026
Merged

feat(i18n): extract keys from entity summary tab#17698
max-datahub merged 4 commits into
masterfrom
i18n/extract-entity-summary

Conversation

@max-datahub
Copy link
Copy Markdown
Collaborator

Summary

Extracts hardcoded user-visible strings from the entity summary tab (src/app/entityV2/summary) into the new entity.profile.summary namespace, and extends the existing modules namespace for the summary module cards (matching the shipped ChildHierarchyModule convention). English-only — translations follow in a separate PR.

  • New en/entity.profile.summary.json (31 keys): documentation.*, links.* (incl. 2 <Trans> bylines), documentType.*/documentStatus.*, menu.*, property labels
  • Extended en/modules.json (+24, into existing blocks): assets.*, columns.*, dataProducts.*, lineage.*, relatedTerms.* (module empty-states, add-assets modal toasts)
  • Added 3 generic labels to common.labels (created, domain, none) and reused existing common.* (owners, tags, status, type, add, cancel, publish, delete, remove, noResults, updating) — no duplication
  • Registered entity.profile.summary in i18n.ts / i18next.d.ts / setupTests.ts (modules already registered)
  • Module-scope constants (property-name map, document type/status option arrays) converted to lazy i18next getters (Pattern 2) so labels resolve after i18n init, with no call-site changes; value literals (GMS subTypes) preserved
  • Pre-existing programmatic strings surfaced by enabling the lint (field-key arrays, dayjs format tokens like 'll'/'ll LTS') extracted to named constants — not translated
  • Added src/app/entityV2/summary/** to translated-files.txt

Pages to verify

  • Entity summary tab (Dataset / Dashboard / Domain / Glossary etc. → Summary): the About/documentation section (View More/Less, edit), Resources/related-links section (add link, "Added/Edited … by" bylines, delete), the properties strip (Created, Last Updated, Owners, Domain, Tags, Terms, Document Status/Type)
  • Add-property menu (Properties submenu, Remove / Replace Property) and structured-property values
  • Summary module cards: Assets (empty state + "Add Assets/Term/to Domain" modal toasts), Data Products, Columns, Related Terms, Lineage empty/error states and "view all"

Checklist

  • PR conforms to the Contributing Guideline (PR Title Format)
  • Tests: i18n assertions pass (e.g. properties/__tests__/utils.test.ts — labels resolve via the registered namespaces). Note: 20 pre-existing localStorage/theme env failures in 5 summary test files are unchanged from master (verified) — not introduced here.
  • Docs — n/a (no user-facing behavior change)
  • Breaking change — n/a (non-breaking)

🤖 Generated with Claude Code

Extract hardcoded user-visible strings from the entity summary tab (src/app/entityV2/summary) into the new entity.profile.summary namespace, and extend the existing modules namespace for the summary module cards (per the shipped ChildHierarchyModule convention). English only.

- New en/entity.profile.summary.json (31 keys); extend en/modules.json (+24)
- Add common.labels created/domain/none (generic, reused); register entity.profile.summary in i18n.ts/i18next.d.ts/setupTests.ts
- Module-scope constants (property labels, document type/status options) -> lazy i18next getters (Pattern 2); 2 <Trans> for link bylines
- Pre-existing programmatic strings (field arrays, dayjs format tokens) -> named constants
- Add src/app/entityV2/summary glob to translated-files.txt

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the product PR or Issue related to the DataHub UI/UX label Jun 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Bundle Report

Changes will increase total bundle size by 5.05kB (0.02%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 23.41MB 5.05kB (0.02%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 2.0kB 8.83MB 0.02%
assets/en-*.js 3.04kB 132.88kB 2.34%

Files in assets/index-*.js:

  • ./src/app/entityV2/summary/links/DocumentItem.tsx → Total Size: 2.62kB

  • ./src/app/entityV2/summary/properties/property/properties/CreatedProperty.tsx → Total Size: 1.45kB

  • ./src/app/entityV2/summary/links/LinkItem.tsx → Total Size: 3.2kB

  • ./src/app/entityV2/summary/properties/property/properties/LastUpdatedProperty.tsx → Total Size: 1.15kB

  • ./src/app/entityV2/summary/links/RelatedSection.tsx → Total Size: 6.82kB

  • ./src/i18n/i18n.ts → Total Size: 8.34kB

  • ./src/app/entityV2/summary/properties/property/properties/LastIngestedProperty.tsx → Total Size: 1.11kB

  • ./src/app/entityV2/summary/modules/dataProducts/DataProductsModule.tsx → Total Size: 1.2kB

  • ./src/app/entityV2/summary/properties/utils.ts → Total Size: 1.8kB

  • ./src/app/entityV2/summary/modules/lineage/LineageModule.tsx → Total Size: 755 bytes

  • ./src/app/entityV2/summary/modules/assets/AssetsModule.tsx → Total Size: 1.24kB

  • ./src/app/entityV2/summary/documentation/AboutSection.tsx → Total Size: 3.1kB

  • ./src/app/entityV2/summary/modules/childHierarchy/utils.ts → Total Size: 696 bytes

  • ./src/app/entityV2/summary/properties/menuAddProperty/components/MenuNoResultsFound.tsx → Total Size: 341 bytes

  • ./src/app/entityV2/summary/documentation/DescriptionViewer.tsx → Total Size: 1.53kB

  • ./src/app/entityV2/summary/properties/property/properties/DocumentTypeProperty.tsx → Total Size: 2.81kB

  • ./src/app/entityV2/summary/modules/assets/AddAssetsModal.tsx → Total Size: 5.89kB

  • ./src/app/entityV2/summary/documentation/EditDescriptionModal.tsx → Total Size: 2.12kB

  • ./src/app/entityV2/summary/properties/menuProperty/usePropertyMenuItems.ts → Total Size: 1.25kB

  • ./src/app/entityV2/summary/modules/relatedTerms/RelatedTermsModule.tsx → Total Size: 1.95kB

  • ./src/app/entityV2/summary/documentation/useDescriptionUtils.ts → Total Size: 1.8kB

  • ./src/app/entityV2/summary/properties/menuAddProperty/hooks/useAddPropertyMenuItems.ts → Total Size: 1.42kB

  • ./src/app/entityV2/summary/properties/property/properties/DocumentStatusProperty.tsx → Total Size: 2.39kB

  • ./src/app/entityV2/summary/modules/schemaTable/ColumnsModule.tsx → Total Size: 2.89kB

  • ./src/app/entityV2/summary/properties/constants.ts → Total Size: 851 bytes

Files in assets/en-*.js:

  • ./src/i18n/locales/en/entity.profile.summary.json → Total Size: 1.55kB

  • ./src/i18n/locales/en/common.labels.json → Total Size: 679 bytes

  • ./src/i18n/locales/en/modules.json → Total Size: 8.11kB

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 83.07692% with 11 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...t/src/app/entityV2/summary/properties/constants.ts 37.50% 10 Missing ⚠️
datahub-web-react/src/i18n/i18n.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

…ts (removed on master via #17680) to avoid type-check OOM
@maggiehays maggiehays added the needs-review Label for PRs that need review from a maintainer. label Jun 3, 2026
@max-datahub max-datahub enabled auto-merge (squash) June 3, 2026 19:47
@maggiehays maggiehays added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Jun 3, 2026
Resolve setupTests.ts import conflict: keep both entity.profile.summary
(this PR) and entity.profile.tabs (master) imports; ns array and resources
auto-merged with both present.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@max-datahub max-datahub merged commit 2598b6d into master Jun 4, 2026
54 checks passed
@max-datahub max-datahub deleted the i18n/extract-entity-summary branch June 4, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-merge product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants