1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-10 12:09:27 +01:00

Make screenshot notification strings translatable

This commit is contained in:
José Rebelo 2023-06-11 17:35:34 +01:00
parent 5df25effba
commit 5f0689d2e1
2 changed files with 6 additions and 4 deletions

View File

@ -401,14 +401,14 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
shareIntent.setType("image/*");
shareIntent.putExtra(Intent.EXTRA_STREAM, screenshotURI);
PendingIntent pendingShareIntent = PendingIntentUtils.getActivity(context, 0, Intent.createChooser(shareIntent, "share screenshot"),
PendingIntent pendingShareIntent = PendingIntentUtils.getActivity(context, 0, Intent.createChooser(shareIntent, context.getString(R.string.share_screenshot)),
PendingIntent.FLAG_UPDATE_CURRENT, false);
NotificationCompat.Action action = new NotificationCompat.Action.Builder(android.R.drawable.ic_menu_share, "share", pendingShareIntent).build();
NotificationCompat.Action action = new NotificationCompat.Action.Builder(android.R.drawable.ic_menu_share, context.getString(R.string.share), pendingShareIntent).build();
Notification notif = new NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_HIGH_PRIORITY_ID)
.setContentTitle("Screenshot taken")
.setTicker("Screenshot taken")
.setContentTitle(context.getString(R.string.screenshot_taken))
.setTicker(context.getString(R.string.screenshot_taken))
.setContentText(filename)
.setSmallIcon(R.drawable.ic_notification)
.setStyle(new NotificationCompat.BigPictureStyle()

View File

@ -1200,6 +1200,8 @@
<string name="activity_error_share_failed">Sharing file failed.</string>
<string name="select_all">Select all</string>
<string name="share">Share</string>
<string name="share_screenshot">Share screenshot</string>
<string name="screenshot_taken">Screenshot taken</string>
<string name="reset_index">Reset fetch date</string>
<string name="kind_firmware">Firmware</string>
<string name="kind_invalid">Invalid data</string>