Merge branch 'master' into 'master'

Choose a suitable string for the update title in singular or plural

See merge request AuroraOSS/AuroraStore!221
This commit is contained in:
Aayush Gupta
2023-06-21 04:46:19 +00:00
2 changed files with 11 additions and 4 deletions

View File

@@ -166,10 +166,16 @@ class UpdateWorker(private val appContext: Context, workerParams: WorkerParamete
return NotificationCompat.Builder(appContext, Constants.NOTIFICATION_CHANNEL_UPDATES)
.setSmallIcon(R.drawable.ic_logo)
.setContentTitle(
appContext.getString(
R.string.notification_updates_available,
updatesList.size
)
if (updatesList.size == 1)
appContext.getString(
R.string.notification_updates_available_1,
updatesList.size
)
else
appContext.getString(
R.string.notification_updates_available,
updatesList.size
)
)
.setContentText(
when (updatesList.size) {

View File

@@ -357,6 +357,7 @@
<string name="downloading_dep">Downloading additional files for <xliff:g id="app">%1$s</xliff:g></string>
<string name="notification_channel_updates">Updates notifications</string>
<string name="notification_updates_available"><xliff:g id="apps_count">%1$d</xliff:g> updates available</string>
<string name="notification_updates_available_1"><xliff:g id="apps_count">%1$d</xliff:g> update available</string>
<string name="notification_updates_available_desc_1">A new version of <xliff:g id="app_one_name">%1$s</xliff:g> is available</string>
<string name="notification_updates_available_desc_2"><xliff:g id="app_one_name">%1$s</xliff:g> and <xliff:g id="app_two_name">%2$s</xliff:g></string>
<string name="notification_updates_available_desc_3"><xliff:g id="app_one_name">%1$s</xliff:g>, <xliff:g id="app_two_name">%2$s</xliff:g> and <xliff:g id="app_three_name">%3$s</xliff:g></string>