commit c8bfd14c3f9581b2098f620592b2498d3a5c21d0
parent c861688151a4fb617d7a6bac248b19ca27c0a00f
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Fri, 23 Jun 2023 16:29:50 +0200

feat: translations and file path
- new json property schema
- append media type to file name

Diffstat:
Dapp/src/main/assets/lang/de_DE.json | 180-------------------------------------------------------------------------------
Mapp/src/main/assets/lang/en_US.json | 317+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Mapp/src/main/assets/lang/fr_FR.json | 348+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
Mapp/src/main/kotlin/me/rhunk/snapenhance/config/ConfigProperty.kt | 18++++++++++--------
Mapp/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt | 19++++++++++++-------
Mapp/src/main/kotlin/me/rhunk/snapenhance/ui/config/ConfigActivity.kt | 6+++---
Mapp/src/main/kotlin/me/rhunk/snapenhance/ui/menu/impl/SettingsMenu.kt | 5+++--
7 files changed, 514 insertions(+), 379 deletions(-)

diff --git a/app/src/main/assets/lang/de_DE.json b/app/src/main/assets/lang/de_DE.json @@ -1,180 +0,0 @@ -{ - "category": { - "spying_privacy": "Spying & Privatsphäre", - "media_manager": "Medien Verwaltung", - "ui_tweaks": "UI & Optimierungen", - "updates": "Updates", - "experimental_debugging": "Experimentell" - }, - - "action": { - "clean_cache": "Cache bereinigen", - "clear_message_logger": "Nachrichten Logger bereinigen", - "refresh_mappings": "Mappings erneuern", - "open_map": "Standort auf der Map auswählen", - "check_for_updates": "Auf updates überprüfen" - }, - - "property": { - "save_folder": "Speicherverzeichnis", - "prevent_read_receipts": "Lesebestätigungen verhindern", - "hide_bitmoji_presence": "Bitmoji Präsenz verstecken", - "show_message_content_in_notifications": "Nachrichten Inhalt in Benachrichtigungen anzeigen", - "better_notifications": "Bessere Benachrichtigungen", - "notification_blacklist": "Benachrichtigungs Blacklist", - "message_logger": "Nachrichten Logger", - "unlimited_snap_view_time": "Unendliches Snap ansehen", - "auto_download_options": "Auto Download Optionen", - "download_options": "Download Optionen", - "chat_download_context_menu": "Kontextmenü für Chat-Download aktivieren", - "auto_download_blacklist": "Auto Download Blacklist", - "disable_metrics": "Metriken deaktivieren", - "prevent_screenshot_notifications": "Screenshot-Benachrichtigungen verhindern", - "prevent_status_notifications": "Status Benachrichtigungen verhindern (zur Camera roll gespeichert, verpasste Anrufe)", - "anonymous_story_view": "Anonyme Story Ansicht", - "hide_typing_notification": "Tippen-Benachrichtigung verbergen", - "menu_slot_id": "Friend Menu Slot ID", - "message_preview_length": "Nachrichten Vorschau länge", - "gallery_media_send_override": "Überschreiben beim senden von Gallerie Medien", - "auto_save_messages": "Auto Nachrichten speichern", - "anti_auto_save": "Anti Auto speichern Button", - "snapchat_plus": "Snapchat Plus", - "disable_snap_splitting": "Snap Splitting deaktivieren", - "disable_video_length_restriction": "Videolängen Einschränkung deaktivieren", - "override_media_quality": "Medien Qualität Überschreiben", - "media_quality_level": "Medien Qualität Level", - "remove_voice_record_button": "Sprachaufnahmen Button entfernen", - "remove_stickers_button": "Stickers Button entfernen", - "remove_cognac_button": "Cognac Button entfernen", - "remove_call_buttons": "Anruf Button entfernen", - "block_ads": "Werbung blockieren", - "streak_expiration_info": "Streak auslauf info anzeigen", - "new_map_ui": "Neue Map UI", - "use_download_manager": "Nutze Android Download Manager", - "app_passcode": "App Passcode setzen", - "app_lock_on_resume": "App Lock beim fortsetzen", - "meo_passcode_bypass": "My Eyes Only Passcode umgehen", - "location_spoof": "Snapmap Standort Spoofer", - "latitude_value": "Breitengrad", - "longitude_value": "Längengrad", - "hide_ui_elements": "UI Elemente verstecken", - "auto_updater": "Auto Updater", - "infinite_story_boost": "Unendlicher Story Boost" - }, - - "option": { - "property": { - "better_notifications": { - "chat": "Chat Nachrichten anzeigen", - "snap": "Medien anzeigen", - "reply_button": "Antwort button hinzügen" - }, - "download_options": { - "format_user_folder": "Erstelle einen Ordner für jeden Nutzer", - "format_hash": "Füge einen einzigartigen Hash zum Dateipfad hinzu", - "format_username": "Füge den Nutzernamen zum Dateipfad hinzu", - "format_date_time": "Füge das Datum und die Zeit zum Dateipfad hinzu", - "merge_overlay": "Snap Bilder Overlays zusammenfügen" - }, - "auto_download_options": { - "friend_snaps": "Snaps von Freunden", - "friend_stories": "Stories von Freunden", - "public_stories": "Öffentliche Stories", - "spotlight": "Spotlight" - }, - "auto_save_messages": { - "NOTE": "Audio Note", - "CHAT": "Chat", - "EXTERNAL_MEDIA": "Externe Medien", - "SNAP": "Snap", - "STICKER": "Sticker" - }, - "notification_blacklist": { - "chat": "Chat", - "snap": "Snap", - "typing": "Schreiben" - }, - "gallery_media_send_override": { - "OFF": "Aus", - "NOTE": "Audio Note", - "SNAP": "Snap", - "LIVE_SNAP": "Snap mit Audio" - }, - "media_quality_level": { - "LEVEL_NONE": "Keine Änderung", - "LEVEL_1": "Level 1", - "LEVEL_2": "Level 2", - "LEVEL_3": "Level 3", - "LEVEL_4": "Level 4", - "LEVEL_5": "Level 5", - "LEVEL_6": "Level 6", - "LEVEL_7": "Level 7", - "LEVEL_MAX": "Maximale Qualität" - }, - "hide_ui_elements": { - "remove_call_buttons": "Entferne Anruf Button", - "remove_cognac_button": "Entferne Cognac Button", - "remove_stickers_button": "Entferne Stickers Button", - "remove_voice_record_button": "Entferne Sprachnachricht Button", - "remove_camera_borders": "Entferne Kamera Ränder" - }, - "auto_updater": { - "DISABLED": "Deaktiviert", - "EVERY_LAUNCH": "Bei jedem Start", - "DAILY": "Täglich", - "WEEKLY": "Wöchentlich" - } - } - }, - - "friend_menu_option": { - "preview": "Vorschau", - "stealth_mode": "Stealth Mode", - "anti_auto_download": "Anti Auto Download", - "anti_auto_save": "Anti Auto Speichern" - }, - - "message_context_menu_option": { - "download": "Download", - "preview": "Vorschau" - }, - - "chat_action_menu": { - "preview_button": "Vorschau", - "download_button": "Download", - "delete_logged_message_button": "Geloggte Nachricht entfernen" - }, - - "opera_context_menu": { - "download": "Medien Herunterladen" - }, - - "modal_option": { - "profile_info": "Profil Info", - "close": "Schließen" - }, - - "conversation_preview": { - "streak_expiration": "läuft in %s Tagen %s Stunden und %s Minuten aus", - "title": "Vorschau", - "unknown_user": "Unbekannter Nutzer" - }, - - "profile_info": { - "title": "Profil Info", - "username": "Nutzername", - "display_name": "Anzeigename", - "added_date": "Hinzugefügt Datum", - "birthday": "Geburtstag : {day} {month}" - }, - - "auto_updater": { - "no_update_available": "Kein Update verfügbar!", - "dialog_title": "Neues Update verfügbar!", - "dialog_message": "Ein neues Update für SnapEnhance ist verfügbar! ({version})\n\n{body}", - "dialog_positive_button": "Herunterladen und Installieren", - "dialog_negative_button": "Abbrechen", - "downloading_toast": "Lade Update runter...", - "download_manager_notification_title": "Lade SnapEnhance APK runter..." - } -} diff --git a/app/src/main/assets/lang/en_US.json b/app/src/main/assets/lang/en_US.json @@ -9,7 +9,6 @@ }, "action": { - "open_settings_button": "Open SnapEnhance Settings", "clean_cache": "Clean Cache", "clear_message_logger": "Clear Message Logger", "refresh_mappings": "Refresh Mappings", @@ -19,122 +18,199 @@ }, "property": { - "save_folder": "Save Folder", - "prevent_read_receipts": "Prevent Read Receipts", - "hide_bitmoji_presence": "Hide Bitmoji Presence", - "better_notifications": "Better Notifications", - "notification_blacklist": "Notification Blacklist", - "message_logger": "Message Logger", - "unlimited_snap_view_time": "Unlimited Snap View Time", - "auto_download_options": "Auto Download Options", - "download_options": "Download Options", - "chat_download_context_menu": "Enable Chat Download Context Menu", - "auto_download_blacklist": "Auto Download Blacklist", - "disable_metrics": "Disable Metrics", - "prevent_screenshot_notifications": "Prevent Screenshot Notifications", - "prevent_status_notifications": "Prevent Status Notifications", - "anonymous_story_view": "Anonymous Story View", - "hide_typing_notification": "Hide Typing Notification", - "message_preview_length": "Message Preview Length", - "unlimited_conversion_pinning": "Unlimited Conversation Pinning", - "gallery_media_send_override": "Gallery Media Send Override", - "auto_save_messages": "Auto Save Messages", - "anti_auto_save": "Anti Auto Save Button", - "snapchat_plus": "Snapchat Plus", - "disable_snap_splitting": "Disable Snap Splitting", - "disable_video_length_restriction": "Disable Video Length Restriction", - "force_media_source_quality": "Force Media Source Quality", - "remove_voice_record_button": "Remove Voice Record Button", - "remove_stickers_button": "Remove Stickers Button", - "remove_cognac_button": "Remove Cognac Button", - "remove_call_buttons": "Remove Call Buttons", - "block_ads": "Block Ads", - "streak_expiration_info": "Show Streak Expiration Info", - "new_map_ui": "New Map UI", - "app_passcode": "Set App Passcode", - "app_lock_on_resume": "App Lock On Resume", - "meo_passcode_bypass": "My Eyes Only Passcode Bypass", - "location_spoof": "Snapmap Location Spoofer", - "latitude_value": "Latitude", - "longitude_value": "Longitude", - "hide_ui_elements": "Hide UI Elements", - "auto_updater": "Auto Updater", - "disable_camera": "Disable Camera", - "immersive_camera_preview": "Immersive Camera Preview", - "infinite_story_boost": "Infinite Story Boost", - "enable_app_appearance": "Enable App Appearance Settings", - "disable_spotlight": "Disable Spotlight", - "preview_resolution": "Override Preview Resolution", - "picture_resolution": "Override Picture Resolution", - "force_highest_frame_rate": "Force Highest Frame Rate", - "force_camera_source_encoding": "Force Camera Source Encoding", - "amoled_dark_mode": "AMOLED Dark Mode", - "enable_friend_feed_menu_bar": "Enable New Friend Feed Menu Bar", - "friend_feed_menu_buttons": "Friend Feed Menu Buttons", - "friend_feed_menu_buttons_position": "Friend Feed Buttons Position Index", - "unlimited_conversation_pinning": "Unlimited Conversation Pinning", - "story_viewer_override": "Story Viewer Override", - "hide_story_section": "Hide story sections" - }, + "message_logger": { + "name": "Message Logger", + "description": "Prevents messages from being deleted" + }, + "prevent_read_receipts": { + "name": "Prevent Read Receipts", + "description": "Prevent anyone from knowing you've opened their Snaps" + }, + "hide_bitmoji_presence": { + "name": "Hide Bitmoji Presence", + "description": "Hides your Bitmoji presence from the chat" + }, + "better_notifications": { + "name": "Better Notifications", + "description": "Shows more information in notifications" + }, + "notification_blacklist": { + "name": "Notification Blacklist", + "description": "Hides selected notification type" + }, + "disable_metrics": { + "name": "Disable Metrics", + "description": "Disables metrics sent to Snapchat" + }, + "block_ads": { + "name": "Block Ads", + "description": "Blocks ads from being displayed" + }, + "unlimited_snap_view_time": { + "name": "Unlimited Snap View Time", + "description": "Removes the time limit for viewing Snaps" + }, + "prevent_screenshot_notifications": { + "name": "Prevent Screenshot Notifications", + "description": "Prevents anyone from knowing that you've taken a screenshot" + }, + "prevent_status_notifications": { + "name": "Prevent Status Notifications", + "description": "Prevents sending status notifications\ne.g. Saved to camera roll" + }, + "anonymous_story_view": { + "name": "Anonymous Story View", + "description": "Prevents anyone from knowing you've seen their story" + }, + "hide_typing_notification": { + "name": "Hide Typing Notification", + "description": "Prevents typing notifications being sent" + }, - "description": { - "save_folder": "The directory where all media is saved", - "prevent_read_receipts": "Prevent anyone from knowing you've opened their Snaps", - "hide_bitmoji_presence": "Hides your Bitmoji presence from the chat", - "better_notifications": "Shows more information in notifications", - "notification_blacklist": "Hides selected notification type", - "message_logger": "Prevents messages from being deleted", - "unlimited_snap_view_time": "Removes the 10 second Snap view time limit", - "auto_download_options": "Select which medias to auto download", - "download_options": "Specify the file path format", - "chat_download_context_menu": "Enable the chat download context menu", - "auto_download_blacklist": "Prevents auto downloading from specified users", - "disable_metrics": "Disables metrics sent to Snapchat", - "prevent_screenshot_notifications": "Prevents anyone from knowing that you've taken a screenshot", - "prevent_status_notifications": "Prevents sending status notifications\ne.g. Saved to camera roll", - "anonymous_story_view": "Prevents anyone from knowing you've seen their story", - "hide_typing_notification": "Prevents typing notifications being sent", - "message_preview_length": "Specify the amount of messages to be previewed", - "unlimited_conversion_pinning": "Enables the ability to pin unlimited conversations", - "gallery_media_send_override": "Overrides media sent from the gallery", - "auto_save_messages": "Select which type of messages to auto save", - "anti_auto_save": "Prevents Auto saving of messages from the specified users", - "snapchat_plus": "Enables Snapchat Plus features", - "disable_snap_splitting": "Prevents Snaps from being split into multiple parts", - "disable_video_length_restriction": "Disables video length restrictions", - "force_media_source_quality": "Overrides the media source quality", - "remove_voice_record_button": "Removes the voice record button", - "remove_stickers_button": "Removes the stickers button", - "remove_cognac_button": "Removes the cognac button", - "remove_call_buttons": "Removes the call buttons", - "block_ads": "Prevents ads from being displayed", - "story_viewer_override": "Turns on certain features which Snapchat hid", - "streak_expiration_info": "Shows Streak expiration info next to streaks", - "new_map_ui": "Enables the new Map UI", - "app_passcode": "Sets a passcode to lock the app", - "app_lock_on_resume": "Locks the app when it's opened", - "meo_passcode_bypass": "Bypass the My Eyes Only passcode\nThis will only work if the passcode has been entered correctly before", - "location_spoof": "Spoofs your location on the Snapmap", - "latitude_value": "The latitude of your Spoofed location", - "longitude_value": "The longitude of your Spoofed location", - "hide_ui_elements": "Select which UI elements to hide", - "auto_updater": "The interval of checking for updates", - "disable_camera": "Prevents Snapchat from being able to use the camera", - "immersive_camera_preview": "Stops Snapchat from cropping the camera preview", - "infinite_story_boost": "Infinitely boosts your story", - "enable_app_appearance": "Enables the hidden app appearance settings", - "disable_spotlight": "Disables the Spotlight page", - "preview_resolution": "Overrides the preview resolution", - "picture_resolution": "Overrides the picture resolution", - "force_highest_frame_rate": "Forces the highest possible frame rate", - "amoled_dark_mode": "Enables AMOLED dark mode\nMake sure Snapchat's dark mode is enabled", - "friend_feed_menu_buttons_position": "The position of the Friend Feed Menu Buttons", - "friend_feed_menu_buttons": "Select which buttons to show in the Friend Feed Menu Bar", - "friend_feed_menu_bar": "Enables the new Friend Feed Menu Bar", - "enable_friend_feed_menu_bar": "Enables the new Friend Feed Menu Bar", - "unlimited_conversation_pinning": "Enables the ability to Pin unlimited conversations", - "force_camera_source_encoding": "Forces Camera Source Encoding", - "hide_story_section": "Hide certain UI Elements shown in the story section" + "save_folder": { + "name": "Save Folder", + "description": "The directory where all media is saved" + }, + "auto_download_options": { + "name": "Auto Download Options", + "description": "Select which medias to auto download" + }, + "download_options": { + "name": "Download Options", + "description": "Specify the file path format" + }, + "chat_download_context_menu": { + "name": "Chat Download Context Menu", + "description": "Enable the chat download context menu" + }, + "gallery_media_send_override": { + "name": "Gallery Media Send Override", + "description": "Overrides media sent from the gallery" + }, + "auto_save_messages": { + "name": "Auto Save Messages", + "description": "Select which type of messages to auto save" + }, + "force_media_source_quality": { + "name": "Force Media Source Quality", + "description": "Overrides the media source quality" + }, + + "enable_friend_feed_menu_bar": { + "name": "Friend Feed Menu Bar", + "description": "Enables the new Friend Feed Menu Bar" + }, + "friend_feed_menu_buttons": { + "name": "Friend Feed Menu Buttons", + "description": "Select which buttons to show in the Friend Feed Menu Bar" + }, + "friend_feed_menu_buttons_position": { + "name": "Friend Feed Buttons Position Index", + "description": "The position of the Friend Feed Menu Buttons" + }, + "hide_ui_elements": { + "name": "Hide UI Elements", + "description": "Select which UI elements to hide" + }, + "hide_story_section": { + "name": "Hide Story Section", + "description": "Hide certain UI Elements shown in the story section" + }, + "story_viewer_override": { + "name": "Story Viewer Override", + "description": "Turns on certain features which Snapchat hid" + }, + "streak_expiration_info": { + "name": "Show Streak Expiration Info", + "description": "Shows Streak expiration info next to streaks" + }, + "disable_snap_splitting": { + "name": "Disable Snap Splitting", + "description": "Prevents Snaps from being split into multiple parts" + }, + "disable_video_length_restriction": { + "name": "Disable Video Length Restriction", + "description": "Disables video length restrictions" + }, + "snapchat_plus": { + "name": "Snapchat Plus", + "description": "Enables Snapchat Plus features" + }, + "new_map_ui": { + "name": "New Map UI", + "description": "Enables the new map UI" + }, + "location_spoof": { + "name": "Snapmap Location Spoofer", + "description": "Spoofs your location on the Snapmap" + }, + "message_preview_length": { + "name": "Message Preview Length", + "description": "Specify the amount of messages to be previewed" + }, + "unlimited_conversation_pinning": { + "name": "Unlimited Conversation Pinning", + "description": "Enables the ability to pin unlimited conversations" + }, + "disable_spotlight": { + "name": "Disable Spotlight", + "description": "Disables the Spotlight page" + }, + "enable_app_appearance": { + "name": "Enable App Appearance Settings", + "description": "Enables the hidden app appearance settings" + }, + + "auto_updater": { + "name": "Auto Updater", + "description": "The interval of checking for updates" + }, + + "disable_camera": { + "name": "Disable Camera", + "description": "Prevents Snapchat from being able to use the camera" + }, + "immersive_camera_preview": { + "name": "Immersive Camera Preview", + "description": "Stops Snapchat from cropping the camera preview" + }, + "preview_resolution": { + "name": "Preview Resolution", + "description": "Overrides the camera preview resolution" + }, + "picture_resolution": { + "name": "Picture Resolution", + "description": "Overrides the picture resolution" + }, + "force_highest_frame_rate": { + "name": "Force Highest Frame Rate", + "description": "Forces the highest possible frame rate" + }, + "force_camera_source_encoding": { + "name": "Force Camera Source Encoding", + "description": "Forces the camera source encoding" + }, + + "app_passcode": { + "name": "Set App Passcode", + "description": "Sets a passcode to lock the app" + }, + "app_lock_on_resume": { + "name": "App Lock On Resume", + "description": "Locks the app when it's reopened" + }, + "infinite_story_boost": { + "name": "Infinite Story Boost", + "description": "Infinitely boosts your story" + }, + "meo_passcode_bypass": { + "name": "My Eyes Only Passcode Bypass", + "description": "Bypass the My Eyes Only passcode\nThis will only work if the passcode has been entered correctly before" + }, + "amoled_dark_mode": { + "name": "AMOLED Dark Mode", + "description": "Enables AMOLED dark mode\nMake sure Snapchat's dark mode is enabled" + } }, "option": { @@ -152,10 +228,11 @@ }, "download_options": { "allow_duplicate": "Allow duplicate downloads", - "format_user_folder": "Create folder for each user", - "format_hash": "Add a unique hash to the file path", - "format_username": "Add the username to the file path", - "format_date_time": "Add the date and time to the file path", + "create_user_folder": "Create folder for each user", + "append_hash": "Add a unique hash to the file name", + "append_username": "Add the username to the file name", + "append_date_time": "Add the date and time to the file name", + "append_type": "Add the media type to the file name", "merge_overlay": "Merge Snap Image Overlays" }, "auto_download_options": { diff --git a/app/src/main/assets/lang/fr_FR.json b/app/src/main/assets/lang/fr_FR.json @@ -7,66 +7,210 @@ "updates": "Mises à jour", "experimental_debugging": "Expérimental" }, + "action": { "clean_cache": "Effacer le cache", "clear_message_logger": "Effacer le Loggeur de message", "refresh_mappings": "Actualiser les mappings", "open_map": "Choisir un emplacement sur la carte", - "check_for_updates": "Vérifier les mises à jour" + "check_for_updates": "Vérifier les mises à jour", + "export_chat_messages": "Exporter une conversation" }, + "property": { - "save_folder": "Dossier d'enregistrement", - "prevent_read_receipts": "Empêcher les accusés de réception", - "hide_bitmoji_presence": "Cacher la présence de son Bitmoji", - "better_notifications": "Notifications améliorées", - "notification_blacklist": "Liste de noire des notifications reçues", - "message_logger": "Loggeur de message", - "unlimited_snap_view_time": "Temps de visionnage des Snaps illimités", - "auto_download_options": "Options de téléchargement automatique", - "download_options": "Options de téléchargement", - "chat_download_context_menu": "Activer le menu contextuel de téléchargement de Chat", - "auto_download_blacklist": "Filtrer les téléchargements automatiques", - "disable_metrics": "Désactiver les données métriques", - "prevent_screenshot_notifications": "Empêcher les notifications de capture écran", - "prevent_status_notifications": "Empêcher les notifications de statut (enregistré dans la galerie, etc)", - "anonymous_story_view": "Anonymiser la lecture des story", - "hide_typing_notification": "Empêcher l'envoi des notifications d'écriture", - "message_preview_length": "Longueur de prévisualisation des messages", - "gallery_media_send_override": "Remplacement de l'envoi des médias depuis la galerie", - "auto_save_messages": "Enregistrement automatique des messages", - "snapchat_plus": "Snapchat Plus", - "disable_snap_splitting": "Désactiver le fractionnement des Snaps", - "disable_video_length_restriction": "Désactiver la restriction de la durée des vidéos", - "force_media_source_quality": "Forcer la qualité source des médias", - "remove_voice_record_button": "Supprimer le bouton d'enregistrement de la voix", - "remove_stickers_button": "Supprimer le bouton des autocollants", - "remove_cognac_button": "Supprimer le bouton Cognac", - "remove_call_buttons": "Supprimer les boutons d'appel", - "block_ads": "Bloquer les publicités", - "streak_expiration_info": "Afficher l'expiration des Snapflammes", - "new_map_ui": "Nouvelle interface de la carte", - "app_passcode": "Définir un code d'accès à l'application", - "app_lock_on_resume": "Verrouillage de l'application une fois de retour dedans", - "meo_passcode_bypass": "Retirer le code d'accès de My Eyes Only", - "location_spoof": "Changement de la localisation sur la carte", - "latitude_value": "Latitude", - "longitude_value": "Longitude", - "hide_ui_elements": "Masquer les éléments de l'interface", - "auto_updater": "Mise à jour automatisée", - "disable_camera": "Désactiver la caméra", - "immersive_camera_preview": "Aperçu de la caméra immersif", - "infinite_story_boost": "Booster de story infini", - "enable_app_appearance": "Activer les réglages de d'apparence", - "disable_spotlight": "Désactiver Spotlight", - "preview_resolution": "Remplacer la résolution de l'aperçu de la camera", - "picture_resolution": "Remplacer la résolution de la photo", - "force_highest_frame_rate": "Forcer le taux de rafraîchissement maximal", - "force_camera_source_encoding": "Forcer l'encodage source de la caméra", - "amoled_dark_mode": "Mode sombre AMOLED", - "enable_friend_feed_menu_bar": "Activer la barre du menu du fil d'ami", - "friend_feed_menu_buttons": "Boutons du menu du fil d'ami", - "friend_feed_menu_buttons_position": "Position des boutons du menu du fil d'ami", - "unlimited_conversation_pinning": "Épinglage illimité de conversation" + "message_logger": { + "name": "Journal des messages", + "description": "Empêche les messages d'être supprimés" + }, + "prevent_read_receipts": { + "name": "Empêcher les accusés de réception", + "description": "Empêche les accusés de réception d'être envoyés" + }, + "hide_bitmoji_presence": { + "name": "Cacher la présence de son Bitmoji", + "description": "Empêche vos amis de voir votre Bitmoji apparaître dans les conversations" + }, + "better_notifications": { + "name": "Notifications améliorées", + "description": "Affiche plus d'informations dans les notifications" + }, + "notification_blacklist": { + "name": "Liste de noire des notifications", + "description": "Cache les type de notifications sélectionnés" + }, + "disable_metrics": { + "name": "Désactiver les métriques", + "description": "Empêche les métriques d'être envoyées aux serveurs de Snapchat" + }, + "block_ads": { + "name": "Bloquer les publicités", + "description": "Bloque les publicités dans Snapchat" + }, + "unlimited_snap_view_time": { + "name": "Temps de visionnage des snaps illimité", + "description": "Permet de voir les snaps aussi longtemps que vous le souhaitez" + }, + "prevent_screenshot_notifications": { + "name": "Empêcher les notifications de capture d'écran", + "description": "Empêche l'envoi d'une notification lorsqu'une capture d'écran est effectuée" + }, + "prevent_status_notifications": { + "name": "Empêcher les notifications de statut", + "description": "Empêche l'envoi des notifications de statut (enregistré dans la galerie, etc.)" + }, + "anonymous_story_view": { + "name": "Visionnage anonyme des stories", + "description": "Empêche les utilisateurs de voir que vous avez vu leur story" + }, + "hide_typing_notification": { + "name": "Empêcher les notifications de saisie", + "description": "Empêche l'envoi des notifications de saisie" + }, + + "save_folder": { + "name": "Dossier d'enregistrement", + "description": "Spécifie le dossier dans lequel les médias seront enregistrés" + }, + "auto_download_options": { + "name": "Options de téléchargement automatique", + "description": "Spécifie quel type de média seront automatiquement téléchargés" + }, + "download_options": { + "name": "Options de téléchargement", + "description": "Spécifie le format du chemin de téléchargement des médias" + }, + "chat_download_context_menu": { + "name": "Activer le menu contextuel de téléchargement de Chat", + "description": "Ajoute de boutons de téléchargement dans le menu contextuel de Chat" + }, + "gallery_media_send_override": { + "name": "Remplacement de l'envoi des médias depuis la galerie", + "description": "Remplace le type de média envoyé depuis la galerie" + }, + "auto_save_messages": { + "name": "Enregistrement automatique des messages", + "description": "Enregistre automatiquement les messages textuels dans le Chat" + }, + "force_media_source_quality": { + "name": "Forcer la qualité source des médias", + "description": "Oblige Snapchat à envoyer la qualité source des médias" + }, + + "enable_friend_feed_menu_bar": { + "name": "Barre du menu du fil d'ami", + "description": "Active la nouvelle barre du menu du fil d'ami" + }, + "friend_feed_menu_buttons": { + "name": "Boutons du menu du fil d'ami", + "description": "Sélectionne les boutons à afficher dans le menu du fil d'ami" + }, + "friend_feed_menu_buttons_position": { + "name": "Position des boutons du menu du fil d'ami", + "description": "Sélectionne la position des boutons dans le menu du fil d'ami" + }, + "hide_ui_elements": { + "name": "Masquer les éléments de l'interface", + "description": "Selectionne les éléments de l'interface à masquer" + }, + "hide_story_section": { + "name": "Masquer la section de la page des Stories", + "description": "Masque certaines sections de la page des Stories" + }, + "story_viewer_override": { + "name": "Remplacer le style de visionnage des Stories", + "description": "Active certaines fonctionnalités que Snapchat a masqué" + }, + "streak_expiration_info": { + "name": "Afficher l'expiration des Snapflammes", + "description": "Affiche le temps restant avant l'expiration des Snapflammes à côté du nombre de jours" + }, + "disable_snap_splitting": { + "name": "Désactiver le fractionnement des Snaps", + "description": "Empêche les Snaps de se fractionner en plusieurs parties" + }, + "disable_video_length_restriction": { + "name": "Désactiver la restriction de la durée des vidéos", + "description": "Empêche Snapchat de limiter la durée des vidéos lors de l'envoi" + }, + "snapchat_plus": { + "name": "Snapchat Plus", + "description": "Active les fonctionnalités de Snapchat Plus" + }, + "new_map_ui": { + "name": "Nouvelle interface de la Snapmap", + "description": "Active la nouvelle interface de la Snapmap" + }, + "location_spoof": { + "name": "Changement de la localisation sur la carte", + "description": "Change la localisation affichée sur la Snapmap" + }, + "message_preview_length": { + "name": "Longueur de prévisualisation des messages", + "description": "Spécifie le nombre de message à afficher" + }, + "unlimited_conversation_pinning": { + "name": "Épinglage illimité des conversations", + "description": "Permet d'épingler autant de conversations que vous le souhaitez" + }, + "disable_spotlight": { + "name": "Désactiver Spotlight", + "description": "Désactive la page Spotlight" + }, + "enable_app_appearance": { + "name": "Activer l'apparence de l'application", + "description": "Active les paramètres cachés d'apparence de l'application" + }, + + "auto_updater": { + "name": "Mises à jour automatiques", + "description": "Le délai entre les mises à jour automatiques" + }, + + "disable_camera": { + "name": "Désactiver la caméra", + "description": "Empêche Snapchat d'accéder à la caméra" + }, + "immersive_camera_preview": { + "name": "Aperçu de la caméra en plein écran", + "description": "Empêche Snapchat de recadrer l'aperçu de la caméra" + }, + "preview_resolution": { + "name": "Résolution de l'aperçu de la caméra", + "description": "Remplace la résolution de l'aperçu de la caméra" + }, + "picture_resolution": { + "name": "Résolution des photos", + "description": "Remplace la résolution des photos" + }, + "force_highest_frame_rate": { + "name": "Taux de rafraîchissement maximal", + "description": "Forcer le taux de rafraîchissement le plus élevé" + }, + "force_camera_source_encoding": { + "name": "Encodage source de la caméra", + "description": "Forcer l'encodage de la source de la caméra" + }, + + "app_passcode": { + "name": "Mot de passe de l'application", + "description": "Définir un mot de passe pour l'application" + }, + "app_lock_on_resume": { + "name": "Verrouillage de l'application à la reprise", + "description": "Verrouille l'application lorsque vous la réouvrez" + }, + "infinite_story_boost": { + "name": "Mis en avant infini des Stories", + "description": "Permet de mettre en avant vos Stories autant de fois que vous le souhaitez" + }, + "meo_passcode_bypass": { + "name": "Contourner le mot de passe de My Eyes Only", + "description": "Contourne le mot de passe de My Eyes Only\nCela ne fonctionnera que si le mot de passe n'a pas été entré correctement auparavant" + }, + "amoled_dark_mode": { + "name": "Mode sombre AMOLED", + "description": "Active le mode sombre AMOLED\nAssurez-vous que le mode sombre de Snapchat est activé" + } }, "option": { "property": { @@ -82,10 +226,12 @@ "conversation_info": "\uD83D\uDC64 Info de conversation" }, "download_options": { - "format_user_folder": "Création d'un dossier pour chaque utilisateur", - "format_hash": "Ajouter un hashage unique au nom du fichier", - "format_username": "Ajouter le nom d'utilisateur au nom du fichier", - "format_date_time": "Ajouter la date ainsi que l'heure au nom du fichier", + "allow_duplicate": "Autoriser les doublons", + "create_user_folder": "Création d'un dossier pour chaque utilisateur", + "append_hash": "Ajouter un hashage unique au nom du fichier", + "append_username": "Ajouter le nom d'utilisateur au nom du fichier", + "append_date_time": "Ajouter la date ainsi que l'heure au nom du fichier", + "append_type": "Ajouter le type de média au nom du fichier", "merge_overlay": "Fusion des superpositions des Snaps" }, "auto_download_options": { @@ -114,7 +260,7 @@ }, "hide_ui_elements": { "remove_call_buttons": "Supprimer le bouton d'appel", - "remove_cognac_button": "Supprimer le bouton Cognac", + "remove_cognac_button": "Supprimer le bouton des Activités", "remove_stickers_button": "Supprimer le bouton des autocollants", "remove_voice_record_button": "Supprimer le bouton d'enregistrement de la voix", "remove_camera_borders": "Supprimer les bordures de la caméra" @@ -124,36 +270,54 @@ "EVERY_LAUNCH": "À chaque lancement", "DAILY": "Journalière", "WEEKLY": "Hebdomadaire" + }, + + "story_viewer_override": { + "OFF": "Désactivé", + "DISCOVER_PLAYBACK_SEEKBAR": "Activer la barre du lecteur des Stories Discover", + "VERTICAL_STORY_VIEWER": "Activer le lecteur vertical des Stories" + }, + "hide_story_section": { + "hide_friends": "Cacher la section des amis", + "hide_following": "Cacher la section des abonnements", + "hide_for_you": "Cacher la section Pour vous" } } }, + "friend_menu_option": { "preview": "Aperçu", "stealth_mode": "Mode furtif", "auto_download_blacklist": "Empêcher le téléchargement automatique", "anti_auto_save": "Empêcher l'enregistrement automatique" }, + "message_context_menu_option": { "download": "Télécharger", "preview": "Aperçu" }, + "chat_action_menu": { "preview_button": "Aperçu", "download_button": "Télécharger", "delete_logged_message_button": "Supprimer le message enregistré par le Loggeur" }, + "opera_context_menu": { "download": "Télécharger" }, + "modal_option": { "profile_info": "Informations du profil", "close": "Fermer" }, + "conversation_preview": { - "streak_expiration": "expire dans %s jour(s) %s heure(s) %s minute(s)", + "streak_expiration": "expire dans {day} jour(s) {hour} heure(s) {minute} minute(s)", "title": "Aperçu", "unknown_user": "Utilisateur inconnu" }, + "profile_info": { "title": "Informations du profil", "username": "Nom d'utilisateur", @@ -161,6 +325,7 @@ "added_date": "Date d'ajout", "birthday": "Anniversaire : {day} {month}" }, + "auto_updater": { "no_update_available": "Aucune mise à jour disponible !", "dialog_title": "Nouvelle mise à jour disponible !", @@ -169,5 +334,70 @@ "dialog_negative_button": "Annuler", "downloading_toast": "Téléchargement de la mise à jour...", "download_manager_notification_title": "Téléchargement du fichier APK de SnapEnhance..." + }, + + "chat_export": { + "select_export_format": "Selectionner le format d'exportation", + "select_media_type": "Selectionner le type de média à exporter", + "select_conversation": "Selectionner la/les conversation à exporter", + "dialog_negative_button": "Annuler", + "dialog_neutral_button": "Exporter tout", + "dialog_positive_button": "Exporter", + "exported_to": "Exporté vers {path}", + "exporting_chats": "Exportation des conversations...", + "processing_chats": "Traitement de {amount} conversation(s)...", + "export_fail": "Impossible d'exporter la conversation {conversation} !", + "writing_output": "Écriture du fichier de sortie...", + "finished": "Terminé ! Vous pouvez maintenant fermer ce popup.", + "no_messages_found": "Aucun message trouvé !", + "exporting_message": "Exportation de {message}..." + }, + + "button": { + "ok": "OK", + "positive": "Oui", + "negative": "Non", + "cancel": "Annuler", + "open": "Ouvrir" + }, + + "download_manager_activity": { + "remove_all_title": "Supprimer tout les téléchargements", + "remove_all_text": "Êtes-vous sûr de vouloir supprimer tous les téléchargements ?", + "remove_all": "Supprimer tout", + "no_downloads": "Aucun téléchargement", + "cancel": "Annuler", + "file_not_found_toast": "Fichier introuvable !", + "category": { + "all_category": "Tout", + "pending_category": "En attente", + "snap_category": "Snap", + "story_category": "Story", + "spotlight_category": "Spotlight" + }, + "settings": "Paramètres", + "settings_page": { + "clear_file_title": "Supprimer le fichier {file_name}", + "clear_file_confirmation": "Êtes-vous sûr de vouloir supprimer le fichier {file_name} ?", + "clear_cache_title": "Supprimer le cache", + "reset_all_title": "Réinitialiser tous les paramètres", + "reset_all_confirmation": "Êtes-vous sûr de vouloir réinitialiser tous les paramètres ?", + "success_toast": "Succès !" + } + }, + "download_manager_receiver": { + "already_queued_toast": "Média déjà en attente !", + "already_downloaded_toast": "Média déjà téléchargé !", + "saved_toast": "Sauvegardé vers {path}", + "download_toast": "Téléchargement de {path}...", + "processing_toast": "Traitement de {path}...", + "failed_generic_toast": "Échec du téléchargement !", + "failed_processing_toast": "Échec du traitement !", + "failed_gallery_toast": "Échec de l'ajout à la galerie ! {error}" + }, + "config_activity": { + "title": "Paramètres de SnapEnhance", + "selected_text": "{count} sélectionné(s)", + "invalid_number_toast": "Nombre invalide !" } } diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/config/ConfigProperty.kt b/app/src/main/kotlin/me/rhunk/snapenhance/config/ConfigProperty.kt @@ -117,18 +117,20 @@ enum class ConfigProperty( ConfigStateListValue( listOf( "allow_duplicate", - "format_user_folder", - "format_hash", - "format_date_time", - "format_username", + "create_user_folder", + "append_hash", + "append_date_time", + "append_type", + "append_username", "merge_overlay" ), mutableMapOf( "allow_duplicate" to false, - "format_user_folder" to true, - "format_hash" to true, - "format_date_time" to true, - "format_username" to false, + "create_user_folder" to true, + "append_hash" to true, + "append_date_time" to true, + "append_type" to false, + "append_username" to false, "merge_overlay" to false, ) ) diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt @@ -62,7 +62,7 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam mediaDisplayType: String? = null, friendInfo: FriendInfo? = null ): DownloadManagerClient { - val generatedHash = mediaIdentifier.hashCode().toString(16) + val generatedHash = mediaIdentifier.hashCode().toString(16).replaceFirst("-", "") val iconUrl = friendInfo?.takeIf { it.bitmojiAvatarId != null && it.bitmojiSelfieId != null @@ -72,7 +72,7 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam val outputPath = File( context.config.string(ConfigProperty.SAVE_FOLDER), - createNewFilePath(generatedHash, pathSuffix) + createNewFilePath(generatedHash, mediaDisplayType, pathSuffix) ).absolutePath return DownloadManagerClient( @@ -94,7 +94,7 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam return isFFmpegPresent } - private fun createNewFilePath(hexHash: String, pathPrefix: String): String { + private fun createNewFilePath(hexHash: String, mediaDisplayType: String?, pathPrefix: String): String { val downloadOptions = context.config.options(ConfigProperty.DOWNLOAD_OPTIONS) val sanitizedPathPrefix = pathPrefix .replace(" ", "_") @@ -113,16 +113,21 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam } } - if (downloadOptions["format_user_folder"] == true) { + if (downloadOptions["create_user_folder"] == true) { finalPath.append(sanitizedPathPrefix).append("/") } - if (downloadOptions["format_hash"] == true) { + if (downloadOptions["append_hash"] == true) { appendFileName(hexHash) } - if (downloadOptions["format_username"] == true) { + mediaDisplayType?.let { + if (downloadOptions["append_type"] == true) { + appendFileName(it.lowercase().replace(" ", "-")) + } + } + if (downloadOptions["append_username"] == true) { appendFileName(sanitizedPathPrefix) } - if (downloadOptions["format_date_time"] == true) { + if (downloadOptions["append_date_time"] == true) { appendFileName(currentDateTime) } diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/ui/config/ConfigActivity.kt b/app/src/main/kotlin/me/rhunk/snapenhance/ui/config/ConfigActivity.kt @@ -80,7 +80,7 @@ class ConfigActivity : Activity() { setText(property.valueContainer.value().toString()) } AlertDialog.Builder(this) - .setTitle(SharedContext.translation["property.${property.translationKey}"]) + .setTitle(SharedContext.translation["property.${property.translationKey}.name"]) .setView(editText) .setPositiveButton(positiveButtonText) { _, _ -> callback(editText.text.toString()) @@ -132,11 +132,11 @@ class ConfigActivity : Activity() { if (!property.shouldAppearInSettings) return@forEach - val propertyName = SharedContext.translation["property.${property.translationKey}"] + val propertyName = SharedContext.translation["property.${property.translationKey}.name"] configItem.findViewById<TextView>(R.id.name).text = propertyName configItem.findViewById<TextView>(R.id.description).also { - it.text = SharedContext.translation["description.${property.translationKey}"] + it.text = SharedContext.translation["property.${property.translationKey}.description"] it.visibility = if (it.text.isEmpty()) View.GONE else View.VISIBLE } diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/ui/menu/impl/SettingsMenu.kt b/app/src/main/kotlin/me/rhunk/snapenhance/ui/menu/impl/SettingsMenu.kt @@ -34,7 +34,7 @@ class SettingsMenu : AbstractMenu() { @SuppressLint("SetTextI18n") private fun createPropertyView(property: ConfigProperty): View { - val propertyName = context.translation["property.${property.translationKey}"] + val propertyName = context.translation["property.${property.translationKey}.name"] val updateButtonText: (TextView, String) -> Unit = { textView, text -> textView.text = "$propertyName${if (text.isEmpty()) "" else ": $text"}" } @@ -188,13 +188,14 @@ class SettingsMenu : AbstractMenu() { } } + //TODO: quick settings @SuppressLint("SetTextI18n") fun inject(viewModel: View, addView: (View) -> Unit) { val actions = context.actionManager.getActions().map { Pair(it) { val button = Button(viewModel.context) button.text = (it.dependsOnProperty?.let { property -> - "["+context.translation["property.${property.translationKey}"] + "] " + "["+context.translation["property.${property.translationKey}.name"] + "] " }?: "") + context.translation[it.nameKey] button.setOnClickListener { _ ->