feat/translation #4

Open
tropicalshadow wants to merge 5 commits from tropicalshadow/hudkit:feat/translation into main
Contributor
  • audience wrapper (WeakRef) for manual setting of locale (🤔maybe not needed but potental)
  • pass Pointered (new audience wrapper) to MiniMessage (Lang support)
  • make huds a WeakHashMap, don't keep hold of audiences :)
- audience wrapper (WeakRef) for manual setting of locale (🤔maybe not needed but potental) - pass Pointered (new audience wrapper) to MiniMessage (Lang support) - make huds a WeakHashMap, don't keep hold of audiences :)
Author
Contributor

👉 😀 👈

👉 😀 👈
Owner

I'll be back to home on Sunday, and I can continue hudkit development then. :)

I'll be back to home on Sunday, and I can continue hudkit development then. :)
perny left a comment
Owner

Looks pretty solid!

Looks pretty solid!
@ -0,0 +24,4 @@
fun getUsername(): String? = audience.get()?.get<String>(Identity.NAME)?.orElse(null)
fun getDisplayName(): Component? = audience.get()?.get<Component>(Identity.DISPLAY_NAME)?.orElse(null)
fun getLocale(): Locale = locale?: audience.get()?.get<Locale>(Identity.LOCALE)?.orElse(Locale.getDefault())?: Locale.getDefault()
Owner

Won't compile, there's a JVM signature clash.

The following declarations have the same JVM signature (getLocale()Ljava/util/Locale;):
fun (): Locale? defined in net.hudkit.api.HudAudience
fun getLocale(): Locale defined in net.hudkit.api.HudAudience

The var locale: Locale? property auto-generates a getter that conflicts with the explicit fun getLocale(): Locale method.

Won't compile, there's a JVM signature clash. The following declarations have the same JVM signature (getLocale()Ljava/util/Locale;): fun <get-locale>(): Locale? defined in net.hudkit.api.HudAudience fun getLocale(): Locale defined in net.hudkit.api.HudAudience The `var locale: Locale?` property auto-generates a getter that conflicts with the explicit `fun getLocale(): Locale` method.
Author
Contributor

should be resolved thanks to Claw

should be resolved thanks to Claw
tropicalshadow marked this conversation as resolved
Add @JvmName annotations to the locale property getter/setter to avoid
conflict with the explicit getLocale() method that provides fallback logic.
Reviewed-on: tropicalshadow/hudkit#1
This pull request has changes conflicting with the target branch.
  • api/src/main/kotlin/document/HudLayout.kt
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feat/translation:tropicalshadow-feat/translation
git switch tropicalshadow-feat/translation

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff tropicalshadow-feat/translation
git switch tropicalshadow-feat/translation
git rebase main
git switch main
git merge --ff-only tropicalshadow-feat/translation
git switch tropicalshadow-feat/translation
git rebase main
git switch main
git merge --no-ff tropicalshadow-feat/translation
git switch main
git merge --squash tropicalshadow-feat/translation
git switch main
git merge --ff-only tropicalshadow-feat/translation
git switch main
git merge tropicalshadow-feat/translation
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
perny/hudkit!4
No description provided.