Skip to content

Remove unused GMGen randomname i18n keys#7582

Merged
karianna merged 1 commit into
PCGen:masterfrom
Vest:cleanup-unused-randomname-i18n-keys
Jun 4, 2026
Merged

Remove unused GMGen randomname i18n keys#7582
karianna merged 1 commit into
PCGen:masterfrom
Vest:cleanup-unused-randomname-i18n-keys

Conversation

@Vest

@Vest Vest commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Delete two i18n keys that became dead weight after #7566:

  • in_plugin_randomname_name"Random Name" / "Generador de Nombres" / etc.
  • in_mn_plugin_randomname_name — single-letter mnemonic.

Both were only ever referenced from plugin/doomsdaybook/RandomNamePlugin.java, the GMGen plugin wrapper that advertised the "Random Names" tab name and mnemonic to GMGen's plugin host:

private static final String IN_NAME    = "in_plugin_randomname_name";
private static final String IN_NAME_MN = "in_mn_plugin_randomname_name";
...
LanguageBundle.getString(RandomNamePlugin.IN_NAME);
LanguageBundle.getMnemonic(RandomNamePlugin.IN_NAME_MN);

#7566 (Random-name dialog: rewrite from Swing to JavaFX) deleted that wrapper as its first commit ("Remove dead RandomNamePlugin GMGen wrapper"). The live path is now RandomNameDialogRandomNamePanelController + RandomNamePanel.fxml in core — no plugin tab label, no plugin-style mnemonic, no replacement key needed.

The _plugin_ namespace was specific to GMGen plugin self-identification; core dialogs don't follow that convention.

Verification

  • code/src/test/pcgen/gui2/ScanForUnusedIl8nKeysTest flagged the keys as unused after Random-name dialog: rewrite from Swing to JavaFX #7566 (visible in the cleaned.properties / unused.properties snapshots that drift on the working tree after the rewrite).
  • Manual grep across *.java, *.fxml, *.lst, and other *.properties (excluding the bundle files themselves and the test snapshots): no references.
  • Removed from the four locale bundles that still carried them — LanguageBundle.properties (en), _es, _fr, _it. _de, _ja, _pt already lacked them.
  • Regenerated cleaned.properties via ./gradlew slowtest --tests pcgen.gui2.ScanForUnusedIl8nKeysTest. unused.properties is unchanged because the keys are now simply absent from the source bundle.

Test plan

  • slowtest --tests pcgen.gui2.ScanForUnusedIl8nKeysTest passes; snapshots up to date.
  • Random-name dialog still functional (manually opened from the Summary tab).
  • CI green on master merge.

`in_plugin_randomname_name` and `in_mn_plugin_randomname_name` were
referenced only from `plugin/doomsdaybook/RandomNamePlugin.java`, the
GMGen plugin wrapper that advertised the "Random Names" tab name and
mnemonic. PR PCGen#7566 deleted that wrapper as part of the Random-name
dialog Swing → JavaFX rewrite, and the live core dialog
(`RandomNameDialog` → `RandomNamePanelController` + `RandomNamePanel.fxml`)
doesn't expose a plugin-style tab label, so the keys have no replacement
in core.

Confirmed unused via `ScanForUnusedIl8nKeysTest` and a manual grep over
`*.java`, `*.fxml`, `*.lst`. Removed from the four locale bundles that
still carried them (en, es, fr, it; de/ja/pt already lacked them) and
regenerated the `cleaned.properties` snapshot the scanner produces.
@karianna karianna merged commit 1805aea into PCGen:master Jun 4, 2026
3 checks passed
@Vest Vest deleted the cleanup-unused-randomname-i18n-keys branch June 6, 2026 12:11
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