Make Pebble JS runner notification translatable

This commit is contained in:
Arjan Schrijver
2025-12-25 14:45:08 +01:00
committed by Arjan Schrijver
parent b0c0eda4f3
commit 038f2eb36e
3 changed files with 7 additions and 4 deletions
@@ -83,13 +83,13 @@ class PebbleJsService : Service() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
nm.createNotificationChannel(
NotificationChannel(GB.NOTIFICATION_CHANNEL_ID_PEBBLE_JS, "Pebble JS service", NotificationManager.IMPORTANCE_LOW)
NotificationChannel(GB.NOTIFICATION_CHANNEL_ID_PEBBLE_JS, getString(R.string.notification_channel_pebble_js_runner), NotificationManager.IMPORTANCE_LOW)
)
}
val notification = NotificationCompat.Builder(this, GB.NOTIFICATION_CHANNEL_ID_PEBBLE_JS)
.setContentTitle("Pebble JavaScript service")
.setContentText("Running Pebble app/watchface JavaScript")
.setContentTitle(getString(R.string.notification_pebble_js_service_title))
.setContentText(getString(R.string.notification_pebble_js_service_text))
.setSmallIcon(R.drawable.ic_play)
.build()
@@ -177,7 +177,7 @@ public class GB {
NotificationChannel channelPebbleJs = new NotificationChannel(
NOTIFICATION_CHANNEL_ID_PEBBLE_JS,
"Pebble JS runner",
context.getString(R.string.notification_channel_pebble_js_runner),
NotificationManager.IMPORTANCE_MIN);
notificationManager.createNotificationChannel(channelPebbleJs);
}
+3
View File
@@ -4473,4 +4473,7 @@
<string name="internet_helper_permission_summary">Permit access to the Gadgetbridge-internethelper add-on app</string>
<string name="internet_helper_pref_unused_settings_title">Unused settings</string>
<string name="internet_helper_pref_unused_settings_summary">The settings below are not used because direct internet access is available.</string>
<string name="notification_channel_pebble_js_runner">Pebble JS runner</string>
<string name="notification_pebble_js_service_title">Pebble JavaScript service</string>
<string name="notification_pebble_js_service_text">Running Pebble app/watchface JavaScript</string>
</resources>