Skip to content

Don't let a long disk label overlap the disk selector - #84

Merged
rubensworks merged 2 commits into
master-1.21-ltsfrom
terminal-ux/disk-label
Oct 18, 2026
Merged

rubensworks merged 2 commits into
master-1.21-ltsfrom
terminal-ux/disk-label

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Independent of the terminal UX stack, based on master-1.21-lts.

In Brazilian Portuguese, the disk label "Disco:" in the scripting terminal was drawn under the left arrow of the disk selector.

The label is now scaled (with CyclopsCore's RenderHelpers.drawScaledString) to the 21px before the disk selector, and vertically centered. The translations are unchanged. The English "Disk:" is exactly 21px wide, so it stays at its normal size.

The first commit cut the label off with "…" instead, but in pt_br that left only "Di…". The second commit replaces it with the scaling.

Checked in-game

Language Label Result
en_us Disk: Unchanged (scale 1)
pt_br Disco: Fully shown, slightly smaller (about 0.78)
zh_cn 磁盘: About the same size as English
de_de (temporary test translation) Datenträger: Fully shown, but small (about 0.4)
ru_ru (temporary test translation) Диск: Slightly larger than English

Only en_us, pt_br and zh_cn ship this key. The German and Russian strings were only added locally to test a long and a short label.

./gradlew build and ./gradlew runGameTestServer (22 tests) pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9

In some languages, such as Brazilian Portuguese ("Disco:"), the disk label
was drawn under the disk selector arrow. It is now cut off with an ellipsis
when it does not fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 39110034766

Coverage decreased (-0.09%) to 47.267%

Details

  • Coverage decreased (-0.09%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 107 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

107 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
org/cyclops/integratedscripting/client/gui/container/ContainerScreenTerminalScripting.java 107 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 2630
Covered Lines: 1362
Line Coverage: 51.79%
Relevant Branches: 882
Covered Branches: 298
Branch Coverage: 33.79%
Branches in Coverage %: Yes
Coverage Strength: 23.38 hits per line

💛 - Coveralls

Cutting "Disco:" off left only "Di…", which is hard to read. The label is
now scaled to the space before the disk selector, so it is always shown in
full. The English label fits that space exactly, so it keeps its normal size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
@rubensworks
rubensworks merged commit fe0388e into master-1.21-lts Oct 18, 2026
20 of 21 checks passed
@rubensworks
rubensworks deleted the terminal-ux/disk-label branch October 18, 2026 12:47
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.

3 participants