Skip to content

[WTF-2627]: Code Generator & Runtime — Type-safe texts prop and runtime translation#190

Open
weirdwater wants to merge 6 commits into
masterfrom
wtf-2627-translation-types
Open

[WTF-2627]: Code Generator & Runtime — Type-safe texts prop and runtime translation#190
weirdwater wants to merge 6 commits into
masterfrom
wtf-2627-translation-types

Conversation

@weirdwater

Copy link
Copy Markdown
Collaborator

Checklist

  • Contains unit tests ✅
  • Contains breaking changes ❌
  • Compatible with: mx 11.13
  • Did you update version and changelog? ✅
  • PR title properly formatted ([XX-000]: description)? ✅

This PR contains

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Other (describe)

What is the purpose of this PR?

Mendix apps have the ability to provide translations for texts used in a Mendix app. Previously, pluggable widgets were unable to define their own texts, relying on workarounds to provide translation support. Now pluggable widgets are able to define their own texts.

This PR generates types for the system texts defined in a widget's XML. Providing type safe translations.

Relevant changes

  • Restructured Property Type Generation.
  • Added type generation for system texts.
  • Updated signature of ensure method.

What should be covered while testing?

  • No changes to generated types without texts.
  • Widgets with texts generate a type-safe translate method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants