Add localized search functionality for contacts#244
Conversation
wel97459
commented
Feb 27, 2026
- Introduced new localization keys for searching contacts, users, favorites, repeaters, and room servers in multiple languages.
- Enhanced the contacts screen to dynamically display search hints with the number of nodes based on the selected contact type filter.
- Introduced new localization keys for searching contacts, users, favorites, repeaters, and room servers in multiple languages. - Updated localization files for Italian, Bulgarian, German, English, Spanish, French, Dutch, Polish, Portuguese, Russian, Slovak, Slovenian, Swedish, Ukrainian, and Chinese. - Enhanced the contacts screen to dynamically display search hints based on the selected contact type filter. - Modified the map screen to utilize the new search functionality for contacts without a number.
There was a problem hiding this comment.
Pull request overview
This pull request enhances the contacts search functionality by adding localized, dynamic search hints that display the count of filtered nodes. The implementation replaces static search placeholder text with context-aware hints that show the number of items (contacts, users, favorites, repeaters, or room servers) based on the selected filter type and whether only unread items are displayed.
Changes:
- Added dynamic search hint logic in contacts_screen.dart to display item counts based on contact type filter
- Updated map_screen.dart to use the new non-numbered search hint localization key
- Added localization strings and placeholder definitions for search hints across 15 languages
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/screens/contacts_screen.dart | Implements switch statement to dynamically select search hint text based on contact filter type, passing count and unread status |
| lib/screens/map_screen.dart | Updates search hint to use new contacts_searchContactsNoNumber key |
| lib/l10n/app_en.arb | Adds English localizations with proper placeholder definitions for all search variants |
| lib/l10n/app_*.arb (14 files) | Adds localization entries for Chinese, Ukrainian, Swedish, Slovenian, Slovak, Russian, Portuguese, Polish, Dutch, Italian, French, Spanish, German, and Bulgarian |
| lib/l10n/app_localizations*.dart (15 files) | Auto-generated localization implementation files for all supported languages |
| lib/l10n/app_localizations.dart | Auto-generated base class with new method signatures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "contacts_searchRoomServers": "Пошук {number}{str} серверів кімнат...", | ||
| "contacts_searchUsers": "Пошук {number}{str} користувачів...", | ||
| "contacts_searchFavorites": "Пошук {number}{str} улюблених...", | ||
| "contacts_searchContactsNoNumber": "Пошук контактів...", |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Пошук {number}{str} контактів...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| }, | |
| "contacts_searchRoomServers": "Пошук {number}{str} серверів кімнат...", | |
| "contacts_searchUsers": "Пошук {number}{str} користувачів...", | |
| "contacts_searchFavorites": "Пошук {number}{str} улюблених...", | |
| "contacts_searchContactsNoNumber": "Пошук контактів...", | |
| }, | |
| "@contacts_searchContacts": { | |
| "placeholders": { | |
| "number": { | |
| "type": "int" | |
| }, | |
| "str": { | |
| "type": "String" | |
| } | |
| } | |
| }, | |
| "contacts_searchRoomServers": "Пошук {number}{str} серверів кімнат...", | |
| "contacts_searchUsers": "Пошук {number}{str} користувачів...", | |
| "contacts_searchFavorites": "Пошук {number}{str} улюблених...", | |
| "contacts_searchContactsNoNumber": "Пошук контактів...", | |
| "contacts_searchContacts": "Пошук {number}{str} контактів...", |
| "contacts_searchRepeaters": "Pesquisar {number}{str} Repetidores...", | ||
| "contacts_searchFavorites": "Pesquisar {number}{str} Favoritos...", | ||
| "contacts_searchUsers": "Pesquisar {number}{str} Usuários...", | ||
| "contacts_searchContactsNoNumber": "Pesquisar Contatos...", | ||
| "contacts_unread": "Não lido", | ||
| "contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala..." |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Pesquisar {number}{str} Contatos...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| "contacts_unread": "Nieprzeczytane", | ||
| "contacts_searchContactsNoNumber": "Wyszukaj kontakty...", | ||
| "contacts_searchFavorites": "Wyszukaj {number}{str} ulubione...", | ||
| "contacts_searchRoomServers": "Wyszukaj {number}{str} serwerów Room...", | ||
| "contacts_searchUsers": "Wyszukaj {number}{str} Użytkowników...", | ||
| "contacts_searchRepeaters": "Wyszukaj {number}{str} powtórników..." |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Wyszukaj {number}{str} kontakty...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| }, | ||
| "contacts_unread": "Non lu", | ||
| "contacts_searchFavorites": "Rechercher {number}{str} Favoris...", | ||
| "contacts_searchUsers": "Rechercher {number}{str} utilisateurs...", | ||
| "contacts_searchRoomServers": "Rechercher {number}{str} serveurs de salle...", | ||
| "contacts_searchRepeaters": "Rechercher {number}{str} Répéteurs...", |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Rechercher {number}{str} contacts...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| }, | |
| "contacts_unread": "Non lu", | |
| "contacts_searchFavorites": "Rechercher {number}{str} Favoris...", | |
| "contacts_searchUsers": "Rechercher {number}{str} utilisateurs...", | |
| "contacts_searchRoomServers": "Rechercher {number}{str} serveurs de salle...", | |
| "contacts_searchRepeaters": "Rechercher {number}{str} Répéteurs...", | |
| }, | |
| "@contacts_searchContacts": { | |
| "placeholders": { | |
| "number": { | |
| "type": "int" | |
| }, | |
| "str": { | |
| "type": "String" | |
| } | |
| } | |
| }, | |
| "contacts_unread": "Non lu", | |
| "contacts_searchFavorites": "Rechercher {number}{str} Favoris...", | |
| "contacts_searchUsers": "Rechercher {number}{str} utilisateurs...", | |
| "contacts_searchRoomServers": "Rechercher {number}{str} serveurs de salle...", | |
| "contacts_searchRepeaters": "Rechercher {number}{str} Répéteurs...", | |
| "contacts_searchContacts": "Rechercher {number}{str} contacts...", |
| "contacts_searchFavorites": "Търсене на {number}{str} любими...", | ||
| "contacts_searchRoomServers": "Търсене на {number}{str} сървъри в стаята...", | ||
| "contacts_unread": "Непрочетено", | ||
| "contacts_searchRepeaters": "Търсене на {number}{str} повтарящи се...", | ||
| "contacts_searchContactsNoNumber": "Търси контакти...", | ||
| "contacts_searchUsers": "Търсене на {number}{str} потребители..." |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Търсене на {number}{str} контакти...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| "contacts_searchRepeaters": "Поиск {number}{str} ретрансляторов...", | ||
| "contacts_searchContactsNoNumber": "Поиск контактов...", | ||
| "contacts_unread": "Непрочитанное", | ||
| "contacts_searchRoomServers": "Поиск {number}{str} серверов комнат...", | ||
| "contacts_searchFavorites": "Поиск {number}{str} избранного...", | ||
| "contacts_searchUsers": "Поиск {number}{str} пользователей..." |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Поиск {number}{str} контактов...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| "contacts_searchUsers": "Cerca {number}{str} Utenti...", | ||
| "contacts_searchContactsNoNumber": "Cerca Contatti...", | ||
| "contacts_searchFavorites": "Cerca {number}{str} Preferiti...", | ||
| "contacts_unread": "Non letti", | ||
| "contacts_searchRepeaters": "Cerca {number}{str} Ripetitori...", | ||
| "contacts_searchRoomServers": "Cerca {number}{str} server Room..." |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Cerca {number}{str} Contatti...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| "contacts_searchContactsNoNumber": "Buscar contactos...", | ||
| "contacts_unread": "No leído", | ||
| "contacts_searchFavorites": "Buscar {number}{str} Favoritos...", | ||
| "contacts_searchUsers": "Buscar {number}{str} Usuarios...", | ||
| "contacts_searchRepeaters": "Buscar {number}{str} Repetidores...", | ||
| "contacts_searchRoomServers": "Buscar {number}{str} servidores de sala..." |
There was a problem hiding this comment.
The ARB file is missing the contacts_searchContacts localization entry with placeholders. While the metadata @contacts_searchContacts placeholder definition exists for other search methods (Favorites, Users, Repeaters, RoomServers), there is no corresponding metadata definition or localized string for contacts_searchContacts itself. This causes the generated Dart code to return a static string that ignores the number and str parameters, meaning the contact count won't be displayed when the "All" filter is selected. Add the following entries to match the English version:
"contacts_searchContacts": "Buscar {number}{str} contactos...",
"@contacts_searchContacts": {
"placeholders": {
"number": {"type": "int"},
"str": {"type": "String"}
}
}
| "contacts_unread": "Oläst", | ||
| "contacts_searchContactsNoNumber": "Sök kontakter...", | ||
| "contacts_searchRepeaters": "Sök {number}{str} upprepningsenheter...", | ||
| "contacts_searchFavorites": "Sök {number}{str} Favoriter...", |
There was a problem hiding this comment.
Inconsistent capitalization: "Favoriter" is capitalized while other terms in the same context like "användare" (users) and "upprepningsenheter" (repeaters) are lowercase. For consistency, consider using lowercase "favoriter" to match the capitalization pattern of the other search strings, unless Swedish grammar rules specifically require capitalization here.
| "contacts_searchFavorites": "Sök {number}{str} Favoriter...", | |
| "contacts_searchFavorites": "Sök {number}{str} favoriter...", |
| "contacts_searchUsers": "Pesquisar {number}{str} Usuários...", | ||
| "contacts_searchContactsNoNumber": "Pesquisar Contatos...", | ||
| "contacts_unread": "Não lido", | ||
| "contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala..." |
There was a problem hiding this comment.
Inconsistent capitalization: "servidores de sala" (room servers) is lowercase while other terms in the same context like "Repetidores" (Repeaters), "Favoritos" (Favorites), "Usuários" (Users), and "Contatos" (Contacts) are capitalized. For consistency, consider using "Servidores de Sala" to match the capitalization pattern of the other search strings.
| "contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala..." | |
| "contacts_searchRoomServers": "Pesquisar {number}{str} Servidores de Sala..." |