Skip to content

Add localized search functionality for contacts#244

Merged
wel97459 merged 1 commit into
mainfrom
dev-searchHintText
Feb 27, 2026
Merged

Add localized search functionality for contacts#244
wel97459 merged 1 commit into
mainfrom
dev-searchHintText

Conversation

@wel97459

Copy link
Copy Markdown
Collaborator
  • 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.
Copilot AI review requested due to automatic review settings February 27, 2026 06:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread lib/l10n/app_uk.arb
Comment on lines +1796 to +1800
},
"contacts_searchRoomServers": "Пошук {number}{str} серверів кімнат...",
"contacts_searchUsers": "Пошук {number}{str} користувачів...",
"contacts_searchFavorites": "Пошук {number}{str} улюблених...",
"contacts_searchContactsNoNumber": "Пошук контактів...",

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}
Suggested change
},
"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} контактів...",

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_pt.arb
Comment on lines +1797 to +1802
"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..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_pl.arb
Comment on lines +1797 to +1802
"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..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_fr.arb
Comment on lines +1796 to +1801
},
"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...",

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}
Suggested change
},
"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...",

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_bg.arb
Comment on lines +1797 to +1802
"contacts_searchFavorites": "Търсене на {number}{str} любими...",
"contacts_searchRoomServers": "Търсене на {number}{str} сървъри в стаята...",
"contacts_unread": "Непрочетено",
"contacts_searchRepeaters": "Търсене на {number}{str} повтарящи се...",
"contacts_searchContactsNoNumber": "Търси контакти...",
"contacts_searchUsers": "Търсене на {number}{str} потребители..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_ru.arb
Comment on lines +1037 to +1042
"contacts_searchRepeaters": "Поиск {number}{str} ретрансляторов...",
"contacts_searchContactsNoNumber": "Поиск контактов...",
"contacts_unread": "Непрочитанное",
"contacts_searchRoomServers": "Поиск {number}{str} серверов комнат...",
"contacts_searchFavorites": "Поиск {number}{str} избранного...",
"contacts_searchUsers": "Поиск {number}{str} пользователей..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_it.arb
Comment on lines +1797 to +1802
"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..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_es.arb
Comment on lines +1825 to +1830
"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..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
  }
}

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_sv.arb
"contacts_unread": "Oläst",
"contacts_searchContactsNoNumber": "Sök kontakter...",
"contacts_searchRepeaters": "Sök {number}{str} upprepningsenheter...",
"contacts_searchFavorites": "Sök {number}{str} Favoriter...",

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"contacts_searchFavorites": "Sök {number}{str} Favoriter...",
"contacts_searchFavorites": "Sök {number}{str} favoriter...",

Copilot uses AI. Check for mistakes.
Comment thread lib/l10n/app_pt.arb
"contacts_searchUsers": "Pesquisar {number}{str} Usuários...",
"contacts_searchContactsNoNumber": "Pesquisar Contatos...",
"contacts_unread": "Não lido",
"contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala..."

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"contacts_searchRoomServers": "Pesquisar {number}{str} servidores de sala..."
"contacts_searchRoomServers": "Pesquisar {number}{str} Servidores de Sala..."

Copilot uses AI. Check for mistakes.
@wel97459 wel97459 merged commit e139383 into main Feb 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants