Skip to content

feat(web): toggle localized input field languages - #1581

Merged
sven-n merged 5 commits into
MUnique:masterfrom
eduardosmaniotto:feat/toggle-localized-field
Nov 21, 2026
Merged

sven-n merged 5 commits into
MUnique:masterfrom
eduardosmaniotto:feat/toggle-localized-field

Conversation

@eduardosmaniotto

@eduardosmaniotto eduardosmaniotto commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the option to expand or collapse the language fields.

Expanded

expanded

Collapsed

collapsed

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, collapsing the translations makes the forms much shorter. Two problems, though:

  1. A test breaks (built on current master):

    CashShopCatalogPageTests.LocalizedNamesAreDisplayedSearchedAndEdited  -> Failed
    

    With the UI culture zh-CN, the collapsed field only renders #Name_zh-CN, but the test (and an editor) also needs the neutral #Name input. Hiding the neutral text whenever the admin panel isn't in English is a usability problem, too: the base value is what every translation falls back to. I'd suggest collapsing to the neutral language plus the selected one (just one field when they're the same), and expanding to all of them. Either way, please make sure the existing tests pass.

  2. MonsterRespawnTest: the change is unrelated to this PR, and it doesn't work as intended. isMonsterOnMap is computed once, before the loop, while the monster is still dead and off the map, so it stays false, and the loop now always waits the full 10 seconds before the final asserts. If you want to fix a flaky respawn test, please re-evaluate the condition inside the loop, e.g.

    while ((!monster.IsAlive || !map.GetNpcsInRange(SpawnPoint, 1).Contains(monster)) && DateTime.UtcNow < deadline)

    and best put that in a separate PR.

Also note that it will conflict in Web/Shared/Properties/Resources.Designer.cs once #1548 is merged, so please rebase then.


Generated by Claude Code

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, both points are addressed. Collapsed fields now show the neutral language plus the selected one (or one field when they're the same), so CashShopCatalogPageTests.LocalizedNamesAreDisplayedSearchedAndEdited passes again, and the unrelated MonsterRespawnTest change is reverted.

I built it on current master and ran the tests (all except the slow initialization tests). The only failure was HuntingGroundIsPickedOnTheOwnFloorAsync, a bot test which is flaky on master too and unrelated.

Note: the PR also adds the generated size tests of the lucky coin packets to ServerToClientPacketTests.cs, probably regenerated by your build. They're correct (the packets are on master), but they're unrelated to this change. Next time, please leave regenerated files out unless the PR needs them.


Generated by Claude Code

@sven-n
sven-n merged commit 41d629c into MUnique:master Nov 21, 2026
1 check passed
@eduardosmaniotto
eduardosmaniotto deleted the feat/toggle-localized-field branch November 21, 2026 16:32
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