Skip to content

Fix uses of LabelWidget.Text and ButtonWidget.Text to use GetText instead.#21300

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:use-gettext
Jan 15, 2024
Merged

Fix uses of LabelWidget.Text and ButtonWidget.Text to use GetText instead.#21300
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:use-gettext

Conversation

@RoosterDragon
Copy link
Copy Markdown
Member

The Text element of these widgets was changed from display text to a translation key as part of adding translation support. Functions interested in the display text need to invoke GetText instead. Lots of functions have not been updated, resulting in symptoms such as measuring the font size of the translation key rather than the display text and resizing a widget to the wrong size.

Update all callers to use GetText when getting or setting display text. This ensure their existing functionality that was intended to work in terms of the display text and not the translation key works as expected.


Before:
image
image

After:
image
image

…tead.

The Text element of these widgets was changed from display text to a translation key as part of adding translation support. Functions interested in the display text need to invoke GetText instead. Lots of functions have not been updated, resulting in symptoms such as measuring the font size of the translation key rather than the display text and resizing a widget to the wrong size.

Update all callers to use GetText when getting or setting display text. This ensure their existing functionality that was intended to work in terms of the display text and not the translation key works as expected.
Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PunkPun PunkPun merged commit 2fde98a into OpenRA:bleed Jan 15, 2024
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented Jan 15, 2024

changelog

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants