Browse Source

extract string resource

Signed-off-by: Felix Nüsse <felix.nuesse@t-online.de>
Felix Nüsse 2 years ago
parent
commit
ea2a1a9163

+ 2 - 1
app/src/main/java/com/nextcloud/utils/ShortcutUtil.kt

@@ -80,9 +80,10 @@ class ShortcutUtil @Inject constructor(private val mContext: Context) {
                     MimeTypeUtil.getFileTypeIconId(file.mimeType, file.fileName)
                 )
             }
+            val longLabel = mContext.getString(R.string.pin_shortcut_label, file.fileName)
             val pinShortcutInfo = ShortcutInfoCompat.Builder(mContext, shortcutId)
                 .setShortLabel(file.fileName)
-                .setLongLabel("Open " + file.fileName)
+                .setLongLabel(longLabel)
                 .setIcon(icon)
                 .setIntent(intent)
                 .build()

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -1055,4 +1055,5 @@
     <string name="e2e_not_yet_setup">E2E not yet setup</string>
     <string name="error_file_actions">Error showing file actions</string>
     <string name="pin_home">Pin to Home screen</string>
+    <string name="pin_shortcut_label">Open %1$s</string>
 </resources>