Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

change people to contacts

ashilknb814fb097140
diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart
index e9ad296712..523110e705 100644
--- a/lib/generated/l10n.dart
+++ b/lib/generated/l10n.dart
@@ -6829,16 +6829,6 @@ class S {
);
}
- /// `People`
- String get people {
- return Intl.message(
- 'People',
- name: 'people',
- desc: '',
- args: [],
- );
- }
-
/// `Moments`
String get moments {
return Intl.message(
@@ -8067,6 +8057,16 @@ class S {
args: [],
);
}
+
+ /// `Contacts`
+ String get contacts {
+ return Intl.message(
+ 'Contacts',
+ name: 'contacts',
+ desc: '',
+ args: [],
+ );
+ }
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
diff --git a/lib/l10n/intl_cs.arb b/lib/l10n/intl_cs.arb
index c9e09b7f2c..515bfae5aa 100644
--- a/lib/l10n/intl_cs.arb
+++ b/lib/l10n/intl_cs.arb
@@ -4,5 +4,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb
index 9c7384ff3d..e997c1aaf1 100644
--- a/lib/l10n/intl_de.arb
+++ b/lib/l10n/intl_de.arb
@@ -1105,5 +1105,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb
index 57d84befa9..7bf39c3f06 100644
--- a/lib/l10n/intl_en.arb
+++ b/lib/l10n/intl_en.arb
@@ -959,7 +959,6 @@
"photoDescriptions": "Photo descriptions",
"fileTypesAndNames": "File types and names",
"location": "Location",
- "people": "People",
"moments": "Moments",
"searchFaceEmptySection": "Find all photos of a person",
"searchDatesEmptySection": "Search by a date, month or year",
@@ -1149,5 +1148,6 @@
"addNew": "Add new",
"@addNew": {
"description": "Text to add a new item (location tag, album, caption etc)"
- }
-}
+ },
+ "contacts": "Contacts"
+}
\ No newline at end of file
diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb
index 9b94e32df7..d7a9aabd85 100644
--- a/lib/l10n/intl_es.arb
+++ b/lib/l10n/intl_es.arb
@@ -967,5 +967,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb
index c495dd4b4b..6cb7e175de 100644
--- a/lib/l10n/intl_fr.arb
+++ b/lib/l10n/intl_fr.arb
@@ -1105,5 +1105,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb
index 8a73df4ae4..d82d8e6824 100644
--- a/lib/l10n/intl_it.arb
+++ b/lib/l10n/intl_it.arb
@@ -1110,5 +1110,6 @@
"addOns": "Componenti aggiuntivi",
"addOnPageSubtitle": "Dettagli dei componenti aggiuntivi",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_ko.arb b/lib/l10n/intl_ko.arb
index c9e09b7f2c..515bfae5aa 100644
--- a/lib/l10n/intl_ko.arb
+++ b/lib/l10n/intl_ko.arb
@@ -4,5 +4,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_nl.arb b/lib/l10n/intl_nl.arb
index 1e69935394..83a1138477 100644
--- a/lib/l10n/intl_nl.arb
+++ b/lib/l10n/intl_nl.arb
@@ -1105,5 +1105,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_no.arb b/lib/l10n/intl_no.arb
index cab5948772..8106b8ca77 100644
--- a/lib/l10n/intl_no.arb
+++ b/lib/l10n/intl_no.arb
@@ -18,5 +18,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb
index 94fa2ed9a9..306b0a31cb 100644
--- a/lib/l10n/intl_pl.arb
+++ b/lib/l10n/intl_pl.arb
@@ -105,5 +105,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb
index 56a2c26c3c..cd674a3479 100644
--- a/lib/l10n/intl_pt.arb
+++ b/lib/l10n/intl_pt.arb
@@ -271,5 +271,6 @@
"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.",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb
index f5300dbb4d..d4638468f2 100644
--- a/lib/l10n/intl_zh.arb
+++ b/lib/l10n/intl_zh.arb
@@ -1110,5 +1110,6 @@
"addOns": "附加组件",
"addOnPageSubtitle": "附加组件详情",
"yourMap": "Your map",
- "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for"
+ "modifyYourQueryOrTrySearchingFor": "Modify your query, or try searching for",
+ "contacts": "Contacts"
}
\ No newline at end of file
diff --git a/lib/models/search/search_types.dart b/lib/models/search/search_types.dart
index 9c46136df4..dc15bc1aef 100644
--- a/lib/models/search/search_types.dart
+++ b/lib/models/search/search_types.dart
@@ -39,7 +39,7 @@ enum SectionType {
// includes year, month , day, event ResultType
moment,
// People section shows the files shared by other persons
- people,
+ contacts,
fileCaption,
album,
fileTypesAndExtension,
@@ -57,8 +57,8 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).moments;
case SectionType.location:
return S.of(context).location;
- case SectionType.people:
- return S.of(context).people;
+ case SectionType.contacts:
+ return S.of(context).contacts;
case SectionType.album:
return S.of(context).albums;
case SectionType.fileTypesAndExtension:
@@ -78,7 +78,7 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).searchDatesEmptySection;
case SectionType.location:
return S.of(context).searchLocationEmptySection;
- case SectionType.people:
+ case SectionType.contacts:
return S.of(context).searchPeopleEmptySection;
case SectionType.album:
return S.of(context).searchAlbumsEmptySection;
@@ -101,7 +101,7 @@ extension SectionTypeExtensions on SectionType {
return false;
case SectionType.location:
return true;
- case SectionType.people:
+ case SectionType.contacts:
return true;
case SectionType.album:
return true;
@@ -122,7 +122,7 @@ extension SectionTypeExtensions on SectionType {
return false;
case SectionType.location:
return true;
- case SectionType.people:
+ case SectionType.contacts:
return true;
case SectionType.album:
return true;
@@ -145,7 +145,7 @@ extension SectionTypeExtensions on SectionType {
return S.of(context).addNew;
case SectionType.location:
return S.of(context).addNew;
- case SectionType.people:
+ case SectionType.contacts:
return S.of(context).invite;
case SectionType.album:
return S.of(context).addNew;
@@ -166,7 +166,7 @@ extension SectionTypeExtensions on SectionType {
return null;
case SectionType.location:
return Icons.add_location_alt_outlined;
- case SectionType.people:
+ case SectionType.contacts:
return Icons.adaptive.share;
case SectionType.album:
return Icons.add;
@@ -179,7 +179,7 @@ extension SectionTypeExtensions on SectionType {
FutureVoidCallback ctaOnTap(BuildContext context) {
switch (this) {
- case SectionType.people:
+ case SectionType.contacts:
return () async {
shareText(
S.of(context).shareTextRecommendUsingEnte,
@@ -249,8 +249,8 @@ extension SectionTypeExtensions on SectionType {
case SectionType.location:
return SearchService.instance.getAllLocationTags(limit);
- case SectionType.people:
- return SearchService.instance.getAllPeopleSearchResults(limit);
+ case SectionType.contacts:
+ return SearchService.instance.getAllContactsSearchResults(limit);
case SectionType.album:
return SearchService.instance.getAllCollectionSearchResults(limit);
diff --git a/lib/services/search_service.dart b/lib/services/search_service.dart
index c7e506d2c2..06f1fb6c39 100644
--- a/lib/services/search_service.dart
+++ b/lib/services/search_service.dart
@@ -810,7 +810,7 @@ class SearchService {
);
}
- Future<List<GenericSearchResult>> getPeopleSearchResults(
+ Future<List<GenericSearchResult>> getContactSearchResults(
String query,
) async {
final lowerCaseQuery = query.toLowerCase();
@@ -846,7 +846,7 @@ class SearchService {
return searchResults;
}
- Future<List<GenericSearchResult>> getAllPeopleSearchResults(
+ Future<List<GenericSearchResult>> getAllContactsSearchResults(
int? limit,
) async {
try {
diff --git a/lib/ui/viewer/search/search_widget.dart b/lib/ui/viewer/search/search_widget.dart
index b1433ce66b..bd201c5054 100644
--- a/lib/ui/viewer/search/search_widget.dart
+++ b/lib/ui/viewer/search/search_widget.dart
@@ -251,8 +251,9 @@ class SearchWidgetState extends State<SearchWidget> {
await _searchService.getDateResults(context, query);
allResults.addAll(possibleEvents);
- final peopleResults = await _searchService.getPeopleSearchResults(query);
- allResults.addAll(peopleResults);
+ final contactResults =
+ await _searchService.getContactSearchResults(query);
+ allResults.addAll(contactResults);
} catch (e, s) {
_logger.severe("error during search", e, s);
}