photos: simplify search hint to Search
- Commit
390bf994b2465c02adf959d63205e59fadf64937- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-02 03:07 UTC (4 days ago)
- Parents
80600a0
The gallery search bar hinted "Search photos...". Use the shared localized UiR.string.search, delete the unused search_placeholder string from every locale, and update tests that read the hint from the old resource. Verified: :photos:lint and :photos:lintVitalRelease green. :photos:testDevUnitTestNative (415 tests) has 1 failure in VaultViewerPageRealTest vault decryption, in untouched vault code, reported for the parent re-run.
Diff
photos/src/androidTest/java/com/vayunmathur/photos/ui/PhotosGridTest.kt
diff --git a/photos/src/androidTest/java/com/vayunmathur/photos/ui/PhotosGridTest.kt b/photos/src/androidTest/java/com/vayunmathur/photos/ui/PhotosGridTest.ktindex 69466a04d0..61eb0450e7 100644--- a/photos/src/androidTest/java/com/vayunmathur/photos/ui/PhotosGridTest.kt+++ b/photos/src/androidTest/java/com/vayunmathur/photos/ui/PhotosGridTest.kt@@ -94,7 +94,7 @@ class PhotosGridTest { private const val CONTENT_TIMEOUT_MS = 15_000L private const val GATE_TIMEOUT_MS = 5_000L private const val GALLERY_LABEL = "Gallery"- private const val SEARCH_HINT = "Search photos…"+ private const val SEARCH_HINT = "Search" private const val PERMISSION_GATE_TITLE = "Grant Required Permissions" /**
photos/src/main/java/com/vayunmathur/photos/ui/GalleryScreen.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/ui/GalleryScreen.kt b/photos/src/main/java/com/vayunmathur/photos/ui/GalleryScreen.ktindex 90d511e9d2..cdc1795394 100644--- a/photos/src/main/java/com/vayunmathur/photos/ui/GalleryScreen.kt+++ b/photos/src/main/java/com/vayunmathur/photos/ui/GalleryScreen.kt@@ -57,6 +57,7 @@ import androidx.fragment.app.FragmentActivity import com.vayunmathur.library.ui.IconClose import com.vayunmathur.library.ui.IconSearch import com.vayunmathur.library.ui.invisibleClickable+import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.util.NavBackStack import com.vayunmathur.library.util.sharedContainer import com.vayunmathur.photos.ui.LocalColumnCount@@ -165,7 +166,7 @@ fun GalleryScreen( onSearch = { searchActive = false }, expanded = searchActive, onExpandedChange = { searchActive = it },- placeholder = { Text(stringResource(R.string.search_placeholder)) },+ placeholder = { Text(stringResource(UiR.string.search)) }, leadingIcon = { IconSearch() },
photos/src/main/res/values-ar/strings.xml
diff --git a/photos/src/main/res/values-ar/strings.xml b/photos/src/main/res/values-ar/strings.xmlindex 88840e88c6..aaa6bee992 100644--- a/photos/src/main/res/values-ar/strings.xml+++ b/photos/src/main/res/values-ar/strings.xml@@ -22,7 +22,6 @@ <item quantity="other">تم تحديد <xliff:g id="count" example="5">%1$d</xliff:g></item> </plurals> <string name="month_year_format"><xliff:g id="month" example="January">%1$s</xliff:g> <xliff:g id="year" example="2024">%2$d</xliff:g></string>- <string name="search_placeholder">البحث في الصور…</string> <string name="of_photos_processed">تمت معالجة <xliff:g id="percent" example="45"> %1$d</xliff:g> %% من الصور</string> <plurals name="photos_indexed_for_visual_search"> <item quantity="one">تم فهرسة <xliff:g id="done" example="120"> %1$d</xliff:g>/<xliff:g id="total" example="500">%2$d من</xliff:g> الصور للبحث المرئي</item>
photos/src/main/res/values-cs/strings.xml
diff --git a/photos/src/main/res/values-cs/strings.xml b/photos/src/main/res/values-cs/strings.xmlindex 9a82982177..dfe17dff0a 100644--- a/photos/src/main/res/values-cs/strings.xml+++ b/photos/src/main/res/values-cs/strings.xml@@ -23,7 +23,6 @@ <string name="view_360">Zobrazit 360°</string> <string name="detecting">Detekuji…</string> <string name="grant_image_video_permissions">Udělit přístup k fotkám/videím</string>- <string name="search_placeholder">Hledat fokty…</string> <string name="people_empty">Nenalezeni žádní lidé. Skenováni probíha v pozadí - zkontroluje po indexaci vašich fotek.</string> <string name="people_scanning">Seskupování obličejů… lidé se zde budou zobrazovat, jak budou nalezeni.</string> <string name="face_indexing_progress">Indexování %1$d / %2$d</string>
photos/src/main/res/values-de/strings.xml
diff --git a/photos/src/main/res/values-de/strings.xml b/photos/src/main/res/values-de/strings.xmlindex 201889d0d3..e496504e87 100644--- a/photos/src/main/res/values-de/strings.xml+++ b/photos/src/main/res/values-de/strings.xml@@ -18,5 +18,4 @@ <string name="resolution">Auflösung: %1$d x %2$d</string> <string name="detecting">Erkenne…</string> <string name="grant_image_video_permissions">Erlaube Bild/Video Berechtigung</string>- <string name="search_placeholder">Suche Fotos…</string> </resources>
photos/src/main/res/values-et/strings.xml
diff --git a/photos/src/main/res/values-et/strings.xml b/photos/src/main/res/values-et/strings.xmlindex c48d1380c1..ef983e5eec 100644--- a/photos/src/main/res/values-et/strings.xml+++ b/photos/src/main/res/values-et/strings.xml@@ -18,7 +18,6 @@ <string name="resolution">Eraldusvõime: <xliff:g id="width" example="4000">%1$d</xliff:g> x <xliff:g id="height" example="3000">%2$d</xliff:g></string> <string name="detecting">Tuvastan…</string> <string name="grant_image_video_permissions">Luba õigused piltide ja videote vaatamiseks</string>- <string name="search_placeholder">Otsi fotosid…</string> <string name="label_people">Inimesed</string> <string name="people_empty">Inimesi veel ei leidu. Skaneerimine toimub taustal - vaata uuesti peale fotode skaneerimise lõppu.</string> <string name="face_indexing_progress">Indekseerimisel: <xliff:g id="processed" example="20">%1$d</xliff:g> / <xliff:g id="total" example="100">%2$d</xliff:g></string>
photos/src/main/res/values-fr/strings.xml
diff --git a/photos/src/main/res/values-fr/strings.xml b/photos/src/main/res/values-fr/strings.xmlindex 8df55feae2..2dcd90cbc5 100644--- a/photos/src/main/res/values-fr/strings.xml+++ b/photos/src/main/res/values-fr/strings.xml@@ -2,7 +2,6 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name">Photos</string> <string name="month_year_format"><xliff:g id="month" example="janvier">%1$s</xliff:g> <xliff:g id="year" example="2024">%2$d</xliff:g></string>- <string name="search_placeholder">Rechercher des photos…</string> <string name="label_people">Personnes</string> <string name="face_indexing_progress">Indexation <xliff:g id="processed" example="20">%1$d</xliff:g> / <xliff:g id="total" example="100">%2$d</xliff:g></string> <string name="action_save_as_copy">Enregistrer en tant que copie</string>
photos/src/main/res/values-it/strings.xml
diff --git a/photos/src/main/res/values-it/strings.xml b/photos/src/main/res/values-it/strings.xmlindex 6618daba94..0676b3da25 100644--- a/photos/src/main/res/values-it/strings.xml+++ b/photos/src/main/res/values-it/strings.xml@@ -19,7 +19,6 @@ <string name="taken_on">Scattata: %1$s</string> <string name="detecting">Rilevamento in corso…</string> <string name="grant_image_video_permissions">Concedi autorizzazioni Immagine/video</string>- <string name="search_placeholder">Cerca foto…</string> <string name="label_people">Persone</string> <string name="people_empty">Nessuna persona trovata. La scansione avviene in background — controlla più tardi, dopo che le tue foto sono state indicizzate.</string> <string name="people_scanning">Raggruppamento volti… le persone appariranno qui non appena verranno trovate.</string>
photos/src/main/res/values-ja/strings.xml
diff --git a/photos/src/main/res/values-ja/strings.xml b/photos/src/main/res/values-ja/strings.xmlindex b78e03b342..c13a3a873e 100644--- a/photos/src/main/res/values-ja/strings.xml+++ b/photos/src/main/res/values-ja/strings.xml@@ -14,7 +14,6 @@ <item quantity="other"><xliff:g id="count" example="5">%1$d</xliff:g> 個のアイテムを選択済</item> </plurals> <string name="month_year_format"><xliff:g id="year" example="2024">%2$d</xliff:g>年<xliff:g id="month" example="January">%1$s</xliff:g></string>- <string name="search_placeholder">写真を検索…</string> <string name="of_photos_processed"><xliff:g id="percent" example="45">%1$d</xliff:g>%% 個の写真を処理済</string> <string name="people_scanning">顔を分類中… 人物が見つかるとここに表示されます。</string> <plurals name="people_photo_count">
photos/src/main/res/values-pl/strings.xml
diff --git a/photos/src/main/res/values-pl/strings.xml b/photos/src/main/res/values-pl/strings.xmlindex f2480be555..06eec14fec 100644--- a/photos/src/main/res/values-pl/strings.xml+++ b/photos/src/main/res/values-pl/strings.xml@@ -20,7 +20,6 @@ <string name="resolution">Rozdzielczość: %1$d x %2$d</string> <string name="detecting">Wykrywanie…</string> <string name="grant_image_video_permissions">Udziel uprawnień do obrazów/wideo</string>- <string name="search_placeholder">Szukaj zdjęć…</string> <string name="photo_widget_description">Zmieniające się zdjęcie z Twojej galerii — stuknij, aby wylosować</string> <string name="label_people">Ludzie</string> <string name="people_empty">Nie znaleziono jeszcze żadnych osób. Skanowanie odbywa się w tle — sprawdź ponownie po zindeksowaniu zdjęć.</string>
photos/src/main/res/values-sv/strings.xml
diff --git a/photos/src/main/res/values-sv/strings.xml b/photos/src/main/res/values-sv/strings.xmlindex 8a12384b8c..0b869d4a34 100644--- a/photos/src/main/res/values-sv/strings.xml+++ b/photos/src/main/res/values-sv/strings.xml@@ -35,7 +35,6 @@ <string name="vault_viewer_decrypt_failed">Kunde inte öppna objektet</string> <string name="vault_viewer_not_found">Objektet finns inte längre i den säkra mappen</string> <string name="month_year_format"><xliff:g id="month" example="January">%1$s</xliff:g> <xliff:g id="year" example="2024">%2$d</xliff:g></string>- <string name="search_placeholder">Sök bilder…</string> <string name="of_photos_processed"><xliff:g id="percent" example="45">%1$d</xliff:g> %% av bilderna bearbetade</string> <plurals name="photos_indexed_for_visual_search"> <item quantity="one"><xliff:g id="done" example="120">%1$d</xliff:g> / <xliff:g id="total" example="500">%2$d</xliff:g> bilder indexerade för visuell sökning</item>
photos/src/main/res/values-zh-rCN/strings.xml
diff --git a/photos/src/main/res/values-zh-rCN/strings.xml b/photos/src/main/res/values-zh-rCN/strings.xmlindex c6ddbe996b..12944a18db 100644--- a/photos/src/main/res/values-zh-rCN/strings.xml+++ b/photos/src/main/res/values-zh-rCN/strings.xml@@ -17,7 +17,6 @@ <string name="resolution">分辨率:<xliff:g id="width" example="4000">%1$d</xliff:g> × <xliff:g id="height" example="3000">%2$d</xliff:g></string> <string name="detecting">正在检测…</string> <string name="grant_image_video_permissions">授予图片/视频权限</string>- <string name="search_placeholder">搜索照片…</string> <string name="label_people">人物</string> <string name="people_empty">尚未找到人物。扫描正在后台进行 — 请在照片索引完成后再查看。</string> <string name="people_scanning">正在分组面孔… 找到人物后将显示在此处。</string>
photos/src/main/res/values/strings.xml
diff --git a/photos/src/main/res/values/strings.xml b/photos/src/main/res/values/strings.xmlindex 22c10bda8e..5a82666e9a 100644--- a/photos/src/main/res/values/strings.xml+++ b/photos/src/main/res/values/strings.xml@@ -74,8 +74,6 @@ <string name="vault_viewer_not_found">This item is no longer in the Secure Folder</string> <!-- Gallery grouping header: month + year. %1$s = month name e.g. January, %2$d = year e.g. 2024 --> <string name="month_year_format"><xliff:g id="month" example="January">%1$s</xliff:g> <xliff:g id="year" example="2024">%2$d</xliff:g></string>- <!-- Search bar placeholder hint. Noun phrase with ellipsis -->- <string name="search_placeholder">Search photos…</string> <!-- Gallery progress when query empty: percent of photos processed. %1$d = percent 0-100, %% literal percent sign --> <string name="of_photos_processed"><xliff:g id="percent" example="45">%1$d</xliff:g>%% of photos processed</string> <!-- Gallery progress: visual search embedding index progress. %1$d = done, %2$d = total -->
photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3PagesTest.kt
diff --git a/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3PagesTest.kt b/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3PagesTest.ktindex 1a1a45c405..358a677bae 100644--- a/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3PagesTest.kt+++ b/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3PagesTest.kt@@ -35,6 +35,7 @@ import androidx.compose.ui.test.performClick import androidx.compose.ui.unit.IntSize import androidx.room3.Room import androidx.test.core.app.ApplicationProvider+import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.util.NavBackStack import com.vayunmathur.photos.ui.LocalColumnCount import com.vayunmathur.photos.R@@ -341,7 +342,7 @@ class PhotosSlice3PagesTest { ) } }- composeRule.onNodeWithText(str(R.string.search_placeholder)).assertIsDisplayed()+ composeRule.onNodeWithText(str(UiR.string.search)).assertIsDisplayed() } finally { syncEnqueueHook = null }
photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3ScreensTest.kt
diff --git a/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3ScreensTest.kt b/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3ScreensTest.ktindex b84cd3b772..517cf1c1c4 100644--- a/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3ScreensTest.kt+++ b/photos/src/test/java/com/vayunmathur/photos/util/PhotosSlice3ScreensTest.kt@@ -31,6 +31,7 @@ import androidx.compose.ui.test.performClick import androidx.compose.ui.test.performTextClearance import androidx.compose.ui.test.performTextInput import androidx.test.core.app.ApplicationProvider+import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.util.NavBackStack import com.vayunmathur.photos.ui.LocalColumnCount import com.vayunmathur.photos.R@@ -116,7 +117,7 @@ class PhotosSlice3ScreensTest { @Test fun galleryEmptyGridShowsSearchPlaceholder() { setGallery(GalleryUiState())- composeRule.onNodeWithText(str(R.string.search_placeholder)).assertIsDisplayed()+ composeRule.onNodeWithText(str(UiR.string.search)).assertIsDisplayed() } @Test@@ -125,7 +126,7 @@ class PhotosSlice3ScreensTest { // While the first library emission is in flight the fake-empty state // must not render; the loading indicator takes its place instead. composeRule.onNodeWithText(str(R.string.gallery_empty_title)).assertDoesNotExist()- composeRule.onNodeWithText(str(R.string.search_placeholder)).assertIsDisplayed()+ composeRule.onNodeWithText(str(UiR.string.search)).assertIsDisplayed() } @Test@@ -269,7 +270,7 @@ class PhotosSlice3ScreensTest { override fun setSearchQuery(q: String) { query = q } } setGallery(GalleryUiState(), actions, initialSearchActive = true)- composeRule.onNodeWithText(str(R.string.search_placeholder)).performClick()+ composeRule.onNodeWithText(str(UiR.string.search)).performClick() composeRule.onNodeWithText("", useUnmergedTree = true).performTextInput("sunset") assertEquals("sunset", query) }