| undefined;
/**
- * Lazily created, cached, instance of a CryptoWorker web worker.
+ * Lazily created, cached, instance of a "shared" CryptoWorker web worker.
+ *
+ * Some code which needs to do operations in parallel (e.g. during the upload
+ * flow) creates its own CryptoWorker web workers. But those are exceptions; the
+ * rest of the code normally calls the functions in this file, and they all
+ * implicitly use a default "shared" web worker (unless we're already running in
+ * the context of a web worker).
*/
-export const sharedCryptoWorker = () =>
+const sharedWorker = () =>
(_comlinkWorker ??= createComlinkCryptoWorker()).remote;
-/** A shorter alias of {@link sharedCryptoWorker} for use within this file. */
-const sharedWorker = sharedCryptoWorker;
-
/**
* Create a new instance of a comlink worker that wraps a {@link CryptoWorker}
* web worker.
diff --git a/web/packages/base/locales/ar-SA/translation.json b/web/packages/base/locales/ar-SA/translation.json
index 99b03eba83..13e6a75b41 100644
--- a/web/packages/base/locales/ar-SA/translation.json
+++ b/web/packages/base/locales/ar-SA/translation.json
@@ -685,5 +685,5 @@
"person_favorites": "مفضلات {{name}}",
"shared_favorites": "",
"added_by_name": "أضيفت بواسطة {{name}}",
- "unowned_files_not_processed": ""
+ "unowned_files_not_processed": "لم تتم معالجة الملفات المضافة من قبل مستخدمين آخرين"
}
diff --git a/web/packages/base/locales/fa-IR/translation.json b/web/packages/base/locales/fa-IR/translation.json
index 108bdc5291..b1956bcf24 100644
--- a/web/packages/base/locales/fa-IR/translation.json
+++ b/web/packages/base/locales/fa-IR/translation.json
@@ -4,9 +4,9 @@
"intro_slide_2_title": "",
"intro_slide_2": "",
"intro_slide_3_title": "",
- "intro_slide_3": "",
- "login": "",
- "sign_up": "",
+ "intro_slide_3": "اندروید، آیاواس، وب، رایانه رومیزی",
+ "login": "ورود",
+ "sign_up": "ثبت نام",
"new_to_ente": "",
"existing_user": "",
"enter_email": "",
@@ -16,27 +16,27 @@
"email_already_registered": "",
"email_sent": "",
"check_inbox_hint": "",
- "verification_code": "",
- "resend_code": "",
- "verify": "",
- "send_otp": "",
- "generic_error": "",
- "generic_error_retry": "",
+ "verification_code": "کد تایید",
+ "resend_code": "ارسال مجدد کد",
+ "verify": "تایید",
+ "send_otp": "ارسال رمز یکبار مصرف",
+ "generic_error": "یک مشکلی پیش آمده",
+ "generic_error_retry": "مشکلی پیش آمده، لطفا دوباره تلاش کنید",
"invalid_code_error": "",
- "expired_code_error": "",
- "status_sending": "",
- "status_sent": "",
- "password": "",
- "link_password_description": "",
- "unlock": "",
- "set_password": "",
- "sign_in": "",
- "incorrect_password": "",
- "incorrect_password_or_no_account": "",
+ "expired_code_error": "کد تایید شما باطل شد",
+ "status_sending": "در حال ارسال...",
+ "status_sent": "ارسال شد!",
+ "password": "رمز عبور",
+ "link_password_description": "رمز عبور خودرا جهت باز شدن آلبوم بنویسید",
+ "unlock": "بازکردن",
+ "set_password": "تنظیم رمز عبور",
+ "sign_in": "ورود",
+ "incorrect_password": "رمز عبور نادرست",
+ "incorrect_password_or_no_account": "رمز عبور نادرست یا ایمیل ثبت نام نشده",
"pick_password_hint": "",
"pick_password_caution": "",
"key_generation_in_progress": "",
- "confirm_password": "",
+ "confirm_password": "تایید رمز عبور",
"referral_source_hint": "",
"referral_source_info": "",
"password_mismatch_error": "",
@@ -46,12 +46,12 @@
"new_album": "",
"create_albums": "",
"album_name": "",
- "close": "",
- "yes": "",
- "no": "",
- "nothing_here": "",
- "upload": "",
- "import": "",
+ "close": "بستن",
+ "yes": "بله",
+ "no": "خیر",
+ "nothing_here": "هیچی درحال حاضر اینجا نیست",
+ "upload": "بارگذاری",
+ "import": "وارد کردن",
"add_photos": "",
"add_more_photos": "",
"add_photos_count_one": "",
@@ -79,11 +79,11 @@
"mouse_scroll": "",
"pan": "",
"pinch": "",
- "drag": "",
- "tap_inside_image": "",
- "tap_outside_image": "",
- "shortcuts": "",
- "show_shortcuts": "",
+ "drag": "کشیدن",
+ "tap_inside_image": "زدن در داخل تصویر",
+ "tap_outside_image": "زدن در بیرون تصویر",
+ "shortcuts": "میانبرها",
+ "show_shortcuts": "نمایش میانبرها",
"zoom_preset": "",
"toggle_controls": "",
"toggle_live": "",
diff --git a/web/packages/base/locales/pt-BR/translation.json b/web/packages/base/locales/pt-BR/translation.json
index f07b501dd7..ffb09b5b4a 100644
--- a/web/packages/base/locales/pt-BR/translation.json
+++ b/web/packages/base/locales/pt-BR/translation.json
@@ -162,7 +162,7 @@
"ok": "OK",
"success": "Sucesso",
"error": "Erro",
- "note": "",
+ "note": "Nota",
"offline_message": "Você está sem internet, as memórias em cache estão sendo exibidas",
"install": "Instalar",
"install_mobile_app": "Instale nosso aplicativo para Android ou iOS para copiar todas suas fotos com segurança",
@@ -685,5 +685,5 @@
"person_favorites": "Favoritos de {{name}}",
"shared_favorites": "Favoritos compartilhados",
"added_by_name": "Adicionado por {{name}}",
- "unowned_files_not_processed": ""
+ "unowned_files_not_processed": "Não processou os arquivos adicionados por outros usuários"
}
diff --git a/web/packages/base/locales/ru-RU/translation.json b/web/packages/base/locales/ru-RU/translation.json
index 9479460f08..39401daefc 100644
--- a/web/packages/base/locales/ru-RU/translation.json
+++ b/web/packages/base/locales/ru-RU/translation.json
@@ -9,8 +9,8 @@
"sign_up": "Регистрация",
"new_to_ente": "Новенький в Ente",
"existing_user": "Существующий пользователь",
- "enter_email": "Введите ваш email адрес",
- "invalid_email_error": "Введите действительный email адрес",
+ "enter_email": "Введите адрес электронной почты",
+ "invalid_email_error": "Введите действительный адрес электронной почты",
"required": "Обязательное поле",
"email_not_registered": "Такой email не зарегистрирован",
"email_already_registered": "Такой email уже зарегистрирован",
@@ -32,7 +32,7 @@
"set_password": "Установить пароль",
"sign_in": "Зарегистрироваться",
"incorrect_password": "Неверный пароль",
- "incorrect_password_or_no_account": "",
+ "incorrect_password_or_no_account": "Неверный пароль или электронная почта не зарегистрирована",
"pick_password_hint": "Пожалуйста, введите пароль, который мы можем использовать для шифрования ваших данных",
"pick_password_caution": "Мы не храним ваш пароль, поэтому, если вы его забудете, мы ничем не сможем вам помочьдля восстановления ваших данных без пароля.",
"key_generation_in_progress": "Генерируем ключи шифрования...",
@@ -40,7 +40,7 @@
"referral_source_hint": "Как вы узнали о Ente? (необязательно)",
"referral_source_info": "Будет полезно, если вы укажете, где вы узнали о нас, так как мы не отслеживаем установки приложения!",
"password_mismatch_error": "Пароли не совпадают",
- "show_or_hide_password": "",
+ "show_or_hide_password": "Показать или скрыть пароль",
"welcome_to_ente_title": "Добро пожаловать в ",
"welcome_to_ente_subtitle": "Сквозное зашифрованное хранение фотографий и общий доступ к ним",
"new_album": "Новый альбом",
@@ -59,11 +59,11 @@
"select_photos": "Выбрать фотографии",
"file_upload": "Загрузка файла",
"preparing": "Подготовка",
- "processed_counts": "",
- "upload_reading_metadata_files": "",
+ "processed_counts": "{{count, number}} / {{total, number}}",
+ "upload_reading_metadata_files": "Чтение файлов метаданных",
"upload_cancelling": "Отмена оставшихся загрузок",
- "upload_done": "",
- "upload_skipped": "",
+ "upload_done": "{{count, number}} загружено",
+ "upload_skipped": "{{count, number}} пропущено",
"initial_load_delay_warning": "Первая загрузка может занять некоторое время",
"no_account": "У меня нет учетной записи",
"existing_account": "Уже есть аккаунт",
@@ -74,28 +74,28 @@
"download_favorites": "Скачать избранные",
"download_uncategorized": "Скачать без категорий",
"download_hidden_items": "Скачать скрытые элементы",
- "audio": "",
- "more": "",
- "mouse_scroll": "",
- "pan": "",
- "pinch": "",
- "drag": "",
- "tap_inside_image": "",
- "tap_outside_image": "",
- "shortcuts": "",
- "show_shortcuts": "",
- "zoom_preset": "",
- "toggle_controls": "",
- "toggle_live": "",
- "toggle_audio": "",
- "toggle_favorite": "",
- "toggle_archive": "",
- "view_info": "",
+ "audio": "Аудио",
+ "more": "Ещё",
+ "mouse_scroll": "Прокрутка мышью",
+ "pan": "Pan",
+ "pinch": "Pinch",
+ "drag": "Drag",
+ "tap_inside_image": "Нажмите внутри изображения",
+ "tap_outside_image": "Нажмите снаружи изображения",
+ "shortcuts": "Ярлыки",
+ "show_shortcuts": "Показать ярлыки",
+ "zoom_preset": "Предустановленный масштаб",
+ "toggle_controls": "Переключить управление",
+ "toggle_live": "Переключить прямую трансляцию",
+ "toggle_audio": "Переключить аудио",
+ "toggle_favorite": "Переключить избранное",
+ "toggle_archive": "Переключить архив",
+ "view_info": "Посмотреть информацию",
"copy_as_png": "Скопировать как PNG",
"toggle_fullscreen": "Полноэкранный режим",
- "exit_fullscreen": "",
- "go_fullscreen": "",
- "zoom": "",
+ "exit_fullscreen": "Выйти из полноэкранного режима",
+ "go_fullscreen": "Перейти в полноэкранный режим",
+ "zoom": "Увеличить",
"play": "Воспроизведение",
"pause": "Пауза",
"previous": "Предыдущий",
@@ -132,7 +132,7 @@
"password_changed_elsewhere": "Пароль изменен в другом месте",
"password_changed_elsewhere_message": "Пожалуйста, войдите снова на этом устройстве, чтобы использовать новый пароль для аутентификации.",
"go_back": "Вернуться назад",
- "account": "",
+ "account": "Аккаунт",
"recovery_key": "Ключ восстановления",
"do_this_later": "Сделать позже",
"save_key": "Сохранить ключ",
@@ -148,9 +148,9 @@
"no_recovery_key_message": "Из-за природы нашего сквозного протокола шифрования ваши данные не могут быть расшифрованы без вашего пароля или ключа восстановления",
"no_two_factor_recovery_key_message": "Пожалуйста, отправьте электронное письмо на адрес {{emailID}} с вашего зарегистрированного адреса электронной почты",
"contact_support": "Связаться с поддержкой",
- "help": "",
- "ente_help": "",
- "blog": "",
+ "help": "Помощь",
+ "ente_help": "Ente Помощь",
+ "blog": "Блог",
"request_feature": "Запросить функцию",
"support": "Поддержка",
"cancel": "Отменить",
@@ -158,11 +158,11 @@
"logout_message": "Вы уверены, что хотите выйти?",
"delete_account": "Удалить аккаунт",
"delete_account_manually_message": "Пожалуйста, отправьте письмо по адресу {{emailID}} с вашего зарегистрированного адреса электронной почты.
Ваш запрос будет обработан в течение 72 часов
",
- "change_email": "Изменить email адрес",
+ "change_email": "Изменить адрес электронной почты",
"ok": "ОК",
"success": "Успешно",
"error": "Ошибка",
- "note": "",
+ "note": "Заметка",
"offline_message": "Вы не в сети, кэшированные воспоминания отображаются",
"install": "Устанавливать",
"install_mobile_app": "Установите наше приложение Android или iOS для автоматического резервного копирования всех ваших фотографий",
@@ -226,11 +226,11 @@
"delete_photos": "Удалить фото",
"keep_photos": "Оставить фото",
"share_album": "Поделиться альбомом",
- "sharing_with_self": "",
- "sharing_already_shared": "",
+ "sharing_with_self": "Вы не можете поделиться с самим собой",
+ "sharing_already_shared": "Вы уже поделились этим с {{email}}",
"sharing_album_not_allowed": "Делиться альбомом запрещено",
"sharing_disabled_for_free_accounts": "Совместное использование отключено для бесплатных аккаунтов",
- "sharing_user_does_not_exist": "",
+ "sharing_user_does_not_exist": "Пользователь с такой электронной почтой не найден",
"search": "Поиск",
"search_results": "Результаты поиска",
"no_results": "Ничего не найдено",
@@ -246,9 +246,9 @@
"terms_and_conditions": "Я согласен с тем, что условия и политика конфиденциальности",
"people": "Люди",
"indexing_scheduled": "Индексация запланирована...",
- "indexing_photos": "",
- "indexing_fetching": "",
- "indexing_people": "",
+ "indexing_photos": "Обновление индексов...",
+ "indexing_fetching": "Синхронизация индексов...",
+ "indexing_people": "Синхронизация людей...",
"syncing_wait": "Синхронизация...",
"people_empty_too_few": "Люди будут показаны здесь, когда будет достаточно фотографий человека",
"unnamed_person": "Безымянный человек",
@@ -371,7 +371,7 @@
"leave_shared_album": "Да, уходи",
"confirm_remove_message": "Выбранные элементы будут удалены из этого альбома. Элементы, которые есть только в этом альбоме, будут перемещены в раздел Без категории.",
"confirm_remove_incl_others_message": "Некоторые из удаляемых вами элементов были добавлены другими пользователями, и вы потеряете к ним доступ.",
- "oldest": "Старейший",
+ "oldest": "Самые старые",
"last_updated": "Последнее обновление",
"name": "Имя",
"fix_creation_time": "Назначьте время",
@@ -388,7 +388,7 @@
"sharing_details": "Обмен подробностями",
"modify_sharing": "Изменить общий доступ",
"add_collaborators": "Добавление соавторов",
- "add_new_email": "Добавить новый email адрес",
+ "add_new_email": "Добавить новую электронную почту",
"shared_with_people_count_zero": "Делитесь с конкретными людьми",
"shared_with_people_count_one": "Совместно с 1 человеком",
"shared_with_people_count": "Поделился с {{count, number}} люди",
@@ -495,8 +495,8 @@
"stop_watching_folder_message": "Ваши существующие файлы не будут удалены, но Ente прекратит автоматическое обновление связанного альбома Ente при внесении изменений в эту папку.",
"yes_stop": "Да, остановись",
"change_folder": "Изменить папку",
- "view_logs": "",
- "view_logs_message": "",
+ "view_logs": "Просмотреть логи",
+ "view_logs_message": "При этом будут показаны журналы отладки, которые вы можете отправить нам по электронной почте, чтобы помочь в устранении вашей проблемы.
Обратите внимание, что будут указаны имена файлов, которые помогут отслеживать проблемы с конкретными файлами.
",
"weak_device_hint": "Используемый вами веб-браузер недостаточно мощный, чтобы зашифровать ваши фотографии. Пожалуйста, попробуйте войти в Ente на своем компьютере или загрузить мобильное/настольное приложение Ente.",
"drag_and_drop_hint": "Или перетащите в основное окно",
"authenticate": "Проверка подлинности",
@@ -595,8 +595,8 @@
"image": "Изображение",
"video": "Видео",
"live_photo": "Живое фото",
- "live": "",
- "edit_image": "",
+ "live": "Прямая трансляция",
+ "edit_image": "Редактировать изображение",
"photo_editor": "Редактор фото",
"confirm_editor_close": "Вы уверены, что хотите закрыть редактор?",
"confirm_editor_close_message": "Загрузите отредактированное изображение или сохраните копию в ente, чтобы сохранить внесенные изменения.",
@@ -625,9 +625,9 @@
"reset": "Сбросить",
"faster_upload": "Более быстрая загрузка данных",
"faster_upload_description": "Загрузка маршрута через близлежащие серверы",
- "open_ente_on_startup": "",
+ "open_ente_on_startup": "Открывать Enter при запуске",
"cast_album_to_tv": "Воспроизвести альбом на ТВ",
- "cast_to_tv": "",
+ "cast_to_tv": "Воспроизвести на ТВ",
"enter_cast_pin_code": "Введите код, который вы видите на экране телевизора ниже, чтобы выполнить сопряжение с этим устройством.",
"code": "Код",
"pair_device_to_tv": "Сопряжение устройств",
@@ -639,7 +639,7 @@
"pair_with_pin": "Соединение с помощью булавки",
"pair_with_pin_description": "Пара с PIN-кодом работает с любым экраном, на котором вы хотите посмотреть ваш альбом.",
"visit_cast_url": "Перейдите на страницу {{url}} на устройстве, которое вы хотите подключить.",
- "passkeys": "Passkeys",
+ "passkeys": "Ключ доступа",
"passkey_fetch_failed": "Не удалось получить ваши ключи.",
"manage_passkey": "Управление ключами",
"delete_passkey": "Удалить пароль",
@@ -675,15 +675,15 @@
"server_endpoint": "Конечная точка сервера",
"more_information": "Дополнительная информация",
"save": "Сохранить",
- "theme": "",
- "system": "",
- "light": "",
- "dark": "",
- "streamable_videos": "",
- "processing_videos_status": "",
- "share_favorites": "",
- "person_favorites": "",
- "shared_favorites": "",
- "added_by_name": "",
- "unowned_files_not_processed": ""
+ "theme": "Тема",
+ "system": "Системная",
+ "light": "Светлая",
+ "dark": "Тёмная",
+ "streamable_videos": "Потоковое видео",
+ "processing_videos_status": "Обработка видео...",
+ "share_favorites": "Поделиться избранными",
+ "person_favorites": "{{name}} избранных",
+ "shared_favorites": "Общие избранные",
+ "added_by_name": "Добавлено {{name}}",
+ "unowned_files_not_processed": "Файлы, добавленные другими пользователями, не были обработаны"
}
diff --git a/web/packages/base/locales/vi-VN/translation.json b/web/packages/base/locales/vi-VN/translation.json
index 6b3904aca7..6212bc57a2 100644
--- a/web/packages/base/locales/vi-VN/translation.json
+++ b/web/packages/base/locales/vi-VN/translation.json
@@ -1,19 +1,19 @@
{
"intro_slide_1_title": "Sao lưu riêng tư
cho những kỷ niệm của bạn",
- "intro_slide_1": "Mã hóa đầu cuối mặc định",
- "intro_slide_2_title": "Lưu trữ an toàn
tại nơi trú ẩn",
- "intro_slide_2": "Được thiết kế để tồn tại lâu dài",
+ "intro_slide_1": "Mã hóa đầu cuối theo mặc định",
+ "intro_slide_2_title": "Lưu trữ an toàn
ở hầm trú ẩn hạt nhân",
+ "intro_slide_2": "Được thiết kế để trường tồn",
"intro_slide_3_title": "Có sẵn
mọi nơi",
"intro_slide_3": "Android, iOS, Web, Desktop",
"login": "Đăng nhập",
"sign_up": "Đăng ký",
- "new_to_ente": "Mới đến Ente",
- "existing_user": "Người dùng hiện tại",
+ "new_to_ente": "Mới dùng Ente",
+ "existing_user": "Đã có tài khoản",
"enter_email": "Nhập địa chỉ email",
"invalid_email_error": "Nhập một email hợp lệ",
"required": "Bắt buộc",
"email_not_registered": "Email chưa được đăng kí",
- "email_already_registered": "Email đã được đăng kí",
+ "email_already_registered": "Email đã được đăng ký",
"email_sent": "Mã xác minh đã được gửi đến {{email}}",
"check_inbox_hint": "Vui lòng kiểm tra hộp thư đến (và thư rác) để hoàn tất xác minh",
"verification_code": "Mã xác minh",
@@ -32,15 +32,15 @@
"set_password": "Đặt mật khẩu",
"sign_in": "Đăng nhập",
"incorrect_password": "Mật khẩu không chính xác",
- "incorrect_password_or_no_account": "",
- "pick_password_hint": "Vui lòng nhập mật khẩu mà chúng tôi có thể sử dụng để mã hóa dữ liệu của bạn",
- "pick_password_caution": "Chúng tôi không lưu trữ mật khẩu của bạn, vì vậy nếu bạn quên, chúng tôi sẽ không thể giúp bạn khôi phục dữ liệu mà không có khóa khôi phục.",
- "key_generation_in_progress": "Đang tạo khóa mã hóa...",
+ "incorrect_password_or_no_account": "Sai mật khẩu hoặc email chưa được đăng ký",
+ "pick_password_hint": "Vui lòng nhập một mật khẩu dùng để mã hóa dữ liệu của bạn",
+ "pick_password_caution": "Chúng tôi không lưu trữ mật khẩu của bạn, nên nếu bạn quên, chúng tôi sẽ không thể giúp bạn khôi phục dữ liệu nếu không có mã khôi phục.",
+ "key_generation_in_progress": "Đang mã hóa...",
"confirm_password": "Xác nhận mật khẩu",
- "referral_source_hint": "Bạn đã nghe về Ente từ đâu? (tùy chọn)",
- "referral_source_info": "Chúng tôi không theo dõi cài đặt ứng dụng, sẽ rất hữu ích nếu bạn cho chúng tôi biết bạn đã tìm thấy chúng tôi ở đâu!",
+ "referral_source_hint": "Bạn biết Ente từ đâu? (tùy chọn)",
+ "referral_source_info": "Chúng tôi không theo dõi cài đặt ứng dụng, nên nếu bạn bật mí bạn tìm thấy chúng tôi từ đâu sẽ rất hữu ích!",
"password_mismatch_error": "Mật khẩu không khớp",
- "show_or_hide_password": "",
+ "show_or_hide_password": "Ẩn hoặc hiện mật khẩu",
"welcome_to_ente_title": "Chào mừng đến với ",
"welcome_to_ente_subtitle": "Lưu trữ và chia sẻ ảnh được mã hóa đầu cuối",
"new_album": "Album mới",
@@ -53,222 +53,222 @@
"upload": "Tải lên",
"import": "Nhập",
"add_photos": "Thêm ảnh",
- "add_more_photos": "Thêm nhiều ảnh hơn",
+ "add_more_photos": "Thêm ảnh",
"add_photos_count_one": "Thêm 1 mục",
"add_photos_count": "Thêm {{count, number}} mục",
"select_photos": "Chọn ảnh",
"file_upload": "Tải tệp lên",
- "preparing": "",
- "processed_counts": "",
- "upload_reading_metadata_files": "",
- "upload_cancelling": "Hủy bỏ các tải lên còn lại",
- "upload_done": "",
- "upload_skipped": "",
- "initial_load_delay_warning": "Tải lần đầu có thể mất một chút thời gian",
- "no_account": "Không có tài khoản",
+ "preparing": "Đang chuẩn bị",
+ "processed_counts": "{{count, number}} / {{total, number}}",
+ "upload_reading_metadata_files": "Đang đọc siêu dữ liệu",
+ "upload_cancelling": "Hủy bỏ các lượt tải lên còn lại",
+ "upload_done": "Đã tải lên {{count, number}}",
+ "upload_skipped": "{{count, number}} bị bỏ qua",
+ "initial_load_delay_warning": "Lần đầu tải có thể mất một ít thời gian",
+ "no_account": "Chưa có tài khoản",
"existing_account": "Đã có tài khoản",
"create": "Tạo",
- "files_count": "",
+ "files_count": "{{count, number}} tệp",
"download": "Tải xuống",
"download_album": "Tải xuống album",
"download_favorites": "Tải xuống mục yêu thích",
- "download_uncategorized": "Tải xuống chưa phân loại",
- "download_hidden_items": "Tải xuống các mục ẩn",
- "audio": "",
- "more": "",
- "mouse_scroll": "",
- "pan": "",
- "pinch": "",
- "drag": "",
- "tap_inside_image": "",
- "tap_outside_image": "",
- "shortcuts": "",
- "show_shortcuts": "",
- "zoom_preset": "",
- "toggle_controls": "",
- "toggle_live": "",
- "toggle_audio": "",
- "toggle_favorite": "",
- "toggle_archive": "",
- "view_info": "",
- "copy_as_png": "Sao chép dưới dạng PNG",
- "toggle_fullscreen": "Chuyển đổi chế độ toàn màn hình",
- "exit_fullscreen": "",
- "go_fullscreen": "",
- "zoom": "",
- "play": "",
- "pause": "",
+ "download_uncategorized": "Tải xuống mục chưa phân loại",
+ "download_hidden_items": "Tải xuống mục ẩn",
+ "audio": "Âm thanh",
+ "more": "Thêm",
+ "mouse_scroll": "Cuộn chuột",
+ "pan": "Lia qua",
+ "pinch": "Chụm 2 ngón",
+ "drag": "Kéo",
+ "tap_inside_image": "Nhấn lên ảnh",
+ "tap_outside_image": "Nhấn ngoài ảnh",
+ "shortcuts": "Phím tắt",
+ "show_shortcuts": "Hiện phím tắt",
+ "zoom_preset": "Phóng to chi tiết",
+ "toggle_controls": "Bật/tắt điều khiển",
+ "toggle_live": "Bật/tắt Live",
+ "toggle_audio": "Bật/tắt âm thanh",
+ "toggle_favorite": "Thích/bỏ thích",
+ "toggle_archive": "Lưu trữ/bỏ lưu trữ",
+ "view_info": "Xem thông tin",
+ "copy_as_png": "Sao chép dạng PNG",
+ "toggle_fullscreen": "Chế độ toàn màn hình",
+ "exit_fullscreen": "Thoát toàn màn hình",
+ "go_fullscreen": "Toàn màn hình",
+ "zoom": "Thu phóng",
+ "play": "Phát",
+ "pause": "Dừng",
"previous": "Trước",
- "next": "Tiếp theo",
- "video_seek": "",
- "quality": "",
- "auto": "",
- "original": "",
- "speed": "",
- "title_photos": "Ảnh Ente",
- "title_auth": "Xác thực Ente",
+ "next": "Kế tiếp",
+ "video_seek": "Tua video",
+ "quality": "Chất lượng",
+ "auto": "Tự động",
+ "original": "Gốc",
+ "speed": "Tốc độ",
+ "title_photos": "Ente Photos",
+ "title_auth": "Ente Auth",
"title_accounts": "Tài khoản Ente",
"upload_first_photo": "Tải lên ảnh đầu tiên của bạn",
- "import_your_folders": "Nhập các thư mục của bạn",
- "upload_dropzone_hint": "Thả để sao lưu các tệp của bạn",
- "watch_folder_dropzone_hint": "Thả để thêm thư mục theo dõi",
- "trash_files_title": "Xóa tệp?",
+ "import_your_folders": "Nhập thư mục của bạn",
+ "upload_dropzone_hint": "Kéo thả để sao lưu tệp của bạn",
+ "watch_folder_dropzone_hint": "Kéo thả để thêm thư mục theo dõi",
+ "trash_files_title": "Xóa các tệp?",
"trash_file_title": "Xóa tệp?",
"delete_files_title": "Xóa ngay lập tức?",
"delete_files_message": "Các tệp đã chọn sẽ bị xóa vĩnh viễn khỏi tài khoản Ente của bạn.",
- "selected_count": "{{selected, number}} đã chọn",
- "selected_and_yours_count": "{{selected, number}} đã chọn {{yours, number}} của bạn",
+ "selected_count": "{{selected, number}} mục đã chọn",
+ "selected_and_yours_count": "{{selected, number}} mục đã chọn, trong đó {{yours, number}} là của bạn",
"delete": "Xóa",
- "favorite": "Yêu thích",
+ "favorite": "Thích",
"convert": "Chuyển đổi",
"multi_folder_upload": "Phát hiện nhiều thư mục",
- "upload_to_choice": "Bạn có muốn tải chúng vào",
+ "upload_to_choice": "Bạn có muốn tải chúng thành",
"upload_to_single_album": "Một album duy nhất",
- "upload_to_album_per_folder": "Album riêng biệt",
+ "upload_to_album_per_folder": "Các album riêng biệt",
"session_expired": "Phiên đã hết hạn",
"session_expired_message": "Phiên của bạn đã hết hạn, vui lòng đăng nhập lại để tiếp tục",
- "password_generation_failed": "Trình duyệt của bạn không thể tạo một khóa mạnh đáp ứng tiêu chuẩn mã hóa của Ente, vui lòng thử sử dụng ứng dụng di động hoặc trình duyệt khác",
+ "password_generation_failed": "Trình duyệt của bạn không thể tạo một mã mạnh đáp ứng tiêu chuẩn mã hóa của Ente, vui lòng dùng ứng dụng di động hoặc trình duyệt khác",
"change_password": "Đổi mật khẩu",
"password_changed_elsewhere": "Mật khẩu đã được thay đổi ở nơi khác",
- "password_changed_elsewhere_message": "Vui lòng đăng nhập lại trên thiết bị này để sử dụng mật khẩu mới của bạn để xác thực.",
+ "password_changed_elsewhere_message": "Vui lòng đăng nhập lại trên thiết bị này và dùng mật khẩu mới của bạn.",
"go_back": "Quay lại",
- "account": "",
- "recovery_key": "Khóa khôi phục",
- "do_this_later": "Làm điều này sau",
- "save_key": "Lưu khóa",
- "recovery_key_description": "Nếu bạn quên mật khẩu của mình, cách duy nhất để khôi phục dữ liệu của bạn là với khóa này.",
- "key_not_stored_note": "Chúng tôi không lưu trữ khóa này, vì vậy hãy lưu nó ở một nơi an toàn",
- "recovery_key_generation_failed": "Mã khôi phục không thể được tạo, vui lòng thử lại",
+ "account": "Tài khoản",
+ "recovery_key": "Mã khôi phục",
+ "do_this_later": "Để sau",
+ "save_key": "Lưu mã",
+ "recovery_key_description": "Nếu bạn quên mật khẩu, cách duy nhất để khôi phục dữ liệu của bạn là dùng mã này.",
+ "key_not_stored_note": "Chúng tôi không lưu trữ mã này, nên hãy lưu nó ở một nơi an toàn",
+ "recovery_key_generation_failed": "Không tạo được mã khôi phục, vui lòng thử lại",
"forgot_password": "Quên mật khẩu",
"recover_account": "Khôi phục tài khoản",
"recover": "Khôi phục",
- "no_recovery_key_title": "Không có khóa khôi phục?",
- "incorrect_recovery_key": "Khóa khôi phục không chính xác",
- "sorry": "Xin lỗi",
- "no_recovery_key_message": "Do tính chất của giao thức mã hóa đầu cuối của chúng tôi, dữ liệu của bạn không thể được giải mã mà không có mật khẩu hoặc khóa khôi phục của bạn",
+ "no_recovery_key_title": "Không có mã khôi phục?",
+ "incorrect_recovery_key": "Mã khôi phục không chính xác",
+ "sorry": "Rất tiếc",
+ "no_recovery_key_message": "Do tính chất của giao thức mã hóa đầu cuối, không thể giải mã dữ liệu của bạn mà không có mật khẩu hoặc mã khôi phục",
"no_two_factor_recovery_key_message": "Vui lòng gửi email đến {{emailID}} từ địa chỉ email đã đăng ký của bạn",
"contact_support": "Liên hệ hỗ trợ",
- "help": "",
- "ente_help": "",
- "blog": "",
- "request_feature": "Yêu cầu tính năng",
+ "help": "Trợ giúp",
+ "ente_help": "Trợ giúp Ente",
+ "blog": "Blog",
+ "request_feature": "Đề xuất tính năng",
"support": "Hỗ trợ",
"cancel": "Hủy",
"logout": "Đăng xuất",
- "logout_message": "Bạn có chắc chắn muốn đăng xuất không?",
+ "logout_message": "Bạn có chắc muốn đăng xuất không?",
"delete_account": "Xóa tài khoản",
"delete_account_manually_message": "Vui lòng gửi email đến {{emailID}} từ địa chỉ email đã đăng ký của bạn.
Yêu cầu của bạn sẽ được xử lý trong vòng 72 giờ.
",
"change_email": "Đổi email",
"ok": "OK",
"success": "Thành công",
"error": "Lỗi",
- "note": "",
- "offline_message": "Bạn đang ngoại tuyến, các kỷ niệm đã được lưu vào bộ nhớ cache đang được hiển thị",
+ "note": "Ghi chú",
+ "offline_message": "Bạn đang ngoại tuyến, các kỷ niệm hiển thị là từ bộ nhớ đệm",
"install": "Cài đặt",
"install_mobile_app": "Cài đặt ứng dụng Android hoặc iOS của chúng tôi để tự động sao lưu tất cả ảnh của bạn",
- "download_app": "Tải xuống ứng dụng desktop",
- "download_app_message": "Xin lỗi, thao tác này hiện chỉ được hỗ trợ trên ứng dụng desktop của chúng tôi",
+ "download_app": "Tải xuống ứng dụng máy tính",
+ "download_app_message": "Rất tiếc, thao tác này hiện chỉ hỗ trợ trên ứng dụng máy tính",
"subscription": "Gói đăng ký",
"manage_payment_method": "Quản lý phương thức thanh toán",
"manage_family": "Quản lý gia đình",
"family_plan": "Gói gia đình",
"leave_family_plan": "Rời khỏi gói gia đình",
"leave": "Rời",
- "leave_family_plan_confirm": "Bạn có chắc chắn muốn rời khỏi gói gia đình không?",
+ "leave_family_plan_confirm": "Bạn có chắc muốn rời khỏi gói gia đình không?",
"choose_plan": "Chọn gói của bạn",
- "manage_plan": "Quản lý đăng ký của bạn",
- "current_usage": "Sử dụng hiện tại là {{usage}}",
- "two_months_free": "Nhận 2 tháng miễn phí với các gói hàng năm",
- "free_plan_option": "Tiếp tục với gói miễn phí",
- "free_plan_description": "{{storage}} miễn phí mãi mãi",
+ "manage_plan": "Quản lý gói đăng ký",
+ "current_usage": "Hiện dùng {{usage}}",
+ "two_months_free": "Nhận 2 tháng miễn phí với các gói theo năm",
+ "free_plan_option": "Dùng tiếp gói miễn phí",
+ "free_plan_description": "{{storage}} miễn phí vĩnh viễn",
"active": "Hoạt động",
- "subscription_info_free": "Bạn đang ở gói miễn phí",
- "subscription_info_family": "Bạn đang ở gói gia đình do",
- "subscription_info_expired": "Gói đăng ký của bạn đã hết hạn, vui lòng gia hạn",
- "subscription_info_renewal_cancelled": "Gói đăng ký của bạn sẽ bị hủy vào {{date, date}}",
- "subscription_info_storage_quota_exceeded": "Bạn đã vượt quá hạn mức lưu trữ của mình, vui lòng nâng cấp",
+ "subscription_info_free": "Bạn đang dùng gói miễn phí",
+ "subscription_info_family": "Bạn đang dùng gói gia đình của",
+ "subscription_info_expired": "Gói của bạn đã hết hạn, vui lòng gia hạn",
+ "subscription_info_renewal_cancelled": "Gói của bạn sẽ bị hủy vào {{date, date}}",
+ "subscription_info_storage_quota_exceeded": "Bạn đã vượt hạn mức lưu trữ của mình, vui lòng nâng cấp",
"subscription_status_renewal_active": "Gia hạn vào {{date, date}}",
"subscription_status_renewal_cancelled": "Kết thúc vào {{date, date}}",
"add_on_valid_till": "Gói bổ sung {{storage}} của bạn có hiệu lực đến {{date, date}}",
"subscription_expired": "Gói đăng ký đã hết hạn",
- "storage_quota_exceeded": "Đã vượt quá giới hạn lưu trữ",
- "subscription_purchase_success": "Chúng tôi đã nhận được thanh toán của bạn
Gói đăng ký của bạn có hiệu lực đến {{date, date}}
",
+ "storage_quota_exceeded": "Đã vượt hạn mức lưu trữ",
+ "subscription_purchase_success": "Chúng tôi đã nhận được thanh toán
Gói của bạn có hiệu lực đến {{date, date}}
",
"subscription_purchase_cancelled": "Giao dịch của bạn đã bị hủy, vui lòng thử lại nếu bạn muốn đăng ký",
- "subscription_purchase_failed": "Giao dịch đăng ký không thành công, vui lòng thử lại",
- "subscription_verification_error": "Xác minh gói đăng ký không thành công",
- "update_payment_method_message": "Chúng tôi xin lỗi, thanh toán không thành công khi chúng tôi cố gắng tính phí thẻ của bạn, vui lòng cập nhật phương thức thanh toán của bạn và thử lại",
+ "subscription_purchase_failed": "Giao dịch không thành công, vui lòng thử lại",
+ "subscription_verification_error": "Xác minh gói không thành công",
+ "update_payment_method_message": "Rất tiếc, thẻ của bạn thanh toán không thành công, vui lòng cập nhật phương thức thanh toán và thử lại",
"payment_method_authentication_failed": "Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại",
"update_payment_method": "Cập nhật phương thức thanh toán",
- "monthly": "Hàng tháng",
- "yearly": "Hàng năm",
- "month_short": "th",
+ "monthly": "Theo tháng",
+ "yearly": "Theo năm",
+ "month_short": "tháng",
"year": "năm",
"update_subscription": "Thay đổi gói",
"update_subscription_title": "Xác nhận thay đổi gói",
- "update_subscription_message": "Bạn có chắc chắn muốn thay đổi gói của mình không?",
- "cancel_subscription": "Hủy đăng ký",
- "cancel_subscription_message": "Tất cả dữ liệu của bạn sẽ bị xóa khỏi máy chủ của chúng tôi vào cuối kỳ thanh toán này.
Bạn có chắc chắn muốn hủy đăng ký của mình không?
",
- "cancel_subscription_with_addon_message": "Bạn có chắc chắn muốn hủy đăng ký của mình không?
",
- "subscription_cancel_success": "Hủy đăng ký thành công",
- "reactivate_subscription": "Kích hoạt lại đăng ký",
- "reactivate_subscription_message": "Khi được kích hoạt lại, bạn sẽ bị tính phí vào {{date, date}}",
- "subscription_activate_success": "Kích hoạt đăng ký thành công",
+ "update_subscription_message": "Bạn có chắc muốn thay đổi gói của mình không?",
+ "cancel_subscription": "Hủy gói",
+ "cancel_subscription_message": "Toàn bộ dữ liệu của bạn sẽ bị xóa khỏi máy chủ của chúng tôi vào cuối kỳ thanh toán này.
Bạn có chắc muốn hủy gói của mình không?
",
+ "cancel_subscription_with_addon_message": "Bạn có chắc muốn hủy gói của mình không?
",
+ "subscription_cancel_success": "Hủy gói thành công",
+ "reactivate_subscription": "Kích hoạt lại gói",
+ "reactivate_subscription_message": "Khi kích hoạt lại, bạn sẽ bị tính phí vào {{date, date}}",
+ "subscription_activate_success": "Kích hoạt gói thành công ",
"thank_you": "Cảm ơn bạn",
- "cancel_subscription_on_mobile": "Hủy đăng ký di động",
- "cancel_subscription_on_mobile_message": "Vui lòng hủy đăng ký của bạn từ ứng dụng di động để kích hoạt một đăng ký ở đây",
- "mail_to_manage_subscription": "Vui lòng liên hệ với chúng tôi tại {{emailID}} để quản lý đăng ký của bạn",
+ "cancel_subscription_on_mobile": "Hủy gói trên điện thoại",
+ "cancel_subscription_on_mobile_message": "Vui lòng hủy gói của bạn từ ứng dụng di động để kích hoạt một gói ở đây",
+ "mail_to_manage_subscription": "Vui lòng liên hệ với chúng tôi qua {{emailID}} để quản lý gói của bạn",
"rename": "Đổi tên",
"rename_file": "Đổi tên tệp",
"rename_album": "Đổi tên album",
"delete_album": "Xóa album",
"delete_album_title": "Xóa album?",
- "delete_album_message": "Có xóa các bức ảnh (và video) có trong album này từ tất cả các album khác mà chúng là một phần không?",
+ "delete_album_message": "Xóa luôn các tấm ảnh (và video) có trong album này khỏi toàn bộ album khác cũng đang chứa chúng?",
"delete_photos": "Xóa ảnh",
"keep_photos": "Giữ ảnh",
"share_album": "Chia sẻ album",
- "sharing_with_self": "",
- "sharing_already_shared": "",
+ "sharing_with_self": "Bạn không thể chia sẻ với chính mình",
+ "sharing_already_shared": "Bạn đã chia sẻ với {{email}} rồi",
"sharing_album_not_allowed": "Chia sẻ album không được phép",
- "sharing_disabled_for_free_accounts": "Chia sẻ bị vô hiệu hóa cho các tài khoản miễn phí",
- "sharing_user_does_not_exist": "",
+ "sharing_disabled_for_free_accounts": "Tài khoản miễn phí không thể chia sẻ",
+ "sharing_user_does_not_exist": "Không tìm thấy người dùng với email này",
"search": "Tìm kiếm",
"search_results": "Kết quả tìm kiếm",
"no_results": "Không tìm thấy kết quả",
- "search_hint": "Tìm kiếm album, ngày tháng, mô tả, ...",
+ "search_hint": "Tìm album, ngày chụp, mô tả,...",
"album": "Album",
"date": "Ngày",
"description": "Mô tả",
"file_type": "Loại tệp",
"magic": "Ma thuật",
- "photos_count_zero": "Không có kỷ niệm",
- "photos_count_one": "1 kỷ niệm",
- "photos_count": "{{count, number}} kỷ niệm",
- "terms_and_conditions": "Tôi đồng ý với các điều khoản và chính sách bảo mật",
+ "photos_count_zero": "Chưa có ảnh nào",
+ "photos_count_one": "1 ảnh",
+ "photos_count": "{{count, number}} ảnh",
+ "terms_and_conditions": "Tôi đồng ý điều khoản và chính sách bảo mật",
"people": "Người",
- "indexing_scheduled": "Lập chỉ mục đã được lên lịch...",
- "indexing_photos": "",
- "indexing_fetching": "",
- "indexing_people": "",
+ "indexing_scheduled": "Đã lên lịch lập chỉ mục...",
+ "indexing_photos": "Đang cập nhật chỉ mục...",
+ "indexing_fetching": "Đang đồng bộ chỉ mục...",
+ "indexing_people": "Đang đồng bộ người...",
"syncing_wait": "Đang đồng bộ...",
- "people_empty_too_few": "Người sẽ được hiển thị ở đây khi có đủ ảnh của một người",
- "unnamed_person": "Người không tên",
+ "people_empty_too_few": "Sẽ hiện người ở đây khi có ảnh của một người",
+ "unnamed_person": "Chưa đặt tên",
"add_a_name": "Thêm một tên",
"new_person": "Người mới",
"add_name": "Thêm tên",
"rename_person": "Đổi tên người",
"reset_person_confirm": "Đặt lại người?",
- "reset_person_confirm_message": "Tên, nhóm khuôn mặt và gợi ý cho người này sẽ được đặt lại",
+ "reset_person_confirm_message": "Tên, nhóm khuôn mặt và những gợi ý cho người này sẽ bị đặt lại",
"ignore": "Bỏ qua",
"ignore_person_confirm": "Bỏ qua người?",
"ignore_person_confirm_message": "Nhóm khuôn mặt này sẽ không được hiển thị trong danh sách người",
"ignored": "Đã bỏ qua",
"show_person": "Hiển thị người",
- "review_suggestions": "Xem xét gợi ý",
+ "review_suggestions": "Xem qua gợi ý",
"saved_choices": "Lựa chọn đã lưu",
"discard_changes": "Bỏ qua thay đổi",
"discard_changes_confirm_message": "Bạn có thay đổi chưa được lưu. Những thay đổi này sẽ bị mất nếu bạn đóng mà không lưu",
- "people_suggestions_finding": "Tìm kiếm khuôn mặt tương tự...",
- "people_suggestions_empty": "Không còn gợi ý nào cho bây giờ",
+ "people_suggestions_finding": "Tìm khuôn mặt tương tự...",
+ "people_suggestions_empty": "Không còn gợi ý nào",
"info": "Thông tin",
"file_name": "Tên tệp",
"caption_placeholder": "Thêm mô tả",
@@ -277,79 +277,79 @@
"map": "Bản đồ",
"enable_map": "Bật bản đồ",
"enable_maps_confirm": "Bật bản đồ?",
- "enable_maps_confirm_message": "Điều này sẽ hiển thị ảnh của bạn trên bản đồ thế giới.
Bản đồ được lưu trữ bởi OpenStreetMap, và vị trí chính xác của ảnh của bạn sẽ không bao giờ được chia sẻ.
Bạn có thể tắt tính năng này bất cứ lúc nào từ Cài đặt.
",
+ "enable_maps_confirm_message": "Ảnh của bạn sẽ hiển thị trên bản đồ thế giới.
Bản đồ được lưu trữ bởi OpenStreetMap, và vị trí chính xác ảnh của bạn không bao giờ được chia sẻ.
Bạn có thể tắt tính năng này bất cứ lúc nào từ Cài đặt.
",
"disable_map": "Tắt bản đồ",
"disable_maps_confirm": "Tắt bản đồ?",
- "disable_maps_confirm_message": "Điều này sẽ tắt hiển thị ảnh của bạn trên bản đồ thế giới.
Bạn có thể bật tính năng này bất cứ lúc nào từ Cài đặt.
",
+ "disable_maps_confirm_message": "Ảnh của bạn sẽ thôi hiển thị trên bản đồ thế giới.
Bạn có thể bật tính năng này bất cứ lúc nào từ Cài đặt.
",
"details": "Chi tiết",
- "view_exif": "Xem tất cả dữ liệu Exif",
- "no_exif": "Không có dữ liệu Exif",
+ "view_exif": "Xem thông số Exif",
+ "no_exif": "No Exif data",
"exif": "Exif",
- "two_factor": "Xác thực hai yếu tố",
- "two_factor_authentication": "Xác thực hai yếu tố",
+ "two_factor": "Xác thực 2 bước",
+ "two_factor_authentication": "Xác thực 2 bước",
"two_factor_qr_help": "Quét mã QR bên dưới bằng ứng dụng xác thực yêu thích của bạn",
"two_factor_manual_entry_title": "Nhập mã thủ công",
"two_factor_manual_entry_message": "Vui lòng nhập mã này vào ứng dụng xác thực yêu thích của bạn",
- "scan_qr_title": "Quét mã QR thay thế",
- "enable_two_factor": "Bật xác thực hai yếu tố",
+ "scan_qr_title": "Quét mã QR",
+ "enable_two_factor": "Bật xác thực 2 bước",
"enable": "Bật",
"enabled": "Đã bật",
- "lost_2fa_device": "Thiết bị xác thực hai yếu tố bị mất",
+ "lost_2fa_device": "Mất thiết bị xác thực 2 bước",
"incorrect_code": "Mã không chính xác",
- "two_factor_info": "Thêm một lớp bảo mật bổ sung bằng cách yêu cầu nhiều hơn email và mật khẩu của bạn để đăng nhập vào tài khoản của bạn",
+ "two_factor_info": "Thêm một lớp bảo mật bổ sung bằng cách yêu cầu nhiều hơn email và mật khẩu của bạn để đăng nhập",
"disable": "Tắt",
"reconfigure": "Cấu hình lại",
"reconfigure_two_factor_hint": "Cập nhật thiết bị xác thực của bạn",
- "update_two_factor": "Cập nhật xác thực hai yếu tố",
- "update_two_factor_message": "Tiếp tục sẽ làm vô hiệu hóa bất kỳ thiết bị xác thực nào đã được cấu hình trước đó",
+ "update_two_factor": "Cập nhật xác thực 2 bước",
+ "update_two_factor_message": "Tiếp tục sẽ khiến mọi thiết bị xác thực được cấu hình trước đó bị vô hiệu hóa",
"update": "Cập nhật",
- "disable_two_factor": "Tắt xác thực hai yếu tố",
- "disable_two_factor_message": "Bạn có chắc chắn muốn tắt xác thực hai yếu tố của mình không",
+ "disable_two_factor": "Tắt xác thực 2 bước",
+ "disable_two_factor_message": "Bạn có chắc muốn tắt xác thực 2 bước không",
"export_data": "Xuất dữ liệu",
"select_folder": "Chọn thư mục",
"select_zips": "Chọn tệp zip",
"faq": "Câu hỏi thường gặp",
- "takeout_hint": "Giải nén tất cả các tệp zip vào cùng một thư mục và tải lên. Hoặc tải lên các tệp zip trực tiếp. Xem Câu hỏi thường gặp để biết chi tiết.",
- "destination": "Điểm đến",
+ "takeout_hint": "Giải nén tất cả tệp zip vào cùng một thư mục và tải lên. Hoặc tải lên trực tiếp các tệp zip. Xem Câu hỏi thường gặp để biết thêm.",
+ "destination": "Đích đến",
"start": "Bắt đầu",
- "last_export_time": "Thời gian xuất cuối cùng",
+ "last_export_time": "Thời gian xuất gần nhất",
"export_again": "Đồng bộ lại",
- "local_storage_not_accessible": "Trình duyệt của bạn hoặc một tiện ích mở rộng đang chặn Ente không lưu dữ liệu vào bộ nhớ cục bộ",
+ "local_storage_not_accessible": "Trình duyệt của bạn hoặc một tiện ích mở rộng đang chặn Ente lưu dữ liệu vào bộ nhớ thiết bị",
"email_already_taken": "Email đã được sử dụng",
"live_photos_detected": "Các tệp ảnh và video từ Live Photos của bạn đã được gộp thành một tệp duy nhất",
"ignored_uploads": "Tải lên đã bị bỏ qua",
- "ignored_uploads_hint": "Bỏ qua những tệp này vì có tệp có tên và nội dung trùng khớp trong cùng một album",
+ "ignored_uploads_hint": "Những tệp này bị bỏ qua vì có tên và nội dung trùng khớp trong cùng một album",
"file_not_uploaded_list": "Các tệp sau không được tải lên",
"failed_uploads": "Tải lên không thành công",
- "failed_uploads_hint": "Sẽ có một tùy chọn để thử lại khi việc tải lên hoàn tất",
- "retry_failed_uploads": "Thử lại các tệp tải lên không thành công",
+ "failed_uploads_hint": "Sẽ có tùy chọn thử lại sau khi việc tải lên hoàn tất",
+ "retry_failed_uploads": "Thử tải lên lại các tệp không thành công",
"thumbnail_generation_failed": "Tạo hình thu nhỏ không thành công",
"thumbnail_generation_failed_hint": "Các tệp này đã được tải lên, nhưng rất tiếc chúng tôi không thể tạo hình thu nhỏ cho chúng.",
"unsupported_files": "Tệp không được hỗ trợ",
"unsupported_files_hint": "Ente chưa hỗ trợ các định dạng tệp này",
"blocked_uploads": "Tải lên bị chặn",
- "blocked_uploads_hint": "Trình duyệt của bạn hoặc một tiện ích mở rộng đang ngăn Ente sử dụng eTags để tải lên các tệp lớn.",
+ "blocked_uploads_hint": "Trình duyệt của bạn hoặc một tiện ích mở rộng đang chặn Ente sử dụng eTags để tải lên các tệp lớn.",
"large_files": "Tệp lớn",
- "large_files_hint": "Các tệp này đã không được tải lên vì chúng vượt quá giới hạn kích thước tệp tối đa của chúng tôi",
+ "large_files_hint": "Các tệp này không thể tải lên vì chúng vượt quá dung lượng tệp tối đa của chúng tôi",
"insufficient_storage": "Không đủ dung lượng lưu trữ",
- "insufficient_storage_hint": "Các tệp này đã không được tải lên vì chúng vượt quá giới hạn kích thước tối đa cho gói lưu trữ của bạn",
- "uploads_in_progress": "Tải lên đang tiến hành",
+ "insufficient_storage_hint": "Các tệp này không thể tải lên vì chúng vượt quá dung lượng tối đa gói của bạn",
+ "uploads_in_progress": "Đang tải lên",
"successful_uploads": "Tải lên thành công",
"upload_to_album": "Tải lên album",
"add_to_album": "Thêm vào album",
"move_to_album": "Di chuyển đến album",
- "unhide_to_album": "Hiện lại vào album",
+ "unhide_to_album": "Hiện lại trong album",
"restore_to_album": "Khôi phục vào album",
"section_all": "Tất cả",
"section_uncategorized": "Chưa phân loại",
"section_archive": "Lưu trữ",
"section_hidden": "Ẩn",
"section_trash": "Thùng rác",
- "favorites": "Yêu thích",
+ "favorites": "Đã thích",
"archive": "Lưu trữ",
"archive_album": "Lưu trữ album",
- "unarchive": "Khôi phục lưu trữ",
- "unarchive_album": "Khôi phục lưu trữ album",
+ "unarchive": "Bỏ lưu trữ",
+ "unarchive_album": "Bỏ lưu trữ album",
"hide_collection": "Ẩn album",
"unhide_collection": "Hiện lại album",
"move": "Di chuyển",
@@ -357,28 +357,28 @@
"remove": "Xóa",
"yes_remove": "Có, xóa",
"remove_from_album": "Xóa khỏi album",
- "move_to_trash": "Di chuyển vào thùng rác",
- "trash_files_message": "Các tệp đã chọn sẽ bị xóa khỏi tất cả các album và di chuyển vào thùng rác.",
- "trash_file_message": "Tệp sẽ bị xóa khỏi tất cả các album và di chuyển vào thùng rác.",
+ "move_to_trash": "Cho vào thùng rác",
+ "trash_files_message": "Các tệp đã chọn sẽ bị xóa khỏi tất cả album và cho vào thùng rác.",
+ "trash_file_message": "Tệp sẽ bị xóa khỏi tất cả album và cho vào thùng rác.",
"delete_permanently": "Xóa vĩnh viễn",
"restore": "Khôi phục",
- "empty_trash": "Làm rỗng thùng rác",
- "empty_trash_title": "Làm rỗng thùng rác?",
+ "empty_trash": "Xóa sạch thùng rác",
+ "empty_trash_title": "Xóa sạch thùng rác?",
"empty_trash_message": "Các tệp này sẽ bị xóa vĩnh viễn khỏi tài khoản Ente của bạn.",
"leave_album": "Rời album",
- "leave_shared_album_title": "Rời album chia sẻ?",
- "leave_shared_album_message": "Bạn sẽ rời album, và nó sẽ không còn hiển thị cho bạn.",
+ "leave_shared_album_title": "Rời album được chia sẻ?",
+ "leave_shared_album_message": "Bạn sẽ rời album, và nó sẽ không còn hiển thị với bạn.",
"leave_shared_album": "Có, rời",
"confirm_remove_message": "Các mục đã chọn sẽ bị xóa khỏi album này. Các mục chỉ có trong album này sẽ được chuyển đến Chưa phân loại.",
- "confirm_remove_incl_others_message": "Một số mục bạn đang xóa đã được thêm bởi người khác, và bạn sẽ mất quyền truy cập vào chúng.",
+ "confirm_remove_incl_others_message": "Vài mục mà bạn đang xóa được thêm bởi người khác, và bạn sẽ mất quyền truy cập vào chúng.",
"oldest": "Cũ nhất",
- "last_updated": "Cập nhật lần cuối",
+ "last_updated": "Mới cập nhật",
"name": "Tên",
"fix_creation_time": "Sửa thời gian",
"fix_creation_time_in_progress": "Đang sửa thời gian",
"fix_creation_time_file_updated": "Thời gian tệp đã được cập nhật",
"fix_creation_time_completed": "Đã cập nhật thành công tất cả các tệp",
- "fix_creation_time_completed_with_errors": "Cập nhật thời gian tệp không thành công cho một số tệp, vui lòng thử lại",
+ "fix_creation_time_completed_with_errors": "Cập nhật thời gian một số tệp không thành công, vui lòng thử lại",
"fix_creation_time_options": "Chọn tùy chọn bạn muốn sử dụng",
"exif_date_time_original": "Exif:DateTimeOriginal",
"exif_date_time_digitized": "Exif:DateTimeDigitized",
@@ -396,7 +396,7 @@
"participants_count_one": "1 người tham gia",
"participants_count": "{{count, number}} người tham gia",
"add_viewers": "Thêm người xem",
- "change_permission_to_viewer": "{{selectedEmail}} sẽ không thể thêm nhiều ảnh hơn vào album
Họ vẫn có thể xóa ảnh đã thêm bởi họ
",
+ "change_permission_to_viewer": "{{selectedEmail}} sẽ không thể thêm ảnh vào album
Họ vẫn có thể xóa ảnh đã thêm bởi họ
",
"change_permission_to_collaborator": "{{selectedEmail}} sẽ có thể thêm ảnh vào album",
"change_permission_title": "Thay đổi quyền?",
"confirm_convert_to_viewer": "Có, chuyển thành người xem",
@@ -417,10 +417,10 @@
"link_expired": "Liên kết đã hết hạn",
"link_expired_message": "Liên kết này đã hết hạn hoặc đã bị vô hiệu hóa",
"manage_link": "Quản lý liên kết",
- "link_request_limit_exceeded": "Album này đã được xem trên quá nhiều thiết bị",
+ "link_request_limit_exceeded": "Album này đang được xem trên quá nhiều thiết bị",
"allow_downloads": "Cho phép tải xuống",
"allow_adding_photos": "Cho phép thêm ảnh",
- "allow_adding_photos_hint": "Cho phép người có liên kết cũng thêm ảnh vào album chia sẻ.",
+ "allow_adding_photos_hint": "Cho phép người có liên kết thêm ảnh vào album chia sẻ.",
"device_limit": "Giới hạn thiết bị",
"none": "Không",
"link_expiry": "Hết hạn liên kết",
@@ -440,30 +440,30 @@
"public_link_created": "Liên kết công khai đã được tạo",
"public_link_enabled": "Liên kết công khai đã được bật",
"collect_photos": "Thu thập ảnh",
- "disable_file_download": "Vô hiệu hóa tải xuống",
- "disable_file_download_message": "Bạn có chắc chắn muốn vô hiệu hóa nút tải xuống cho các tệp không?
Người xem vẫn có thể chụp ảnh màn hình hoặc lưu bản sao của ảnh của bạn bằng các công cụ bên ngoài.
",
+ "disable_file_download": "Tắt tải xuống",
+ "disable_file_download_message": "Bạn có chắc muốn tắt nút tải xuống các tệp không?
Người xem vẫn có thể chụp ảnh màn hình hoặc sao chép ảnh của bạn bằng các công cụ bên ngoài.
",
"shared_using": "Chia sẻ bằng {{url}}",
- "sharing_referral_code": "Sử dụng mã {{referralCode}} để nhận 10 GB miễn phí",
+ "sharing_referral_code": "Dùng mã {{referralCode}} để nhận 10 GB miễn phí",
"disable_password": "Vô hiệu hóa khóa mật khẩu",
- "disable_password_message": "Bạn có chắc chắn muốn vô hiệu hóa khóa mật khẩu không?",
+ "disable_password_message": "Bạn có chắc muốn vô hiệu hóa khóa mật khẩu không?",
"password_lock": "Khóa mật khẩu",
"lock": "Khóa",
"file": "Tệp",
"folder": "Thư mục",
- "google_takeout": "Google takeout",
- "deduplicate_files": "Xóa trùng tệp",
- "remove_duplicates": "",
- "total_size": "",
- "count": "",
- "deselect_all": "",
- "no_duplicates": "",
- "duplicate_group_description": "",
- "remove_duplicates_button_count": "",
+ "google_takeout": "Google Takeout",
+ "deduplicate_files": "Xóa tệp trùng",
+ "remove_duplicates": "Xóa trùng lặp",
+ "total_size": "Tổng dung lượng",
+ "count": "Số lượng",
+ "deselect_all": "Bỏ chọn tất cả",
+ "no_duplicates": "Không có trùng lặp",
+ "duplicate_group_description": "{{count}} mục, {{itemSize}} mỗi mục",
+ "remove_duplicates_button_count": "Xóa {{count, number}} mục",
"stop_uploads_title": "Dừng tải lên?",
- "stop_uploads_message": "Bạn có chắc chắn muốn dừng tất cả các tải lên đang diễn ra không?",
+ "stop_uploads_message": "Bạn có chắc muốn dừng tất cả mục đang tải lên không?",
"yes_stop_uploads": "Có, dừng tải lên",
"stop_downloads_title": "Dừng tải xuống?",
- "stop_downloads_message": "Bạn có chắc chắn muốn dừng tất cả các tải xuống đang diễn ra không?",
+ "stop_downloads_message": "Bạn có chắc muốn dừng tất cả mục đang tải xuống không?",
"yes_stop_downloads": "Có, dừng tải xuống",
"albums": "Album",
"albums_count_one": "1 Album",
@@ -478,14 +478,14 @@
"upgrade_now": "Nâng cấp ngay",
"renew_now": "Gia hạn ngay",
"storage": "Lưu trữ",
- "used": "đã sử dụng",
+ "used": "đã dùng",
"you": "Bạn",
"family": "Gia đình",
"free": "miễn phí",
"of": "của",
"watch_folders": "Theo dõi thư mục",
"watched_folders": "Thư mục đã theo dõi",
- "no_folders_added": "Chưa có thư mục nào được thêm",
+ "no_folders_added": "Chưa thêm thư mục nào",
"watch_folders_hint_1": "Các thư mục bạn thêm ở đây sẽ được theo dõi tự động",
"watch_folders_hint_2": "Tải lên tệp mới vào Ente",
"watch_folders_hint_3": "Xóa tệp đã xóa khỏi Ente",
@@ -495,51 +495,51 @@
"stop_watching_folder_message": "Các tệp hiện có của bạn sẽ không bị xóa, nhưng Ente sẽ ngừng tự động cập nhật album Ente liên kết khi có thay đổi trong thư mục này.",
"yes_stop": "Có, dừng lại",
"change_folder": "Thay đổi Thư mục",
- "view_logs": "",
- "view_logs_message": "",
- "weak_device_hint": "Trình duyệt web bạn đang sử dụng không đủ mạnh để mã hóa ảnh của bạn. Vui lòng thử đăng nhập vào Ente trên máy tính của bạn, hoặc tải xuống ứng dụng di động/desktop của Ente.",
- "drag_and_drop_hint": "Hoặc kéo và thả vào cửa sổ Ente",
+ "view_logs": "Xem log",
+ "view_logs_message": "Tải xuống nhật ký lỗi, để bạn có thể gửi qua email cho chúng tôi.
Lưu ý rằng, trong nhật ký lỗi sẽ bao gồm tên các tệp để giúp theo dõi vấn đề với từng tệp cụ thể.
",
+ "weak_device_hint": "Trình duyệt bạn đang sử dụng không đủ mạnh để mã hóa ảnh. Vui lòng dùng Ente trên máy tính, hoặc tải xuống ứng dụng di động/máy tính của Ente.",
+ "drag_and_drop_hint": "Hoặc kéo thả vào cửa sổ Ente",
"authenticate": "Xác thực",
"uploaded_to_single_collection": "Đã tải lên một bộ sưu tập",
"uploaded_to_separate_collections": "Đã tải lên các bộ sưu tập riêng biệt",
"nevermind": "Không sao",
- "update_available": "Cập nhật có sẵn",
- "update_installable_message": "Một phiên bản mới của Ente đã sẵn sàng để được cài đặt.",
+ "update_available": "Phiên bản mới",
+ "update_installable_message": "Ente có một phiên bản mới, sẵn sàng để cài đặt.",
"install_now": "Cài đặt ngay",
- "install_on_next_launch": "Cài đặt khi khởi động tiếp theo",
- "update_available_message": "Một phiên bản mới của Ente đã được phát hành, nhưng không thể tự động tải xuống và cài đặt.",
+ "install_on_next_launch": "Cài đặt trong lần khởi động sau",
+ "update_available_message": "Ente có một phiên bản mới, nhưng không thể tự động tải xuống và cài đặt.",
"download_and_install": "Tải xuống và cài đặt",
"ignore_this_version": "Bỏ qua phiên bản này",
"today": "Hôm nay",
"yesterday": "Hôm qua",
"enter_name": "Nhập tên",
- "uploader_name_hint": "Thêm một tên để bạn bè biết ai là người đáng cảm ơn cho những bức ảnh tuyệt vời này!",
+ "uploader_name_hint": "Thêm một tên để bạn bè biết ai là người chụp những tấm ảnh tuyệt vời này!",
"name_placeholder": "Tên...",
"more_details": "Thêm chi tiết",
"ml_search": "Học máy",
- "ml_search_description": "Ente hỗ trợ học máy trên thiết bị cho nhận diện khuôn mặt, tìm kiếm kỳ diệu và các tính năng tìm kiếm nâng cao khác",
- "ml_search_footnote": "Tìm kiếm kỳ diệu cho phép tìm kiếm ảnh theo nội dung của chúng, ví dụ: 'xe hơi', 'xe hơi đỏ', 'Ferrari'",
+ "ml_search_description": "Ente hỗ trợ học máy trên-thiết-bị nhằm nhận diện khuôn mặt, tìm kiếm vi diệu và các tính năng tìm kiếm nâng cao khác",
+ "ml_search_footnote": "Tìm kiếm vi diệu cho phép tìm ảnh theo nội dung của chúng, ví dụ: 'xe hơi', 'xe hơi đỏ', 'Ferrari'",
"indexing": "Đang lập chỉ mục",
"processed": "Đã xử lý",
"indexing_status_running": "Đang chạy",
"indexing_status_fetching": "Đang lấy",
"indexing_status_scheduled": "Đã lên lịch",
"indexing_status_done": "Đã hoàn thành",
- "ml_search_disable": "Vô hiệu hóa học máy",
- "ml_search_disable_confirm": "Bạn có muốn vô hiệu hóa học máy trên tất cả các thiết bị của bạn không?",
+ "ml_search_disable": "Tắt học máy",
+ "ml_search_disable_confirm": "Bạn có muốn tắt học máy trên tất cả các thiết bị của bạn không?",
"ml_consent": "Bật học máy",
"ml_consent_title": "Bật học máy?",
- "ml_consent_description": "Nếu bạn bật học máy, Ente sẽ trích xuất thông tin như hình dạng khuôn mặt từ các tệp, bao gồm cả những tệp được chia sẻ với bạn.
Điều này sẽ xảy ra trên thiết bị của bạn, và bất kỳ thông tin sinh trắc học nào được tạo ra sẽ được mã hóa đầu cuối.
Vui lòng nhấp vào đây để biết thêm chi tiết về tính năng này trong chính sách quyền riêng tư của chúng tôi
",
+ "ml_consent_description": "Nếu bạn bật học máy, Ente sẽ trích xuất thông tin như hình dạng khuôn mặt từ các tệp, gồm cả những tệp mà bạn được chia sẻ.
Việc này sẽ diễn ra trên thiết bị của bạn, với mọi thông tin sinh trắc học tạo ra đều được mã hóa đầu cuối.
Vui lòng nhấn vào đây để biết thêm chi tiết về tính năng này trong chính sách quyền riêng tư của chúng tôi
",
"ml_consent_confirmation": "Tôi hiểu và muốn bật học máy",
- "labs": "Phòng thí nghiệm",
+ "labs": "Thử nghiệm",
"password_strength_weak": "Độ mạnh mật khẩu: Yếu",
"password_strength_moderate": "Độ mạnh mật khẩu: Trung bình",
"password_strength_strong": "Độ mạnh mật khẩu: Mạnh",
- "preferences": "Tùy chọn",
+ "preferences": "Thiết lập",
"language": "Ngôn ngữ",
"advanced": "Nâng cao",
"export_directory_does_not_exist": "Thư mục xuất không hợp lệ",
- "export_directory_does_not_exist_message": "Thư mục xuất mà bạn đã chọn không tồn tại.
Vui lòng chọn một thư mục hợp lệ.
",
+ "export_directory_does_not_exist_message": "Thư mục xuất mà bạn đã chọn không tồn tại.
Vui lòng chọn một thư mục khác.
",
"storage_unit": {
"b": "B",
"kb": "KB",
@@ -549,33 +549,33 @@
},
"stop": "Dừng",
"sync_continuously": "Đồng bộ liên tục",
- "export_starting": "Xuất bắt đầu...",
+ "export_starting": "Bắt đầu xuất...",
"export_preparing": "Đang chuẩn bị...",
"export_renaming_album_folders": "Đang đổi tên thư mục album...",
- "export_trashing_deleted_files": "Đang xóa tệp đã xóa...",
- "export_trashing_deleted_albums": "Đang xóa album đã xóa...",
+ "export_trashing_deleted_files": "Đang xóa vĩnh viễn các tệp...",
+ "export_trashing_deleted_albums": "Đang xóa vĩnh viễn các album...",
"export_progress": "{{progress.success, number}} / {{progress.total, number}} mục đã đồng bộ",
"pending_items": "Mục đang chờ",
"delete_account_reason_label": "Lý do chính bạn xóa tài khoản là gì?",
"delete_account_reason_placeholder": "Chọn một lý do",
"delete_reason": {
"missing_feature": "Thiếu một tính năng quan trọng mà tôi cần",
- "behaviour": "Ứng dụng hoặc một tính năng nhất định không hoạt động như tôi nghĩ nó nên",
- "found_another_service": "Tôi đã tìm thấy một dịch vụ khác mà tôi thích hơn",
- "not_listed": "Lý do của tôi không có trong danh sách"
+ "behaviour": "Ứng dụng hoặc một tính năng nhất định không hoạt động như tôi muốn",
+ "found_another_service": "Tôi tìm thấy một dịch vụ khác mà tôi thích hơn",
+ "not_listed": "Lý do không có trong danh sách"
},
"delete_account_feedback_label": "Chúng tôi rất tiếc khi thấy bạn ra đi. Vui lòng giải thích lý do bạn rời đi để giúp chúng tôi cải thiện.",
"delete_account_feedback_placeholder": "Phản hồi",
- "delete_account_confirm_checkbox_label": "Có, tôi muốn xóa tài khoản này và tất cả dữ liệu của nó vĩnh viễn",
+ "delete_account_confirm_checkbox_label": "Có, tôi muốn xóa vĩnh viễn tài khoản này và tất cả dữ liệu của nó",
"delete_account_confirm": "Xác nhận xóa tài khoản",
- "delete_account_confirm_message": "Tài khoản này được liên kết với các ứng dụng Ente khác, nếu bạn sử dụng bất kỳ.
Dữ liệu bạn đã tải lên, trên tất cả các ứng dụng Ente, sẽ được lên lịch để xóa, và tài khoản của bạn sẽ bị xóa vĩnh viễn.
",
- "feedback_required": "Xin vui lòng giúp chúng tôi với thông tin này",
+ "delete_account_confirm_message": "Tài khoản này được liên kết với các ứng dụng Ente khác, nếu bạn có dùng.
Dữ liệu bạn đã tải lên, trên tất cả ứng dụng Ente, sẽ được lên lịch để xóa, và tài khoản của bạn sẽ bị xóa vĩnh viễn.
",
+ "feedback_required": "Mong bạn giúp chúng tôi thông tin này",
"feedback_required_found_another_service": "Dịch vụ khác làm tốt hơn điều gì?",
- "recover_two_factor": "Khôi phục xác thực hai yếu tố",
+ "recover_two_factor": "Khôi phục xác thực 2 bước",
"at": "tại",
"auth_next": "tiếp theo",
"auth_download_mobile_app": "Tải xuống ứng dụng di động của chúng tôi để quản lý bí mật của bạn",
- "no_codes_added_yet": "Chưa có mã nào được thêm",
+ "no_codes_added_yet": "Chưa thêm mã nào",
"hide": "Ẩn",
"unhide": "Hiện",
"sort_by": "Sắp xếp theo",
@@ -583,30 +583,30 @@
"oldest_first": "Cũ nhất trước",
"pin_album": "Ghim album",
"unpin_album": "Bỏ ghim album",
- "unpreviewable_file_message": "Tệp này không thể được xem trước",
- "download_complete": "Tải xuống hoàn tất",
+ "unpreviewable_file_message": "Không thể xem trước tệp này",
+ "download_complete": "Tải xuống xong",
"downloading_album": "Đang tải xuống {{name}}",
"download_failed": "Tải xuống thất bại",
"download_progress": "{{count, number}} / {{total, number}} tệp",
- "christmas": "Giáng sinh",
- "christmas_eve": "Đêm Giáng sinh",
- "new_year": "Năm mới",
- "new_year_eve": "Đêm giao thừa",
+ "christmas": "Giáng Sinh",
+ "christmas_eve": "Đêm Thánh",
+ "new_year": "Năm Mới",
+ "new_year_eve": "Đêm Giao Thừa",
"image": "Hình ảnh",
"video": "Video",
- "live_photo": "Ảnh trực tiếp",
- "live": "",
- "edit_image": "",
+ "live_photo": "Ảnh Live",
+ "live": "Live",
+ "edit_image": "Chỉnh sửa ảnh",
"photo_editor": "Trình chỉnh sửa ảnh",
- "confirm_editor_close": "Bạn có chắc chắn muốn đóng trình chỉnh sửa không?",
- "confirm_editor_close_message": "Tải xuống hình ảnh đã chỉnh sửa của bạn hoặc lưu bản sao vào Ente để giữ lại các thay đổi của bạn.",
+ "confirm_editor_close": "Bạn có chắc muốn đóng trình chỉnh sửa không?",
+ "confirm_editor_close_message": "Tải xuống hình ảnh đã chỉnh sửa hoặc lưu bản sao vào Ente để giữ các thay đổi của bạn.",
"brightness": "Độ sáng",
"contrast": "Độ tương phản",
"saturation": "Độ bão hòa",
- "blur": "Mờ",
+ "blur": "Độ mờ",
"transform": "Biến đổi",
"crop": "Cắt",
- "aspect_ratio": "Tỷ lệ khung hình",
+ "aspect_ratio": "Tỉ lệ khung hình",
"square": "Hình vuông",
"freehand": "Vẽ tự do",
"apply_crop": "Áp dụng cắt",
@@ -614,27 +614,27 @@
"rotate_left": "Xoay trái",
"rotate_right": "Xoay phải",
"flip": "Lật",
- "flip_vertically": "Lật theo chiều dọc",
- "flip_horizontally": "Lật theo chiều ngang",
+ "flip_vertically": "Lật dọc",
+ "flip_horizontally": "Lật ngang",
"download_edited": "Tải xuống đã chỉnh sửa",
"save_a_copy_to_ente": "Lưu một bản sao vào Ente",
"restore_original": "Khôi phục gốc",
- "photo_edit_required_to_save": "Ít nhất một biến đổi hoặc điều chỉnh màu sắc phải được thực hiện trước khi lưu.",
+ "photo_edit_required_to_save": "Phải thực hiện ít nhất một biến đổi hoặc điều chỉnh màu sắc trước khi lưu.",
"colors": "Màu sắc",
"invert_colors": "Đảo ngược màu",
"reset": "Đặt lại",
"faster_upload": "Tải lên nhanh hơn",
- "faster_upload_description": "Định tuyến tải lên qua các máy chủ gần đó",
- "open_ente_on_startup": "",
+ "faster_upload_description": "Tải lên các máy chủ gần bạn",
+ "open_ente_on_startup": "Mở Ente khi khởi động",
"cast_album_to_tv": "Phát album trên TV",
- "cast_to_tv": "",
+ "cast_to_tv": "Phát trên TV",
"enter_cast_pin_code": "Nhập mã bạn thấy trên TV bên dưới để ghép nối thiết bị này.",
"code": "Mã",
"pair_device_to_tv": "Ghép nối thiết bị",
"tv_not_found": "Không tìm thấy TV. Bạn đã nhập mã PIN đúng chưa?",
"cast_auto_pair": "Ghép nối tự động",
"cast_auto_pair_description": "Ghép nối tự động chỉ hoạt động với các thiết bị hỗ trợ Chromecast.",
- "choose_device_from_browser": "Chọn một thiết bị tương thích với phát từ cửa sổ trình duyệt.",
+ "choose_device_from_browser": "Chọn một thiết bị phát tương thích từ cửa sổ trình duyệt.",
"cast_auto_pair_failed": "Ghép nối tự động Chromecast thất bại. Vui lòng thử lại.",
"pair_with_pin": "Ghép nối bằng PIN",
"pair_with_pin_description": "Ghép nối bằng PIN hoạt động với bất kỳ màn hình nào bạn muốn xem album của mình.",
@@ -643,29 +643,29 @@
"passkey_fetch_failed": "Không thể lấy khóa truy cập của bạn.",
"manage_passkey": "Quản lý khóa truy cập",
"delete_passkey": "Xóa khóa truy cập",
- "delete_passkey_confirmation": "Bạn có chắc chắn muốn xóa khóa truy cập này không? Hành động này không thể hoàn tác.",
+ "delete_passkey_confirmation": "Bạn có chắc muốn xóa khóa truy cập này không? Hành động này không thể hoàn tác.",
"rename_passkey": "Đổi tên khóa truy cập",
"add_passkey": "Thêm khóa truy cập",
"enter_passkey_name": "Nhập tên khóa truy cập",
- "passkeys_description": "Khóa truy cập là một yếu tố thứ hai hiện đại và an toàn cho tài khoản Ente của bạn. Chúng sử dụng xác thực sinh trắc học trên thiết bị để tiện lợi và an toàn.",
- "created_at": "Được tạo vào",
+ "passkeys_description": "Khóa truy cập là một yếu tố bảo mật hiện đại cho tài khoản Ente của bạn. Chúng sử dụng xác thực sinh trắc học trên thiết bị để tiện lợi và an toàn.",
+ "created_at": "Đã tạo vào",
"passkey_add_failed": "Không thể thêm khóa truy cập",
"passkey_login_failed": "Đăng nhập bằng khóa truy cập thất bại",
"passkey_login_invalid_url": "URL đăng nhập không hợp lệ.",
"passkey_login_already_claimed_session": "Phiên này đã được xác minh.",
"passkey_login_generic_error": "Đã xảy ra lỗi khi đăng nhập bằng khóa truy cập.",
"passkey_login_credential_hint": "Nếu khóa truy cập của bạn ở trên thiết bị khác, bạn có thể mở trang này trên thiết bị đó để xác minh.",
- "passkeys_not_supported": "Khóa truy cập không được hỗ trợ trong trình duyệt này",
+ "passkeys_not_supported": "Khóa truy cập không được hỗ trợ trên trình duyệt này",
"try_again": "Thử lại",
"check_status": "Kiểm tra trạng thái",
"passkey_login_instructions": "Thực hiện các bước từ trình duyệt của bạn để tiếp tục đăng nhập.",
"passkey_login": "Đăng nhập bằng khóa truy cập",
"totp_login": "Đăng nhập bằng TOTP",
- "passkey": "Mã khóa",
- "passkey_verify_description": "Xác minh mã khóa của bạn để đăng nhập vào tài khoản.",
+ "passkey": "Khóa truy cập",
+ "passkey_verify_description": "Xác minh khóa truy cập của bạn để đăng nhập vào tài khoản.",
"waiting_for_verification": "Đang chờ xác minh...",
"verification_still_pending": "Xác minh vẫn đang chờ",
- "passkey_verified": "Mã khóa đã được xác minh",
+ "passkey_verified": "Khóa truy cập đã được xác minh",
"redirecting_back_to_app": "Đang chuyển hướng bạn trở lại ứng dụng...",
"redirect_close_instructions": "Bạn có thể đóng cửa sổ này sau khi ứng dụng mở.",
"redirect_again": "Chuyển hướng lại",
@@ -675,15 +675,15 @@
"server_endpoint": "Điểm cuối máy chủ",
"more_information": "Thêm thông tin",
"save": "Lưu",
- "theme": "",
- "system": "",
- "light": "",
- "dark": "",
- "streamable_videos": "",
- "processing_videos_status": "",
- "share_favorites": "",
- "person_favorites": "",
- "shared_favorites": "",
- "added_by_name": "",
- "unowned_files_not_processed": ""
+ "theme": "Chủ đề",
+ "system": "Giống hệ thống",
+ "light": "Sáng",
+ "dark": "Tối",
+ "streamable_videos": "Video có thể phát",
+ "processing_videos_status": "Đang xử lý video...",
+ "share_favorites": "Chia sẻ những mục thích",
+ "person_favorites": "{{name}} đã thích",
+ "shared_favorites": "Những mục thích đã chia sẻ",
+ "added_by_name": "Được thêm bởi {{name}}",
+ "unowned_files_not_processed": "Các tệp được thêm bởi người dùng khác không được xử lý"
}
diff --git a/web/packages/base/locales/zh-CN/translation.json b/web/packages/base/locales/zh-CN/translation.json
index 95b6ff8d84..0bfb3cce8e 100644
--- a/web/packages/base/locales/zh-CN/translation.json
+++ b/web/packages/base/locales/zh-CN/translation.json
@@ -32,7 +32,7 @@
"set_password": "设置密码",
"sign_in": "登录",
"incorrect_password": "密码错误",
- "incorrect_password_or_no_account": "",
+ "incorrect_password_or_no_account": "密码错误或邮箱未注册",
"pick_password_hint": "请输入我们可以用来加密您数据的密码",
"pick_password_caution": "我们不会存储您的密码,因此如果您忘记密码, 我们将无法帮助您在没有恢复密钥的情况下恢复您的数据。",
"key_generation_in_progress": "正在生成加密密钥...",
@@ -40,7 +40,7 @@
"referral_source_hint": "您是如何知道Ente的? (可选的)",
"referral_source_info": "我们不跟踪应用程序安装情况,如果您告诉我们您是在哪里找到我们的,将会有所帮助!",
"password_mismatch_error": "两次输入的密码不一致",
- "show_or_hide_password": "",
+ "show_or_hide_password": "显示或隐藏密码",
"welcome_to_ente_title": "欢迎来到 ",
"welcome_to_ente_subtitle": "端到端加密的照片存储和共享",
"new_album": "新建相册",
@@ -58,12 +58,12 @@
"add_photos_count": "添加 {{count, number}} 个项目",
"select_photos": "选择照片",
"file_upload": "上传文件",
- "preparing": "",
- "processed_counts": "",
- "upload_reading_metadata_files": "",
+ "preparing": "准备中",
+ "processed_counts": "{{count, number}} / {{total, number}}",
+ "upload_reading_metadata_files": "正在读取元数据文件",
"upload_cancelling": "正在取消剩余的上传内容",
- "upload_done": "",
- "upload_skipped": "",
+ "upload_done": "{{count, number}} 个已上传",
+ "upload_skipped": "{{count, number}} 个已跳过",
"initial_load_delay_warning": "第一次加载可能需要一些时间",
"no_account": "没有账号",
"existing_account": "已有账号",
@@ -96,15 +96,15 @@
"exit_fullscreen": "退出全屏",
"go_fullscreen": "全屏显示",
"zoom": "缩放",
- "play": "",
- "pause": "",
+ "play": "播放",
+ "pause": "暂停",
"previous": "上一个",
"next": "下一个",
- "video_seek": "",
- "quality": "",
- "auto": "",
- "original": "",
- "speed": "",
+ "video_seek": "视频跳转",
+ "quality": "质量",
+ "auto": "自动",
+ "original": "原始",
+ "speed": "速度",
"title_photos": "Ente 照片",
"title_auth": "Ente 验证器",
"title_accounts": "Ente 账户",
@@ -162,7 +162,7 @@
"ok": "确定",
"success": "成功",
"error": "错误",
- "note": "",
+ "note": "提示",
"offline_message": "您处于离线状态,正在显示已缓存的回忆",
"install": "安装",
"install_mobile_app": "安装我们的 Android 或 iOS 应用程序来自动备份您的所有照片",
@@ -225,7 +225,7 @@
"delete_album_message": "也删除此相册中存在的照片(和视频),从 他们所加入的所有 个其他相册?",
"delete_photos": "删除照片",
"keep_photos": "保留照片",
- "share_album": "分享相册",
+ "share_album": "共享相册",
"sharing_with_self": "您不能与自己共享",
"sharing_already_shared": "您已经与 {{email}} 共享了",
"sharing_album_not_allowed": "不允许分享相册",
@@ -389,7 +389,7 @@
"modify_sharing": "更改共享",
"add_collaborators": "添加协作者",
"add_new_email": "添加新的电子邮件",
- "shared_with_people_count_zero": "与特定人员分享",
+ "shared_with_people_count_zero": "与特定人员共享",
"shared_with_people_count_one": "已与1个人共享",
"shared_with_people_count": "已与 {count, number} 个人共享",
"participants_count_zero": "暂无参与者",
@@ -442,7 +442,7 @@
"collect_photos": "收集照片",
"disable_file_download": "禁止下载",
"disable_file_download_message": "您确定要禁用文件下载按钮吗?
观看者仍然可以使用外部工具进行屏幕截图或保存您的照片副本。
",
- "shared_using": "分享方式 {{url}}",
+ "shared_using": "共享方式 {{url}}",
"sharing_referral_code": "使用代码 {{referralCode}} 获得 10 GB 免费空间",
"disable_password": "禁用密码锁",
"disable_password_message": "您确定要禁用密码锁吗?",
@@ -627,7 +627,7 @@
"faster_upload_description": "通过附近的服务器路由上传",
"open_ente_on_startup": "启动时打开 Ente",
"cast_album_to_tv": "在电视上播放相册",
- "cast_to_tv": "",
+ "cast_to_tv": "在电视上播放",
"enter_cast_pin_code": "输入您在下面的电视上看到的代码来配对此设备。",
"code": "代码",
"pair_device_to_tv": "配对设备",
@@ -679,11 +679,11 @@
"system": "系统",
"light": "浅色",
"dark": "深色",
- "streamable_videos": "",
- "processing_videos_status": "",
- "share_favorites": "",
- "person_favorites": "",
- "shared_favorites": "",
- "added_by_name": "",
- "unowned_files_not_processed": ""
+ "streamable_videos": "可流媒体播放的视频",
+ "processing_videos_status": "正在处理视频...",
+ "share_favorites": "共享收藏",
+ "person_favorites": "{{name}}的收藏",
+ "shared_favorites": "已共享的收藏",
+ "added_by_name": "由{{name}}添加",
+ "unowned_files_not_processed": "由其他用户添加的文件未被处理"
}
diff --git a/web/packages/base/origins.ts b/web/packages/base/origins.ts
index 597eb5b908..8e1ef1ddac 100644
--- a/web/packages/base/origins.ts
+++ b/web/packages/base/origins.ts
@@ -81,6 +81,13 @@ export const customAPIHost = async () => {
export const uploaderOrigin = async () =>
(await customAPIOrigin()) ?? "https://uploader.ente.io";
+/**
+ * A static build time constant that is `true` if {@link albumsAppOrigin} has
+ * been customized.
+ */
+export const isCustomAlbumsAppOrigin =
+ !!process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT;
+
/**
* Return the origin that serves public albums.
*
diff --git a/web/packages/base/session.ts b/web/packages/base/session.ts
index 0adc3003ed..077e6d3271 100644
--- a/web/packages/base/session.ts
+++ b/web/packages/base/session.ts
@@ -1,7 +1,6 @@
import { z } from "zod/v4";
import { decryptBox, encryptBox, generateKey } from "./crypto";
import log from "./log";
-import { getAuthToken } from "./token";
/**
* Remove all data stored in session storage (data tied to the browser tab).
@@ -51,7 +50,7 @@ export const ensureMasterKeyFromSession = async () => {
* have credentials at hand or not, however it doesn't attempt to verify that
* the key present in the session can actually be decrypted.
*/
-export const haveCredentialsInSession = () =>
+export const haveMasterKeyInSession = () =>
!!sessionStorage.getItem("encryptionKey");
/**
@@ -140,7 +139,7 @@ export const updateSessionFromElectronSafeStorageIfNeeded = async () => {
const electron = globalThis.electron;
if (!electron) return;
- if (haveCredentialsInSession()) return;
+ if (haveMasterKeyInSession()) return;
let masterKey: string | undefined;
try {
@@ -154,13 +153,6 @@ export const updateSessionFromElectronSafeStorageIfNeeded = async () => {
}
};
-/**
- * Return true if we both have a usable user's master key in session storage,
- * and their auth token in KV DB.
- */
-export const haveAuthenticatedSession = async () =>
- (await masterKeyFromSession()) && !!(await getAuthToken());
-
/**
* Save the user's encypted key encryption key ("key") in session store
* temporarily, until we get back here after completing the second factor.
diff --git a/web/packages/base/token.ts b/web/packages/base/token.ts
index f23d7866c7..109322b339 100644
--- a/web/packages/base/token.ts
+++ b/web/packages/base/token.ts
@@ -1,25 +1,42 @@
-import { getKVS } from "./kv";
-
-/**
- * Return the user's auth token, if present.
- *
- * The user's auth token is stored in KV DB after they have successfully logged
- * in. This function returns that saved auth token.
- *
- * The underlying data is stored in IndexedDB, and can be accessed from web
- * workers.
- */
-export const getAuthToken = () => getKVS("token");
+import { getKVS, removeKV, setKV } from "./kv";
/**
* Return the user's auth token, or throw an error.
*
- * The user's auth token can be retrieved using {@link getAuthToken}. This
+ * The user's auth token can be retrieved using {@link savedAuthToken}. This
* function is a wrapper which throws an error if the token is not found (which
* should only happen if the user is not logged in).
*/
export const ensureAuthToken = async () => {
- const token = await getAuthToken();
+ const token = await savedAuthToken();
if (!token) throw new Error("Not logged in");
return token;
};
+
+/**
+ * Return the user's auth token, if available.
+ *
+ * The user's auth token is stored in KV DB using {@link saveAuthToken} during
+ * the login / signup flow. This function returns that saved auth token.
+ *
+ * The underlying data is stored in IndexedDB, and can be accessed from web
+ * workers.
+ *
+ * If your code is running in a context where the user is already expected to be
+ * logged in, use {@link ensureAuthToken} instead.
+ */
+export const savedAuthToken = () => getKVS("token");
+
+/**
+ * Save the user's auth token in KV DB.
+ *
+ * This is the setter corresponding to {@link savedAuthToken}.
+ */
+export const saveAuthToken = (token: string) => setKV("token", token);
+
+/**
+ * Remove the user's auth token from KV DB.
+ *
+ * See {@link saveAuthToken}.
+ */
+export const removeAuthToken = () => removeKV("token");
diff --git a/web/packages/gallery/components/FileInfo.tsx b/web/packages/gallery/components/FileInfo.tsx
index 80a9014e01..177c2876e6 100644
--- a/web/packages/gallery/components/FileInfo.tsx
+++ b/web/packages/gallery/components/FileInfo.tsx
@@ -215,7 +215,7 @@ export const FileInfo: React.FC = ({
const annotatedExif = useMemo(() => annotateExif(exif), [exif]);
useEffect(() => {
- if (!isMLEnabled()) return;
+ if (!isMLEnabled()) return undefined;
// Take a dependency on open so that we refresh the list of people by
// calling `getAnnotatedFacesForFile` again when the file info dialog is
@@ -230,7 +230,7 @@ export const FileInfo: React.FC = ({
// Since the `file` hasn't changed, this hook wouldn't rerun. So we also
// take a dependency on the open state of the dialog, causing us to
// rerun whenever reopened (even if for the same file).
- if (!open) return;
+ if (!open) return undefined;
let didCancel = false;
@@ -451,8 +451,8 @@ const FileInfoSidebar = styled(
+ total == success + failed;
+
+/**
+ * Return `true` if there are no files in this save group that are pending, but
+ * one or more files had failed to download.
+ */
+export const isSaveCompleteWithErrors = (group: SaveGroup) =>
+ group.failed > 0 && isSaveComplete(group);
+
+/**
+ * Return `true` if this save was cancelled on a user request.
+ */
+export const isSaveCancelled = (group: SaveGroup) =>
+ group.canceller.signal.aborted;
+
+/**
+ * A function that can be used to add a save group.
+ *
+ * It returns a function that can subsequently be used to update the save group
+ * by applying a transform to it (see {@link UpdateSaveGroup}). The UI will
+ * react and update itself on updates done this way.
+ */
+export type AddSaveGroup = (
+ group: Pick<
+ SaveGroup,
+ | "title"
+ | "collectionSummaryID"
+ | "isHiddenCollectionSummary"
+ | "downloadDirPath"
+ | "total"
+ | "canceller"
+ >,
+) => UpdateSaveGroup;
+
+/**
+ * A function that can be used to update a instance of a save group by applying
+ * the provided transform.
+ *
+ * This is obtained by a call to an instance of {@link AddSaveGroup}. The UI
+ * will update itself to reflect the changes made by the transform.
+ */
+export type UpdateSaveGroup = (
+ tranform: (prev: SaveGroup) => SaveGroup,
+) => void;
+
+/**
+ * A function that can be used to remove a save group.
+ *
+ * Save groups can be removed both on user actions - if the user presses the
+ * close button to discard the notification showing the status of the save group
+ * (cancelling it if needed) - or programmatically, if it is found that there
+ * are no files that need saving for a particular request.
+ */
+export type RemoveSaveGroup = (saveGroup: SaveGroup) => void;
+
+/**
+ * A custom React hook that manages a list of active {@link SaveGroup}s, and
+ * provides functions to add and remove entries to the list.
+ */
+export const useSaveGroups = () => {
+ const [saveGroups, setSaveGroups] = useState([]);
+
+ const handleAddSaveGroup: AddSaveGroup = useCallback((saveGroup) => {
+ const id = Math.random();
+ setSaveGroups((groups) => [
+ ...groups,
+ { ...saveGroup, id, success: 0, failed: 0 },
+ ]);
+ return (tx: (group: SaveGroup) => SaveGroup) => {
+ setSaveGroups((groups) =>
+ groups.map((g) => (g.id == id ? tx(g) : g)),
+ );
+ };
+ }, []);
+
+ const handleRemoveSaveGroup: RemoveSaveGroup = useCallback(
+ ({ id }) => setSaveGroups((groups) => groups.filter((g) => g.id != id)),
+ [],
+ );
+
+ return {
+ saveGroups,
+ onAddSaveGroup: handleAddSaveGroup,
+ onRemoveSaveGroup: handleRemoveSaveGroup,
+ };
+};
diff --git a/web/packages/gallery/components/utils/use-file-input.ts b/web/packages/gallery/components/utils/use-file-input.ts
index 7aec8d3d6e..a137b34ad3 100644
--- a/web/packages/gallery/components/utils/use-file-input.ts
+++ b/web/packages/gallery/components/utils/use-file-input.ts
@@ -62,7 +62,7 @@ export const useFileInput = ({
onSelect,
onCancel,
}: UseFileInputParams): UseFileInputResult => {
- const inputRef = useRef(undefined);
+ const inputRef = useRef(null);
useEffect(() => {
// React (as of 19) doesn't support attaching the onCancel event handler
diff --git a/web/packages/gallery/components/viewer/data-source.ts b/web/packages/gallery/components/viewer/data-source.ts
index f13df294b4..2325584b27 100644
--- a/web/packages/gallery/components/viewer/data-source.ts
+++ b/web/packages/gallery/components/viewer/data-source.ts
@@ -723,15 +723,15 @@ export const updateFileInfoExifIfNeeded = async (itemData: ItemData) => {
// We already have it available.
if (_state.fileInfoExifByFileID.has(fileID)) return;
- const updateNotifyAndReturn = (exifData: FileInfoExif) => {
+ const update = (exifData: FileInfoExif) => {
_state.fileInfoExifByFileID.set(fileID, exifData);
_state.exifObserverByFileID.get(fileID)?.(exifData);
- return exifData;
};
// For videos, insert a placeholder.
if (fileType == FileType.video) {
- return updateNotifyAndReturn(createPlaceholderFileInfoExif());
+ update(createPlaceholderFileInfoExif());
+ return;
}
// This is not a video, but the original image is not available yet.
@@ -741,12 +741,12 @@ export const updateFileInfoExifIfNeeded = async (itemData: ItemData) => {
const file = new File([originalImageBlob], "");
const tags = await extractRawExif(file);
const parsed = parseExif(tags);
- return updateNotifyAndReturn({ tags, parsed });
+ update({ tags, parsed });
} catch (e) {
log.error("Failed to extract exif", e);
// Save the empty placeholder exif corresponding to the file, no point
// in unnecessarily retrying this, it will deterministically fail again.
- return updateNotifyAndReturn(createPlaceholderFileInfoExif());
+ update(createPlaceholderFileInfoExif());
}
};
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index 0dbc902122..bd4151d68a 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -233,8 +233,8 @@ export class FileViewerPhotoSwipe {
// leave this at the default (true) and then swipe between slides
// fast, or show MUI drawers etc.
//
- // See: [Note: Overzealous Chrome? Complicated ARIA?], but time with
- // a different library.
+ // See: [Note: Workarounds for unactionable ARIA warnings], but time
+ // with a different library.
trapFocus: false,
// Set the index within files that we should open to. Subsequent
// updates to the index will be tracked by PhotoSwipe internally.
diff --git a/web/packages/gallery/services/download.ts b/web/packages/gallery/services/download.ts
index fc90ed99fb..a4fb2e1b02 100644
--- a/web/packages/gallery/services/download.ts
+++ b/web/packages/gallery/services/download.ts
@@ -198,7 +198,9 @@ class DownloadManager {
* Set the credentials that should be used for download files when we're
* running in the context of the public albums app.
*/
- setPublicAlbumsCredentials(credentials: PublicAlbumsCredentials) {
+ setPublicAlbumsCredentials(
+ credentials: PublicAlbumsCredentials | undefined,
+ ) {
this.publicAlbumsCredentials = credentials;
}
diff --git a/web/packages/gallery/services/save.ts b/web/packages/gallery/services/save.ts
new file mode 100644
index 0000000000..72cf8cd021
--- /dev/null
+++ b/web/packages/gallery/services/save.ts
@@ -0,0 +1,252 @@
+import { assertionFailed } from "ente-base/assert";
+import { joinPath } from "ente-base/file-name";
+import log from "ente-base/log";
+import { type Electron } from "ente-base/types/ipc";
+import { saveAsFileAndRevokeObjectURL } from "ente-base/utils/web";
+import { downloadManager } from "ente-gallery/services/download";
+import { detectFileTypeInfo } from "ente-gallery/utils/detect-type";
+import { writeStream } from "ente-gallery/utils/native-stream";
+import type { EnteFile } from "ente-media/file";
+import { fileFileName } from "ente-media/file-metadata";
+import { FileType } from "ente-media/file-type";
+import { decodeLivePhoto } from "ente-media/live-photo";
+import {
+ safeDirectoryName,
+ safeFileName,
+} from "ente-new/photos/utils/native-fs";
+import { wait } from "ente-utils/promise";
+import type { AddSaveGroup } from "../components/utils/save-groups";
+
+/**
+ * Save the given {@link files} to the user's device.
+ *
+ * If we're running in the context of the web app, the files will be saved to
+ * the user's download folder. If we're running in the context of our desktop
+ * app, the user will be prompted to select a directory on their file system and
+ * the files will be saved therein.
+ *
+ * @param files The files to save.
+ *
+ * @param title A title to show in the UI notification that indicates the
+ * progress of the save.
+ *
+ * @param onAddSaveGroup A function that can be used to create a save group
+ * associated with the save. The newly added save group will correspond to a
+ * notification shown in the UI, and the progress and status of the save can be
+ * communicated by updating the save group's state using the updater function
+ * obtained when adding the save group.
+ */
+export const downloadAndSaveFiles = (
+ files: EnteFile[],
+ title: string,
+ onAddSaveGroup: AddSaveGroup,
+) => downloadAndSave(files, title, onAddSaveGroup);
+
+/**
+ * Save all the files of a collection to the user's device.
+ *
+ * This is a variant of {@link downloadAndSaveFiles}, except instead of taking a
+ * list of files to save, this variant is tailored for saving saves all the
+ * files that belong to a collection. Otherwise, it broadly behaves similarly;
+ * see that method's documentation for more details.
+ *
+ * When running in the context of the desktop app, instead of saving the files
+ * in the directory selected by the user, files are saved in a directory with
+ * the same name as the collection.
+ *
+ * @param isHiddenCollectionSummary `true` if the collection is associated with
+ * a "hidden" collection or pseudo-collection in the app. Only relevant when
+ * running in the context of the photos app, can be `undefined` otherwise.
+ */
+export const downloadAndSaveCollectionFiles = async (
+ collectionSummaryName: string,
+ collectionSummaryID: number,
+ files: EnteFile[],
+ isHiddenCollectionSummary: boolean | undefined,
+ onAddSaveGroup: AddSaveGroup,
+) =>
+ downloadAndSave(
+ files,
+ collectionSummaryName,
+ onAddSaveGroup,
+ collectionSummaryName,
+ collectionSummaryID,
+ isHiddenCollectionSummary,
+ );
+
+/**
+ * The lower level primitive that the public API of this module delegates to.
+ */
+const downloadAndSave = async (
+ files: EnteFile[],
+ title: string,
+ onAddSaveGroup: AddSaveGroup,
+ collectionSummaryName?: string,
+ collectionSummaryID?: number,
+ isHiddenCollectionSummary?: boolean,
+) => {
+ const electron = globalThis.electron;
+
+ const total = files.length;
+ if (!files.length) {
+ // Nothing to download.
+ assertionFailed();
+ return;
+ }
+
+ let downloadDirPath: string | undefined;
+ if (electron) {
+ downloadDirPath = await electron.selectDirectory();
+ if (!downloadDirPath) {
+ // The user cancelled on the directory selection dialog.
+ return;
+ }
+ if (collectionSummaryName) {
+ downloadDirPath = await mkdirCollectionDownloadFolder(
+ electron,
+ downloadDirPath,
+ collectionSummaryName,
+ );
+ }
+ }
+
+ const canceller = new AbortController();
+
+ const updateSaveGroup = onAddSaveGroup({
+ title,
+ collectionSummaryID,
+ isHiddenCollectionSummary,
+ downloadDirPath,
+ total,
+ canceller,
+ });
+
+ for (const file of files) {
+ if (canceller.signal.aborted) break;
+ try {
+ if (electron && downloadDirPath) {
+ await saveFileDesktop(electron, file, downloadDirPath);
+ } else {
+ await saveAsFile(file);
+ }
+ updateSaveGroup((g) => ({ ...g, success: g.success + 1 }));
+ } catch (e) {
+ log.error("File download failed", e);
+ updateSaveGroup((g) => ({ ...g, failed: g.failed + 1 }));
+ }
+ }
+};
+
+/**
+ * Save the given {@link EnteFile} as a file in the user's download folder.
+ */
+const saveAsFile = async (file: EnteFile) => {
+ const fileBlob = await downloadManager.fileBlob(file);
+ const fileName = fileFileName(file);
+ if (file.metadata.fileType == FileType.livePhoto) {
+ const { imageFileName, imageData, videoFileName, videoData } =
+ await decodeLivePhoto(fileName, fileBlob);
+
+ await saveBlobPartAsFile(imageData, imageFileName);
+
+ // Downloading multiple works everywhere except, you guessed it,
+ // Safari. Make up for their incompetence by adding a setTimeout.
+ await wait(300) /* arbitrary constant, 300ms */;
+ await saveBlobPartAsFile(videoData, videoFileName);
+ } else {
+ await saveBlobPartAsFile(fileBlob, fileName);
+ }
+};
+
+/**
+ * Save the given {@link blob} as a file in the user's download folder.
+ */
+const saveBlobPartAsFile = async (blobPart: BlobPart, fileName: string) =>
+ createTypedObjectURL(blobPart, fileName).then((url) =>
+ saveAsFileAndRevokeObjectURL(url, fileName),
+ );
+
+const createTypedObjectURL = async (blobPart: BlobPart, fileName: string) => {
+ const blob = blobPart instanceof Blob ? blobPart : new Blob([blobPart]);
+ const { mimeType } = await detectFileTypeInfo(new File([blob], fileName));
+ return URL.createObjectURL(new Blob([blob], { type: mimeType }));
+};
+
+/**
+ * Create a new directory on the user's file system with the same name as the
+ * provided {@link collectionName} under the provided {@link downloadDirPath},
+ * and return the full path to the created directory.
+ *
+ * This function can be used only when running in the context of our desktop
+ * app, and so such requires an {@link Electron} instance as the witness.
+ */
+const mkdirCollectionDownloadFolder = async (
+ { fs }: Electron,
+ downloadDirPath: string,
+ collectionName: string,
+) => {
+ const collectionDownloadName = await safeDirectoryName(
+ downloadDirPath,
+ collectionName,
+ fs.exists,
+ );
+ const collectionDownloadPath = joinPath(
+ downloadDirPath,
+ collectionDownloadName,
+ );
+ await fs.mkdirIfNeeded(collectionDownloadPath);
+ return collectionDownloadPath;
+};
+
+/**
+ * Save a file to the given {@link directoryPath} using native filesystem APIs.
+ *
+ * This is a sibling of {@link saveAsFile} for use when we are running in the
+ * context of our desktop app. Unlike the browser, the desktop app can use
+ * native file system APIs to efficiently write the files on disk without
+ * needing to prompt the user for each write.
+ *
+ * @param electron An {@link Electron} instance, a witness to the fact that
+ * we're running in the desktop app.
+ *
+ * @param file The {@link EnteFile} whose contents we want to save to the user's
+ * file system.
+ *
+ * @param directoryPath The file system directory in which to save the file.
+ */
+const saveFileDesktop = async (
+ electron: Electron,
+ file: EnteFile,
+ directoryPath: string,
+) => {
+ const fs = electron.fs;
+
+ const createExportName = (fileName: string) =>
+ safeFileName(directoryPath, fileName, fs.exists);
+
+ const writeStreamToFile = (
+ exportName: string,
+ stream: ReadableStream | null,
+ ) => writeStream(electron, joinPath(directoryPath, exportName), stream);
+
+ const stream = await downloadManager.fileStream(file);
+ const fileName = fileFileName(file);
+
+ if (file.metadata.fileType == FileType.livePhoto) {
+ const { imageFileName, imageData, videoFileName, videoData } =
+ await decodeLivePhoto(fileName, await new Response(stream).blob());
+ const imageExportName = await createExportName(imageFileName);
+ await writeStreamToFile(imageExportName, new Response(imageData).body);
+ try {
+ await writeStreamToFile(
+ await createExportName(videoFileName),
+ new Response(videoData).body,
+ );
+ } catch (e) {
+ await fs.rm(joinPath(directoryPath, imageExportName));
+ throw e;
+ }
+ } else {
+ await writeStreamToFile(await createExportName(fileName), stream);
+ }
+};
diff --git a/web/packages/gallery/services/video.ts b/web/packages/gallery/services/video.ts
index 68e129099b..61561ffc72 100644
--- a/web/packages/gallery/services/video.ts
+++ b/web/packages/gallery/services/video.ts
@@ -349,14 +349,7 @@ export const hlsPlaylistDataForFile = async (
playlist: playlistTemplate,
width,
height,
- } = await decryptPlaylistJSON(
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- playlistFileData,
- file,
- );
+ } = await decryptPlaylistJSON(playlistFileData, file);
// A playlist format the current client does not understand.
if (type != "hls_video") return undefined;
diff --git a/web/packages/gallery/utils/native-stream.ts b/web/packages/gallery/utils/native-stream.ts
index e5a7160595..f52aa7319d 100644
--- a/web/packages/gallery/utils/native-stream.ts
+++ b/web/packages/gallery/utils/native-stream.ts
@@ -91,7 +91,7 @@ const readNumericHeader = (res: Response, key: string) => {
export const writeStream = async (
_: Electron,
path: string,
- stream: ReadableStream,
+ stream: ReadableStream | null,
) => {
const params = new URLSearchParams({ path });
const url = new URL(`stream://write?${params.toString()}`);
diff --git a/web/packages/media/collection.ts b/web/packages/media/collection.ts
index 81d90909e6..b8412a6d65 100644
--- a/web/packages/media/collection.ts
+++ b/web/packages/media/collection.ts
@@ -529,13 +529,7 @@ export const decryptRemoteCollection = async (
owner: parseRemoteCollectionUser(owner),
name,
sharees: sharees.map(parseRemoteCollectionUser),
- // TODO:
- //
- // See: [Note: strict mode migration]
- //
- // We need to add the cast here, otherwise we get a tsc error when this
- // file is imported in the photos app.
- publicURLs: rest.publicURLs as PublicURL[],
+ publicURLs: rest.publicURLs,
magicMetadata,
pubMagicMetadata,
sharedMagicMetadata,
diff --git a/web/packages/media/file.ts b/web/packages/media/file.ts
index 12ab7bbed4..9ede63ab24 100644
--- a/web/packages/media/file.ts
+++ b/web/packages/media/file.ts
@@ -381,10 +381,6 @@ export const decryptRemoteFile = async (
collectionKey,
);
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
const metadataJSON = await decryptMetadataJSON(encryptedMetadata, key);
const metadata = FileMetadata.parse(
transformDecryptedMetadataJSON(id, metadataJSON),
diff --git a/web/packages/new/README.md b/web/packages/new/README.md
index 5e375b7597..820f68831f 100644
--- a/web/packages/new/README.md
+++ b/web/packages/new/README.md
@@ -1,9 +1,8 @@
## ente-new
-This package only exists so that we can write code that works with TypeScript
-strict mode. This provides a gradual way of migrating the existing apps code to
-strict mode. Once there is sufficient gravity here, we can flip the switch and
-move these back to where they came from.
+This package is only transient. Once the remaining files in apps/photos have
+been revisited for clarity, and the albums app has been split into a separate
+folder, this package will not exist.
### Packaging
diff --git a/web/packages/new/albums/components/UploaderNameInput.tsx b/web/packages/new/albums/components/UploaderNameInput.tsx
index 7aa31b7b0f..8d951bd0c3 100644
--- a/web/packages/new/albums/components/UploaderNameInput.tsx
+++ b/web/packages/new/albums/components/UploaderNameInput.tsx
@@ -29,7 +29,7 @@ type UploaderNameInput = ModalVisibilityProps & {
/**
* Callback invoked when the user presses submit after entering a name.
*/
- onSubmit: (name: string) => Promise;
+ onSubmit: (name: string) => void | Promise;
};
/**
diff --git a/web/packages/new/albums/services/public-albums-fdb.ts b/web/packages/new/albums/services/public-albums-fdb.ts
index 5e940ced6a..429a294901 100644
--- a/web/packages/new/albums/services/public-albums-fdb.ts
+++ b/web/packages/new/albums/services/public-albums-fdb.ts
@@ -20,15 +20,9 @@ import { z } from "zod/v4";
* Use {@link savePublicCollections} to update the database.
*/
const savedPublicCollections = async (): Promise =>
- // TODO:
- //
- // See: [Note: strict mode migration]
- //
- // We need to add the cast here, otherwise we get a tsc error when this
- // file is imported in the photos app.
LocalCollections.parse(
(await localForage.getItem("public-collections")) ?? [],
- ) as Collection[];
+ );
/**
* Replace the list of public collections stored in our local database.
diff --git a/web/packages/new/photos/components/DeleteAccount.tsx b/web/packages/new/photos/components/DeleteAccount.tsx
index abf3980c30..4bc8ad3584 100644
--- a/web/packages/new/photos/components/DeleteAccount.tsx
+++ b/web/packages/new/photos/components/DeleteAccount.tsx
@@ -47,7 +47,11 @@ export const DeleteAccount: React.FC = ({
);
-// See: [Note: MUI dialog state reset]
+/**
+ * The contents of the {@link DeleteAccount} dialog.
+ *
+ * See: [Note: MUI dialog state] for why this is a separate component.
+ */
const DeleteAccountDialogContents: React.FC<
Omit
> = ({ onClose, onAuthenticateUser }) => {
diff --git a/web/packages/new/photos/components/SearchBar.tsx b/web/packages/new/photos/components/SearchBar.tsx
index f242aee020..2c97d044ec 100644
--- a/web/packages/new/photos/components/SearchBar.tsx
+++ b/web/packages/new/photos/components/SearchBar.tsx
@@ -83,7 +83,7 @@ export interface SearchBarProps {
/**
* Called when the user selects a person shown in the empty state view.
*/
- onSelectPerson: (personID: string | undefined) => void;
+ onSelectPerson: (personID: string) => void;
}
/**
@@ -210,7 +210,7 @@ const SearchInput: React.FC> = ({
onSelectPeople();
};
- const handleSelectPerson = (personID: string | undefined) => {
+ const handleSelectPerson = (personID: string) => {
resetSearch();
onSelectPerson(personID);
};
diff --git a/web/packages/new/photos/components/Tiles.tsx b/web/packages/new/photos/components/Tiles.tsx
index 2572257453..bf8318d832 100644
--- a/web/packages/new/photos/components/Tiles.tsx
+++ b/web/packages/new/photos/components/Tiles.tsx
@@ -66,7 +66,7 @@ export const ItemCard: React.FC> = ({
const [coverImageURL, setCoverImageURL] = useState();
useEffect(() => {
- if (!coverFile) return;
+ if (!coverFile) return undefined;
let didCancel = false;
diff --git a/web/packages/new/photos/components/gallery/BarImpl.tsx b/web/packages/new/photos/components/gallery/BarImpl.tsx
index 27198b86dc..757032f998 100644
--- a/web/packages/new/photos/components/gallery/BarImpl.tsx
+++ b/web/packages/new/photos/components/gallery/BarImpl.tsx
@@ -146,7 +146,7 @@ export const GalleryBarImpl: React.FC = ({
>(
(ref) => {
listContainerRef.current = ref;
- if (!ref) return;
+ if (!ref) return undefined;
// Listen for scrolls and resize.
ref.addEventListener("scroll", updateScrollState);
diff --git a/web/packages/new/photos/components/gallery/ListHeader.tsx b/web/packages/new/photos/components/gallery/ListHeader.tsx
index 91838f3852..1979ff5fe5 100644
--- a/web/packages/new/photos/components/gallery/ListHeader.tsx
+++ b/web/packages/new/photos/components/gallery/ListHeader.tsx
@@ -38,8 +38,8 @@ interface GalleryItemsSummaryProps {
}
/**
- * A component suitable for being used as a (non-sticky) summary displayed on
- * top of the of a list of photos (or other items) shown in the gallery.
+ * A component suitable for being used as a summary displayed on top of the of a
+ * list of photos (or other items) shown in the gallery.
*/
export const GalleryItemsSummary: React.FC = ({
name,
diff --git a/web/packages/new/photos/components/gallery/helpers.ts b/web/packages/new/photos/components/gallery/helpers.ts
index b3d69197fc..749393ad08 100644
--- a/web/packages/new/photos/components/gallery/helpers.ts
+++ b/web/packages/new/photos/components/gallery/helpers.ts
@@ -46,17 +46,26 @@ export const validateKey = async () => {
/**
* Return the {@link Collection} (from amongst {@link collections}) with the
- * given {@link collectionSummaryID}. As a special case, if the given
- * {@link collectionSummaryID} is the ID of the placeholder uncategorized
- * collection, create a new uncategorized collection and then return it.
+ * given {@link collectionSummaryID}.
+ *
+ * As a special case, if the given {@link collectionSummaryID} is the ID of the
+ * placeholder uncategorized collection, create a new uncategorized collection
+ * and then return it.
+ *
+ * This is used in the context of the collection summary, so one of the two
+ * cases must be true.
*/
export const findCollectionCreatingUncategorizedIfNeeded = async (
collections: Collection[],
collectionSummaryID: number,
-): Promise =>
+): Promise =>
collectionSummaryID == PseudoCollectionID.uncategorizedPlaceholder
? createUncategorizedCollection()
- : collections.find(({ id }) => id == collectionSummaryID);
+ : // Null assert since the collection selector should only
+ // show "selectable" normalCollectionSummaries.
+ //
+ // See: [Note: Picking from selectable collection summaries].
+ collections.find(({ id }) => id == collectionSummaryID)!;
/**
* Perform a "collection operation" on the selected file(s).
diff --git a/web/packages/new/photos/components/gallery/reducer.ts b/web/packages/new/photos/components/gallery/reducer.ts
index 741ffc39d2..d7aedfc0cb 100644
--- a/web/packages/new/photos/components/gallery/reducer.ts
+++ b/web/packages/new/photos/components/gallery/reducer.ts
@@ -1,4 +1,4 @@
-import type { User } from "ente-accounts/services/user";
+import { type LocalUser } from "ente-accounts/services/user";
import {
groupFilesByCollectionID,
sortFiles,
@@ -38,7 +38,7 @@ import {
} from "../../services/collection-summary";
import type { PeopleState, Person } from "../../services/ml/people";
import type { SearchSuggestion } from "../../services/search/types";
-import type { FamilyData } from "../../services/user-details";
+import type { FamilyData, UserDetails } from "../../services/user-details";
/**
* Specifies what the bar at the top of the gallery is displaying currently.
@@ -108,15 +108,15 @@ export interface GalleryState {
/*--< Mostly static state >--*/
/**
- * The logged in {@link User}.
+ * The logged in {@link LocalUser}.
*
* This is expected to be undefined only for a brief duration until the code
* for the initial "mount" runs (If we're not logged in, then the gallery
* will redirect the user to an appropriate authentication page).
*/
- user: User | undefined;
+ user: LocalUser | undefined;
/**
- * Family plan related information for the logged in {@link User}.
+ * Family plan related information for the logged in {@link LocalUser}.
*/
familyData: FamilyData | undefined;
@@ -449,12 +449,13 @@ export interface GalleryState {
export type GalleryAction =
| {
type: "mount";
- user: User;
+ user: LocalUser;
familyData: FamilyData | undefined;
collections: Collection[];
collectionFiles: EnteFile[];
trashItems: TrashItem[];
}
+ | { type: "setUserDetails"; userDetails: UserDetails }
| { type: "setCollections"; collections: Collection[] }
| { type: "setCollectionFiles"; collectionFiles: EnteFile[] }
| { type: "uploadFile"; file: EnteFile }
@@ -623,6 +624,32 @@ const galleryReducer: React.Reducer = (
});
}
+ case "setUserDetails": {
+ // While user details have more state that can change, the only
+ // changes that affect the reducer's state (so far) are if the
+ // user's own email changes, or the list of their family members
+ // changes.
+ //
+ // Both of these affect only the list of share suggestion emails.
+
+ let user = state.user!;
+ const { email, familyData } = action.userDetails;
+ if (email != user.email) {
+ user = { ...user, email };
+ }
+
+ return {
+ ...state,
+ user,
+ familyData,
+ shareSuggestionEmails: createShareSuggestionEmails(
+ user,
+ familyData,
+ state.collections,
+ ),
+ };
+ }
+
case "setCollections": {
const collections = action.collections;
@@ -1225,7 +1252,7 @@ const deriveArchivedFileIDs = (
* Compute favorite file IDs from their dependencies.
*/
const deriveFavoriteFileIDs = (
- user: User,
+ user: LocalUser,
collections: GalleryState["collections"],
collectionFiles: GalleryState["collectionFiles"],
unsyncedFavoriteUpdates: GalleryState["unsyncedFavoriteUpdates"],
@@ -1278,7 +1305,7 @@ const createFileCollectionIDs = (files: EnteFile[]) =>
*/
const deriveNormalCollectionSummaries = (
normalCollections: Collection[],
- user: User,
+ user: LocalUser,
trashItems: GalleryState["trashItems"],
collectionFiles: GalleryState["collectionFiles"],
hiddenFileIDs: GalleryState["hiddenFileIDs"],
@@ -1378,7 +1405,7 @@ const pseudoCollectionOptionsForLatestFileAndCount = (
*/
const deriveHiddenCollectionSummaries = (
hiddenCollections: Collection[],
- user: User,
+ user: LocalUser,
collectionFiles: GalleryState["collectionFiles"],
) => {
const hiddenCollectionSummaries = createCollectionSummaries(
@@ -1414,7 +1441,7 @@ const deriveUncategorizedCollectionSummaryID = (
PseudoCollectionID.uncategorizedPlaceholder;
const createCollectionSummaries = (
- user: User,
+ user: LocalUser,
collections: Collection[],
collectionFiles: EnteFile[],
) => {
@@ -1968,7 +1995,7 @@ const enqueuePendingSearchSuggestionsIfNeeded = (
* users who have shared a collection with the user.
*/
const constructUserIDToEmailMap = (
- user: User,
+ user: LocalUser,
collections: GalleryState["collections"],
): Map => {
const userIDToEmail = new Map();
@@ -1990,7 +2017,7 @@ const constructUserIDToEmailMap = (
* are trying to share albums with specific users.
*/
const createShareSuggestionEmails = (
- user: User,
+ user: LocalUser,
familyData: FamilyData | undefined,
collections: Collection[],
): string[] => [
diff --git a/web/packages/new/photos/components/sidebar/TwoFactorSettings.tsx b/web/packages/new/photos/components/sidebar/TwoFactorSettings.tsx
index badbe850b6..c20f378f7b 100644
--- a/web/packages/new/photos/components/sidebar/TwoFactorSettings.tsx
+++ b/web/packages/new/photos/components/sidebar/TwoFactorSettings.tsx
@@ -1,6 +1,9 @@
import LockIcon from "@mui/icons-material/Lock";
import { Stack, Typography } from "@mui/material";
-import { getData, setLSUser } from "ente-accounts/services/accounts-db";
+import {
+ savedPartialLocalUser,
+ updateSavedLocalUser,
+} from "ente-accounts/services/accounts-db";
import {
RowButton,
RowButtonGroup,
@@ -24,12 +27,9 @@ export const TwoFactorSettings: React.FC<
const [isTwoFactorEnabled, setIsTwoFactorEnabled] = useState(false);
useEffect(() => {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
- const isTwoFactorEnabled =
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
- getData("user").isTwoFactorEnabled ?? false;
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
- setIsTwoFactorEnabled(isTwoFactorEnabled);
+ if (savedPartialLocalUser()?.isTwoFactorEnabled) {
+ setIsTwoFactorEnabled(true);
+ }
}, []);
useEffect(() => {
@@ -37,11 +37,7 @@ export const TwoFactorSettings: React.FC<
void (async () => {
const isEnabled = await get2FAStatus();
setIsTwoFactorEnabled(isEnabled);
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
- await setLSUser({
- ...getData("user"),
- isTwoFactorEnabled: isEnabled,
- });
+ updateSavedLocalUser({ isTwoFactorEnabled: isEnabled });
})();
}, [open]);
@@ -112,8 +108,7 @@ const ManageDrawerContents: React.FC = ({ onRootClose }) => {
const disable = async () => {
await disable2FA();
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
- await setLSUser({ ...getData("user"), isTwoFactorEnabled: false });
+ updateSavedLocalUser({ isTwoFactorEnabled: undefined });
onRootClose();
};
diff --git a/web/packages/new/photos/components/utils/use-loading-bar.ts b/web/packages/new/photos/components/utils/use-loading-bar.ts
index 6297443e73..c5c7152fed 100644
--- a/web/packages/new/photos/components/utils/use-loading-bar.ts
+++ b/web/packages/new/photos/components/utils/use-loading-bar.ts
@@ -12,7 +12,7 @@ import { type LoadingBarRef } from "react-top-loading-bar";
* loading bar. This hook returns these functions (and the ref).
*/
export const useLoadingBar = () => {
- const loadingBarRef = useRef(undefined);
+ const loadingBarRef = useRef(null);
const showLoadingBar = useCallback(() => {
loadingBarRef.current?.continuousStart();
diff --git a/web/packages/new/photos/services/collection-summary.ts b/web/packages/new/photos/services/collection-summary.ts
index a735dc8114..2876e305e1 100644
--- a/web/packages/new/photos/services/collection-summary.ts
+++ b/web/packages/new/photos/services/collection-summary.ts
@@ -19,8 +19,8 @@ export type CollectionSummaryAttribute =
| "sharedIncomingCollaborator"
| "sharedOnlyViaLink"
| "system"
- | "hideFromCollectionBar"
| "archived"
+ | "hideFromCollectionBar"
| "pinned";
/**
diff --git a/web/packages/new/photos/services/collection.ts b/web/packages/new/photos/services/collection.ts
index 6eeb0b1b5a..f231c64f70 100644
--- a/web/packages/new/photos/services/collection.ts
+++ b/web/packages/new/photos/services/collection.ts
@@ -1390,10 +1390,6 @@ export const createPublicURL = async (
body: JSON.stringify({ collectionID, ...attributes }),
});
ensureOk(res);
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
return z.object({ result: RemotePublicURL }).parse(await res.json()).result;
};
@@ -1429,10 +1425,6 @@ export const updatePublicURL = async (
body: JSON.stringify({ collectionID, ...updates }),
});
ensureOk(res);
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
return z.object({ result: RemotePublicURL }).parse(await res.json()).result;
};
diff --git a/web/packages/new/photos/services/export.ts b/web/packages/new/photos/services/export.ts
index 33d24d9779..4654866fdb 100644
--- a/web/packages/new/photos/services/export.ts
+++ b/web/packages/new/photos/services/export.ts
@@ -172,7 +172,7 @@ interface CancellationStatus {
class ExportService {
private exportSettings: ExportSettings | undefined;
// @ts-ignore
- private exportInProgress: RequestCanceller = null;
+ private exportInProgress: RequestCanceller | null = null;
private resync = true;
private reRunNeeded = false;
private exportRecordUpdater = new PromiseQueue();
@@ -336,7 +336,7 @@ class ExportService {
async stopRunningExport() {
try {
log.info("user requested export cancellation");
- this.exportInProgress.exec();
+ this.exportInProgress?.exec();
// @ts-ignore
this.exportInProgress = null;
this.reRunNeeded = false;
diff --git a/web/packages/new/photos/services/file.ts b/web/packages/new/photos/services/file.ts
index b25e8c782c..2c62346027 100644
--- a/web/packages/new/photos/services/file.ts
+++ b/web/packages/new/photos/services/file.ts
@@ -27,13 +27,13 @@ import { savedCollectionFiles } from "./photos-fdb";
const requestBatchSize = 1000;
/**
- * Perform an operation on batches, concurrently.
+ * Perform an operation on batches, serially.
*
* The given {@link items} are split into batches, each of
* {@link requestBatchSize}. The provided operation is called on all these
- * batches, in parallel, by using `Promise.all`. When all the operations are
- * complete, the function returns with an array of results (one from each batch
- * promise resolution).
+ * batches, one after the other. When all the operations are complete, the
+ * function returns with an array of results (one from each batch promise
+ * resolution).
*
* @param items The arbitrary items to break into {@link requestBatchSize}
* batches.
@@ -41,15 +41,16 @@ const requestBatchSize = 1000;
* @param op The operation to perform on each batch.
*
* @returns A promise for an array of results, one from each batch operation. If
- * any operations fails, then the promise rejects with the first failure reason.
- *
- * For more details see the documentation for the `Promise.all` primitive which
- * this function uses.
+ * any operations fails, then the promise rejects with its failure reason.
*/
-export const batched = (
+export const batched = async (
items: T[],
op: (batchItems: T[]) => Promise,
-): Promise => Promise.all(batch(items, requestBatchSize).map(op));
+): Promise => {
+ const result: U[] = [];
+ for (const b of batch(items, requestBatchSize)) result.push(await op(b));
+ return result;
+};
/**
* Return all normal (non-hidden) files present in our local database.
diff --git a/web/packages/new/photos/services/ml/ml-data.ts b/web/packages/new/photos/services/ml/ml-data.ts
index 28271ec65e..370e4002f9 100644
--- a/web/packages/new/photos/services/ml/ml-data.ts
+++ b/web/packages/new/photos/services/ml/ml-data.ts
@@ -171,10 +171,6 @@ export const fetchMLData = async (
try {
const decryptedBytes = await decryptBlobBytes(
remoteFileData,
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
file.key,
);
const jsonString = await gunzip(decryptedBytes);
@@ -199,14 +195,6 @@ const remoteMLDataFromJSONString = (
) => {
const raw = RawRemoteMLData.parse(JSON.parse(jsonString));
const parseResult = ParsedRemoteMLData.safeParse(raw);
- // TODO: [Note: strict mode migration]
- //
- // This code is included in apps/photos where it causes spurious tsc failure
- // since the photos app currently does not have the TypeScript strict mode
- // enabled (unlike the current file).
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
const parsed = parseResult.success
? (parseResult.data as ParsedRemoteMLData)
: undefined;
diff --git a/web/packages/new/photos/services/photos-fdb.ts b/web/packages/new/photos/services/photos-fdb.ts
index 357a30d909..a02b21a0a3 100644
--- a/web/packages/new/photos/services/photos-fdb.ts
+++ b/web/packages/new/photos/services/photos-fdb.ts
@@ -22,15 +22,7 @@ import type { TrashItem } from "./trash";
* Use {@link saveCollections} to update the database.
*/
export const savedCollections = async (): Promise =>
- // TODO:
- //
- // See: [Note: strict mode migration]
- //
- // We need to add the cast here, otherwise we get a tsc error when this
- // file is imported in the photos app.
- LocalCollections.parse(
- (await localForage.getItem("collections")) ?? [],
- ) as Collection[];
+ LocalCollections.parse((await localForage.getItem("collections")) ?? []);
/**
* Replace the list of collections stored in our local database.
diff --git a/web/packages/new/photos/services/search/worker.ts b/web/packages/new/photos/services/search/worker.ts
index b088eef50f..8a3bee99cb 100644
--- a/web/packages/new/photos/services/search/worker.ts
+++ b/web/packages/new/photos/services/search/worker.ts
@@ -431,10 +431,6 @@ const defaultCityRadius = 10;
const kmsPerDegree = 111.16;
const isInsideLocationTag = (location: Location, locationTag: LocationTag) =>
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
isWithinRadius(location, locationTag.centerPoint, locationTag.radius);
const isInsideCity = (location: Location, city: City) =>
diff --git a/web/packages/new/photos/services/settings.ts b/web/packages/new/photos/services/settings.ts
index d5ae3bf14d..aedda42384 100644
--- a/web/packages/new/photos/services/settings.ts
+++ b/web/packages/new/photos/services/settings.ts
@@ -2,7 +2,7 @@
* @file Storage (in-memory, local, remote) and update of various settings.
*/
-import { partialLocalUser } from "ente-accounts/services/user";
+import { savedPartialLocalUser } from "ente-accounts/services/accounts-db";
import { isDevBuild } from "ente-base/env";
import log from "ente-base/log";
import { updateShouldDisableCFUploadProxy } from "ente-gallery/services/upload";
@@ -195,10 +195,8 @@ const setSettingsSnapshot = (snapshot: Settings) => {
*/
export const isDevBuildAndUser = () => isDevBuild && isDevUserViaEmail();
-const isDevUserViaEmail = () => {
- const user = partialLocalUser();
- return !!user?.email?.endsWith("@ente.io");
-};
+const isDevUserViaEmail = () =>
+ !!savedPartialLocalUser()?.email?.endsWith("@ente.io");
/**
* Persist the user's map enabled preference both locally and on remote.
diff --git a/web/packages/new/photos/services/user-details.ts b/web/packages/new/photos/services/user-details.ts
index 4d48d7449e..596112b8a1 100644
--- a/web/packages/new/photos/services/user-details.ts
+++ b/web/packages/new/photos/services/user-details.ts
@@ -1,4 +1,4 @@
-import { getData, setLSUser } from "ente-accounts/services/accounts-db";
+import { updateSavedLocalUser } from "ente-accounts/services/accounts-db";
import { ensureLocalUser } from "ente-accounts/services/user";
import { isDesktop } from "ente-base/app";
import { authenticatedRequestHeaders, ensureOk } from "ente-base/http";
@@ -177,18 +177,22 @@ export const logoutUserDetails = () => {
};
/**
- * Read in the locally persisted settings into memory, otherwise initiate a
- * network requests to fetch the latest values (but don't wait for it to
- * complete).
+ * Read in the locally persisted user details into memory and return them.
+ *
+ * If there are no locally persisted values, initiate a network requests to
+ * fetch the latest values (but don't wait for it to complete).
*
* This assumes that the user is already logged in.
*/
-export const initUserDetailsOrTriggerPull = async () => {
+export const savedUserDetailsOrTriggerPull = async () => {
const saved = await getKV("userDetails");
if (saved) {
- setUserDetailsSnapshot(UserDetails.parse(saved));
+ const userDetails = UserDetails.parse(saved);
+ setUserDetailsSnapshot(userDetails);
+ return userDetails;
} else {
void pullUserDetails();
+ return undefined;
}
};
@@ -234,14 +238,39 @@ const setUserDetailsSnapshot = (snapshot: UserDetails) => {
export const pullUserDetails = async () => {
const userDetails = await getUserDetails();
await setKV("userDetails", userDetails);
- setUserDetailsSnapshot(userDetails);
// Update the email for the local storage user if needed (the user might've
// changed their email on a different client).
- if (ensureLocalUser().email != userDetails.email) {
+ const { email } = userDetails;
+ if (ensureLocalUser().email != email) {
log.info("Updating user email to match fetched user details");
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
- await setLSUser({ ...getData("user"), email: userDetails.email });
+ updateSavedLocalUser({ email });
+ }
+
+ // The gallery listens for updates to userDetails, so a special case, do a
+ // deep equality check so as to not rerender it on redundant updates.
+ //
+ // [Note: Deep equal check]
+ //
+ // React uses `Object.is` to detect changes, which changes for arrays,
+ // objects and combinations thereof even if the underlying data is the same.
+ //
+ // In many cases, the code can be restructured to avoid this being a
+ // problem, or the rerender might be infrequent enough that it is not a
+ // problem.
+ //
+ // However, when used with useSyncExternalStore, there is an easy way to
+ // prevent this, by doing a preflight deep equality comparison.
+ //
+ // There are arguably faster libraries out there that'll do the deep
+ // equality check for us, but since it is an infrequent pattern in our code
+ // base currently, we just use the JSON serialization.
+ //
+ // Mark all cases that do this using this note's title so we can audit them
+ // if we move to a deep equality comparison library in the future.
+
+ if (JSON.stringify(userDetails) != JSON.stringify(userDetailsSnapshot())) {
+ setUserDetailsSnapshot(userDetails);
}
};
diff --git a/web/packages/new/photos/services/user-entity/db.ts b/web/packages/new/photos/services/user-entity/db.ts
index bc3e870c04..f9fa86ce39 100644
--- a/web/packages/new/photos/services/user-entity/db.ts
+++ b/web/packages/new/photos/services/user-entity/db.ts
@@ -53,10 +53,6 @@ export const saveEntities = (type: EntityType, items: LocalUserEntity[]) =>
export const savedEntities = async (
type: EntityType,
): Promise =>
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
LocalUserEntity.array().parse((await getKV(entitiesKey(type))) ?? []);
/**
diff --git a/web/packages/new/photos/services/user-entity/index.ts b/web/packages/new/photos/services/user-entity/index.ts
index ca9f50ac27..dd4de714fa 100644
--- a/web/packages/new/photos/services/user-entity/index.ts
+++ b/web/packages/new/photos/services/user-entity/index.ts
@@ -102,10 +102,6 @@ export type CGroup = Omit & {
* Return the list of locally available cgroup user entities.
*/
export const savedCGroups = (): Promise =>
- // See: [Note: strict mode migration]
- //
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
savedEntities("cgroup").then((es) =>
es.map((e) => ({ ...e, data: RemoteCGroupData.parse(e.data) })),
);