Skip to content

Captions written via MDL always land as en_US — breaks projects whose only/default language isn't en_US #970

Description

@TOFBuck

Title

Captions written via MDL always land as en_US — breaks projects whose only/default language isn't en_US

Body

Summary

Every MDL write path that sets a caption/title/label hardcodes the translation under en_US (confirmed in docs/11-proposals/PROPOSAL_translations.md, "75 hardcoded en_US sites"). On a project whose configured language is something else (e.g. nl_NL only, no en_US enabled), the caption is written to a language Studio Pro isn't displaying — so the widget shows the empty-caption placeholder (<>) plus a "no translation for this language" warning, even though mxcli/mx check/mxbuild all report success.

Steps to Reproduce

  1. A project with a single configured language, nl_NL (no en_US enabled).
  2. Create or alter any widget with a caption via MDL, e.g.:
    create or modify page MyModule.MyPage (
      ...
      button button1 (Caption: 'Opslaan')
      ...
    )
    
  3. Open the page in Studio Pro.

Expected

The button caption shows "Opslaan" in the nl_NL client, no warning.

Actual

The button shows the empty-caption placeholder (<>) and Studio Pro warns that there is no translation for the project's language. mx check / mxbuild show 0 errors — nothing catches it.

Root cause (per the project's own proposal doc)

docs/11-proposals/PROPOSAL_translations.md already documents this precisely: there is no MDL syntax to author a translation for a specific language, so every writer (Title:, Caption:, Content:, Label:, etc.) re-emits the given string under a hardcoded "en_US" LanguageCode, regardless of the project's actual DefaultLanguageCode or enabled languages. Related: #702 (the read-side version of this — describe picking the wrong language — was fixed there; this issue is the write-side counterpart, which the #702 fix explicitly did not cover).

Environment

  • mxcli: v0.18.0
  • Mendix Studio Pro: (project language: nl_NL only, no en_US enabled)

Ask

At minimum, mx check/mxcli check should warn when a write lands under a LanguageCode the project doesn't have enabled — right now this is silent. Full fix is presumably what PROPOSAL_translations.md scopes (MDL syntax to author a translation in a given language, e.g. writing under the project's DefaultLanguageCode instead of a hardcoded en_US).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions