Skip to content

Extract strings from resource renderer#21386

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
Mailaender:resources-l10n
Apr 30, 2024
Merged

Extract strings from resource renderer#21386
PunkPun merged 1 commit into
OpenRA:bleedfrom
Mailaender:resources-l10n

Conversation

@Mailaender
Copy link
Copy Markdown
Member

Completes #10475

@Mailaender Mailaender mentioned this pull request Apr 2, 2024
16 tasks
Copy link
Copy Markdown
Member

@RoosterDragon RoosterDragon left a comment

Choose a reason for hiding this comment

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

Change looks good to me.

This is failing because #21389 now complains it doesn't know how to lint it due to the LoadUsing. I'd be fine hacking in a custom check just like we have for GameSpeeds.

// HACK: Need to hardcode the custom loader for GameSpeeds.
var gameSpeeds = modData.Manifest.Get<GameSpeeds>();
var gameSpeedNameField = typeof(GameSpeed).GetField(nameof(GameSpeed.Name));
var gameSpeedTranslationReference = Utility.GetCustomAttributes<TranslationReferenceAttribute>(gameSpeedNameField, true)[0];
testedFields.Add(gameSpeedNameField);
foreach (var speed in gameSpeeds.Speeds.Values)
usedKeys.Add(speed.Name, gameSpeedTranslationReference, $"`{nameof(GameSpeed)}.{nameof(GameSpeed.Name)}`");

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 97c61e0 into OpenRA:bleed Apr 30, 2024
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented Apr 30, 2024

changelog

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.

3 participants