File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
app/src/processing/app/ui Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,10 @@ class WelcomeToBeta {
91
91
horizontalArrangement = Arrangement
92
92
.spacedBy(20 .dp)
93
93
){
94
+ val locale = LocalLocale .current
94
95
Image (
95
96
painter = painterResource(" logo.svg" ),
96
- contentDescription = " Processing Logo " ,
97
+ contentDescription = locale[ " beta.logo " ] ,
97
98
modifier = Modifier
98
99
.align(Alignment .CenterVertically )
99
100
.size(100 .dp, 100 .dp)
@@ -107,7 +108,6 @@ class WelcomeToBeta {
107
108
alignment = Alignment .CenterVertically
108
109
)
109
110
) {
110
- val locale = LocalLocale .current
111
111
Text (
112
112
text = locale[" beta.title" ],
113
113
style = MaterialTheme .typography.subtitle1,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import androidx.compose.runtime.Composable
4
4
import androidx.compose.runtime.CompositionLocalProvider
5
5
import androidx.compose.runtime.compositionLocalOf
6
6
import processing.app.LocalPreferences
7
+ import processing.app.Messages
7
8
import processing.app.Platform
8
9
import processing.app.PlatformStart
9
10
import processing.app.watchFile
@@ -21,10 +22,12 @@ class Locale(language: String = "") : Properties() {
21
22
}
22
23
23
24
@Deprecated(" Use get instead" , ReplaceWith (" get(key)" ))
24
- override fun getProperty (key : String? ): String {
25
- return super .getProperty(key)
25
+ override fun getProperty (key : String? , default : String ): String {
26
+ val value = super .getProperty(key, default)
27
+ if (value == default) Messages .log(" Missing translation for $key " )
28
+ return value
26
29
}
27
- operator fun get (key : String ): String = getProperty(key)
30
+ operator fun get (key : String ): String = getProperty(key, key )
28
31
}
29
32
val LocalLocale = compositionLocalOf { Locale () }
30
33
@Composable
You can’t perform that action at this time.
0 commit comments