Skip to content

add PylonBlock waila fallback to name#139

Merged
LordIdra merged 10 commits into
masterfrom
waila-name-fallback
Jun 30, 2025
Merged

add PylonBlock waila fallback to name#139
LordIdra merged 10 commits into
masterfrom
waila-name-fallback

Conversation

@ihateblueb

Copy link
Copy Markdown
Contributor

Reduces duplicate translation values where names were the same as waila

Comment thread pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/block/PylonBlock.kt Outdated
Comment thread pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/block/PylonBlock.kt Outdated
@ihateblueb

Copy link
Copy Markdown
Contributor Author

Okay, this actually works now, the pylon block Component.translatable passes an alternative key as a fallback and the AddonTranslator.translate checks for fallback if translated is null, if it's still null the whole function returns null like before.

image
image

Comment thread pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/i18n/AddonTranslator.kt Outdated
ihateblueb and others added 2 commits June 25, 2025 22:00
…ddonTranslator.kt

Co-authored-by: Seggan <seggan21@gmail.com>
@LordIdra
LordIdra merged commit 322f81f into master Jun 30, 2025
1 check passed
@LordIdra
LordIdra deleted the waila-name-fallback branch June 30, 2025 23: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.

3 participants