change people to contacts (#1512)

This commit is contained in:
Vishnu Mohandas 2023-11-17 16:14:37 +05:30 committed by GitHub
commit 5dcf1ca2a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 51 additions and 39 deletions

View file

@ -6829,16 +6829,6 @@ class S {
); );
} }
/// `People`
String get people {
return Intl.message(
'People',
name: 'people',
desc: '',
args: [],
);
}
/// `Moments` /// `Moments`
String get moments { String get moments {
return Intl.message( return Intl.message(
@ -8067,6 +8057,16 @@ class S {
args: [], args: [],
); );
} }
/// `Contacts`
String get contacts {
return Intl.message(
'Contacts',
name: 'contacts',
desc: '',
args: [],
);
}
} }
class AppLocalizationDelegate extends LocalizationsDelegate<S> { class AppLocalizationDelegate extends LocalizationsDelegate<S> {

View file

@ -4,5 +4,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -1105,5 +1105,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -959,7 +959,6 @@
"photoDescriptions": "Photo descriptions", "photoDescriptions": "Photo descriptions",
"fileTypesAndNames": "File types and names", "fileTypesAndNames": "File types and names",
"location": "Location", "location": "Location",
"people": "People",
"moments": "Moments", "moments": "Moments",
"searchFaceEmptySection": "Find all photos of a person", "searchFaceEmptySection": "Find all photos of a person",
"searchDatesEmptySection": "Search by a date, month or year", "searchDatesEmptySection": "Search by a date, month or year",
@ -1149,5 +1148,6 @@
"addNew": "Add new", "addNew": "Add new",
"@addNew": { "@addNew": {
"description": "Text to add a new item (location tag, album, caption etc)" "description": "Text to add a new item (location tag, album, caption etc)"
} },
} "contacts": "Contacts"
}

View file

@ -967,5 +967,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -1105,5 +1105,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -1110,5 +1110,6 @@
"addOns": "Componenti aggiuntivi", "addOns": "Componenti aggiuntivi",
"addOnPageSubtitle": "Dettagli dei componenti aggiuntivi", "addOnPageSubtitle": "Dettagli dei componenti aggiuntivi",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -4,5 +4,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -1105,5 +1105,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "Dit account is gekoppeld aan andere ente apps, als je er gebruik van maakt.\\n\\nJe geüploade gegevens worden in alle ente apps gepland voor verwijdering, en je account wordt permanent verwijderd voor alle ente diensten.", "deleteConfirmDialogBody": "Dit account is gekoppeld aan andere ente apps, als je er gebruik van maakt.\\n\\nJe geüploade gegevens worden in alle ente apps gepland voor verwijdering, en je account wordt permanent verwijderd voor alle ente diensten.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -18,5 +18,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -105,5 +105,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -271,5 +271,6 @@
"fileTypes": "File types", "fileTypes": "File types",
"deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", "deleteConfirmDialogBody": "This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -1110,5 +1110,6 @@
"addOns": "附加组件", "addOns": "附加组件",
"addOnPageSubtitle": "附加组件详情", "addOnPageSubtitle": "附加组件详情",
"yourMap": "Your map", "yourMap": "Your map",
"modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for" "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
"contacts": "Contacts"
} }

View file

