diff options
author | Jakub Zacek <[email protected]> | 2023-04-20 09:05:41 +0200 |
---|---|---|
committer | Jakub Zacek <[email protected]> | 2023-04-20 09:05:41 +0200 |
commit | b4e413f624700e55310cb749b8d9d0483d8326fd (patch) | |
tree | 8edb3466d78675775b22ea571f4c22750f0f818e | |
parent | 992e145a168b50ccaccd95b57a8dc81d8a4dd0bb (diff) | |
download | Paper-b4e413f624700e55310cb749b8d9d0483d8326fd.tar.gz Paper-b4e413f624700e55310cb749b8d9d0483d8326fd.zip |
Fix server ignoring fallback for translatable components (#9134)
-rw-r--r-- | LICENSE.md | 1 | ||||
-rw-r--r-- | patches/server/Adventure.patch | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/LICENSE.md b/LICENSE.md index c3d1668aca..2abc9a2738 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -58,4 +58,5 @@ Jakubk15 <[email protected]> Redned <[email protected]> Luke Chambers <[email protected]> Emily <[email protected]> +dawon <[email protected]> ``` diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 3dc774c38a..b756a6f644 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -799,7 +799,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + } -+ final @NotNull String translated = Language.getInstance().getOrDefault(translatable.key()); ++ final @Nullable String fallback = translatable.fallback(); ++ final @NotNull String translated = Language.getInstance().getOrDefault(translatable.key(), fallback != null ? fallback : translatable.key()); + + final Matcher matcher = LOCALIZATION_PATTERN.matcher(translated); + final List<Component> args = translatable.args(); |