Skip to content

Commit f949e24

Browse files
committed
Use JDK19+ compatible constructor for Locale
1 parent 3b5972c commit f949e24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guide/backend/src/main/scala/io/udash/web/guide/demos/i18n/TranslationServer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package io.udash.web.guide.demos.i18n
22

3-
import java.{util => ju}
4-
5-
import io.udash.web.Implicits._
63
import io.udash.i18n.{Lang, ResourceBundlesTranslationTemplatesProvider, TranslationRPCEndpoint}
4+
import io.udash.web.Implicits.*
5+
6+
import java.util as ju
77

88
class TranslationServer extends TranslationRPCEndpoint(
99
new ResourceBundlesTranslationTemplatesProvider(
1010
TranslationServer.langs
1111
.map(lang =>
12-
Lang(lang) -> TranslationServer.bundlesNames.map(name => ju.ResourceBundle.getBundle(name, new ju.Locale(lang)))
12+
Lang(lang) -> TranslationServer.bundlesNames.map(name => ju.ResourceBundle.getBundle(name, new ju.Locale.Builder().setLanguage(lang).build()))
1313
).toMap
1414
)
1515
)

0 commit comments

Comments
 (0)