@ -39,7 +39,7 @@ enum SectionType {
// includes year, month , day, event ResultType // includes year, month , day, event ResultType
moment, moment,
// People section shows the files shared by other persons // People section shows the files shared by other persons
people, contacts,
fileCaption, fileCaption,
album, album,
fileTypesAndExtension, fileTypesAndExtension,
@ -57,8 +57,8 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).moments; return S.of(context).moments;
case SectionType.location: case SectionType.location:
return S.of(context).location; return S.of(context).location;
case SectionType.people: case SectionType.contacts:
return S.of(context).people; return S.of(context).contacts;
case SectionType.album: case SectionType.album:
return S.of(context).albums; return S.of(context).albums;
case SectionType.fileTypesAndExtension: case SectionType.fileTypesAndExtension:
@ -78,7 +78,7 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).searchDatesEmptySection; return S.of(context).searchDatesEmptySection;
case SectionType.location: case SectionType.location:
return S.of(context).searchLocationEmptySection; return S.of(context).searchLocationEmptySection;
case SectionType.people: case SectionType.contacts:
return S.of(context).searchPeopleEmptySection; return S.of(context).searchPeopleEmptySection;
case SectionType.album: case SectionType.album:
return S.of(context).searchAlbumsEmptySection; return S.of(context).searchAlbumsEmptySection;
@ -101,7 +101,7 @@ extension SectionTypeExtensions on SectionType {
return false; return false;
case SectionType.location: case SectionType.location:
return true; return true;
case SectionType.people: case SectionType.contacts:
return true; return true;
case SectionType.album: case SectionType.album:
return true; return true;
@ -122,7 +122,7 @@ extension SectionTypeExtensions on SectionType {
return false; return false;
case SectionType.location: case SectionType.location:
return true; return true;
case SectionType.people: case SectionType.contacts:
return true; return true;
case SectionType.album: case SectionType.album:
return true; return true;
@ -145,7 +145,7 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).addNew; return S.of(context).addNew;
case SectionType.location: case SectionType.location:
return S.of(context).addNew; return S.of(context).addNew;
case SectionType.people: case SectionType.contacts:
return S.of(context).invite; return S.of(context).invite;
case SectionType.album: case SectionType.album:
return S.of(context).addNew; return S.of(context).addNew;
@ -166,7 +166,7 @@ extension SectionTypeExtensions on SectionType {
return null; return null;
case SectionType.location: case SectionType.location:
return Icons.add_location_alt_outlined; return Icons.add_location_alt_outlined;
case SectionType.people: case SectionType.contacts:
return Icons.adaptive.share; return Icons.adaptive.share;
case SectionType.album: case SectionType.album:
return Icons.add; return Icons.add;
@ -179,7 +179,7 @@ extension SectionTypeExtensions on SectionType {
FutureVoidCallback ctaOnTap(BuildContext context) { FutureVoidCallback ctaOnTap(BuildContext context) {
switch (this) { switch (this) {
case SectionType.people: case SectionType.contacts:
return () async { return () async {
shareText( shareText(
S.of(context).shareTextRecommendUsingEnte, S.of(context).shareTextRecommendUsingEnte,
@ -249,8 +249,8 @@ extension SectionTypeExtensions on SectionType {
case SectionType.location: case SectionType.location:
return SearchService.instance.getAllLocationTags(limit); return SearchService.instance.getAllLocationTags(limit);
case SectionType.people: case SectionType.contacts:
return SearchService.instance.getAllPeopleSearchResults(limit); return SearchService.instance.getAllContactsSearchResults(limit);
case SectionType.album: case SectionType.album:
return SearchService.instance.getAllCollectionSearchResults(limit); return SearchService.instance.getAllCollectionSearchResults(limit);

View file

@ -810,7 +810,7 @@ class SearchService {
); );
} }
Future<List<GenericSearchResult>> getPeopleSearchResults( Future<List<GenericSearchResult>> getContactSearchResults(
String query, String query,
) async { ) async {
final lowerCaseQuery = query.toLowerCase(); final lowerCaseQuery = query.toLowerCase();
@ -846,7 +846,7 @@ class SearchService {
return searchResults; return searchResults;
} }
Future<List<GenericSearchResult>> getAllPeopleSearchResults( Future<List<GenericSearchResult>> getAllContactsSearchResults(
int? limit, int? limit,
) async { ) async {
try { try {

View file

@ -251,8 +251,9 @@ class SearchWidgetState extends State<SearchWidget> {
await _searchService.getDateResults(context, query); await _searchService.getDateResults(context, query);
allResults.addAll(possibleEvents); allResults.addAll(possibleEvents);
final peopleResults = await _searchService.getPeopleSearchResults(query); final contactResults =
allResults.addAll(peopleResults); await _searchService.getContactSearchResults(query);
allResults.addAll(contactResults);
} catch (e, s) { } catch (e, s) {
_logger.severe("error during search", e, s); _logger.severe("error during search", e, s);
} }