diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index e488479c4..1b3e82001 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -9,16 +9,11 @@ "SIGN_UP": "Signup", "NEW_USER": "New to ente", "EXISTING_USER": "Existing user", - "NAME": "Name", "ENTER_NAME": "Enter name", "PUBLIC_UPLOADER_NAME_MESSAGE": "Add a name so that your friends know who to thank for these great photos!", - "EMAIL": "Email", "ENTER_EMAIL": "Enter email address", - "DATA_DISCLAIMER": "We'll never share your data with anyone else.", - "SUBMIT": "Submit", "EMAIL_ERROR": "Enter a valid email", "REQUIRED": "Required", - "VERIFY_EMAIL": "Verify email", "EMAIL_SENT": "Verification code sent to {{email}}", "CHECK_INBOX": "Please check your inbox (and spam) to complete verification", "ENTER_OTT": "Verification code", @@ -31,7 +26,6 @@ "SENT": "Sent!", "PASSWORD": "Password", "LINK_PASSWORD": "Enter password to unlock the album", - "ENTER_PASSPHRASE": "Enter your password", "RETURN_PASSPHRASE_HINT": "Password", "SET_PASSPHRASE": "Set password", "VERIFY_PASSPHRASE": "Sign in", @@ -47,7 +41,6 @@ "PASSPHRASE_MATCH_ERROR": "Passwords don't match", "CONSOLE_WARNING_STOP": "STOP!", "CONSOLE_WARNING_DESC": "This is a browser feature intended for developers. Please don't copy-paste unverified code here.", - "SELECT_COLLECTION": "Select an album to upload to", "CREATE_COLLECTION": "New album", "ENTER_ALBUM_NAME": "Album name", "CLOSE_OPTION": "Close (Esc)", @@ -71,17 +64,14 @@ "4": "Cancelling remaining uploads", "5": "Backup complete" }, - "UPLOADING_FILES": "File upload", "FILE_NOT_UPLOADED_LIST": "The following files were not uploaded", "SUBSCRIPTION_EXPIRED": "Subscription expired", "SUBSCRIPTION_EXPIRED_MESSAGE": "Your subscription has expired, please renew", "STORAGE_QUOTA_EXCEEDED": "Storage limit exceeded", "INITIAL_LOAD_DELAY_WARNING": "First load may take some time", "USER_DOES_NOT_EXIST": "Sorry, could not find a user with that email", - "UPLOAD_BUTTON_TEXT": "Upload", "NO_ACCOUNT": "Don't have an account", "ACCOUNT_EXISTS": "Already have an account", - "ALBUM_NAME": "Album name", "CREATE": "Create", "DOWNLOAD": "Download", "DOWNLOAD_OPTION": "Download (D)", @@ -102,13 +92,10 @@ "TRASH_FILE_TITLE": "Delete file?", "DELETE_FILES_TITLE": "Delete immediately?", "DELETE_FILES_MESSAGE": "Selected files will be permanently deleted from your ente account.", - "DELETE_FILE": "Delete files", "DELETE": "Delete", "DELETE_OPTION": "Delete (DEL)", - "FAVORITE": "Favorite", "FAVORITE_OPTION": "Favorite (L)", "UNFAVORITE_OPTION": "Unfavorite (L)", - "UNFAVORITE": "Unfavorite", "MULTI_FOLDER_UPLOAD": "Multiple folders detected", "UPLOAD_STRATEGY_CHOICE": "Would you like to upload them into", "UPLOAD_STRATEGY_SINGLE_COLLECTION": "A single album", @@ -116,7 +103,6 @@ "UPLOAD_STRATEGY_COLLECTION_PER_FOLDER": "Separate albums", "SESSION_EXPIRED_MESSAGE": "Your session has expired, please login again to continue", "SESSION_EXPIRED": "Session expired", - "SYNC_FAILED": "Failed to sync with server, please refresh this page", "PASSWORD_GENERATION_FAILED": "Your browser was unable to generate a strong key that meets ente's encryption standards, please try using the mobile app or another browser", "CHANGE_PASSWORD": "Change password", "GO_BACK": "Go back", @@ -139,13 +125,11 @@ "REQUEST_FEATURE": "Request Feature", "SUPPORT": "Support", "CONFIRM": "Confirm", - "SKIP_SUBSCRIPTION_PURCHASE": "Continue with free plan", "CANCEL": "Cancel", "LOGOUT": "Logout", "DELETE_ACCOUNT": "Delete account", "DELETE_ACCOUNT_MESSAGE": "

Please send an email to {{emailID}} from your registered email address.

Your request will be processed within 72 hours.

", "LOGOUT_MESSAGE": "Are you sure you want to logout?", - "CHANGE": "Change", "CHANGE_EMAIL": "Change email", "OK": "OK", "SUCCESS": "Success", @@ -157,9 +141,6 @@ "EXPORT": "Export Data", "SUBSCRIPTION": "Subscription", "SUBSCRIBE": "Subscribe", - "SUBSCRIPTION_PLAN": "Subscription plan", - "USAGE_DETAILS": "Usage", - "MANAGE": "Manage", "MANAGEMENT_PORTAL": "Manage payment method", "MANAGE_FAMILY_PORTAL": "Manage family", "LEAVE_FAMILY_PLAN": "Leave family plan", @@ -177,7 +158,6 @@ "STORAGE_QUOTA_EXCEEDED_SUBSCRIPTION_INFO": "You have exceeded your storage quota, please upgrade", "SUBSCRIPTION_PURCHASE_SUCCESS": "

We've received your payment

Your subscription is valid till {{date, dateTime}}

", "SUBSCRIPTION_PURCHASE_CANCELLED": "Your purchase was canceled, please try again if you want to subscribe", - "SUBSCRIPTION_VERIFICATION_FAILED": "We were not able to verify your purchase, verification can take few hours", "SUBSCRIPTION_PURCHASE_FAILED": "Subscription purchase failed , please try again", "SUBSCRIPTION_UPDATE_FAILED": "Subscription updated failed , please try again", "UPDATE_PAYMENT_METHOD_MESSAGE": "We are sorry, payment failed when we tried to charge your card, please update your payment method and try again", @@ -204,22 +184,18 @@ "RENAME_COLLECTION": "Rename album", "DELETE_COLLECTION_TITLE": "Delete album?", "DELETE_COLLECTION": "Delete album", - "DELETE_COLLECTION_FAILED": "Album deletion failed, please try again", "DELETE_COLLECTION_MESSAGE": "Also delete the photos (and videos) present in this album from all other albums they are part of?", "DELETE_PHOTOS": "Delete photos", "KEEP_PHOTOS": "Keep photos", "SHARE": "Share", "SHARE_COLLECTION": "Share album", - "SHARE_WITH_PEOPLE": "Share with your loved ones", "SHAREES": "Shared with", - "PUBLIC_URL": "Public link", "SHARE_WITH_SELF": "Oops, you cannot share with yourself", "ALREADY_SHARED": "Oops, you're already sharing this with {{email}}", "SHARING_BAD_REQUEST_ERROR": "Sharing album not allowed", "SHARING_DISABLED_FOR_FREE_ACCOUNTS": "Sharing is disabled for free accounts", "DOWNLOAD_COLLECTION": "Download album", "DOWNLOAD_COLLECTION_MESSAGE": "

Are you sure you want to download the complete album?

All files will be queued for download sequentially

", - "DOWNLOAD_COLLECTION_FAILED": "Album downloading failed, please try again", "CREATE_ALBUM_FAILED": "Failed to create album , please try again", "SEARCH_RESULTS": "Search results", "SEARCH_HINT": "Search for albums, dates ...", @@ -235,10 +211,8 @@ "photos_count_one": "1 memory", "photos_count_other": "{{count}} memories", "TERMS_AND_CONDITIONS": "I agree to the terms and privacy policy", - "CONFIRM_PASSWORD_NOT_SAVED": "

I understand that if I lose my password , I may lose my data since my data is <1>end-to-end encrypted with ente

", "ADD_TO_COLLECTION": "Add to album", "SELECTED": "selected", - "VIDEO_PLAYBACK_FAILED": "Video format not supported", "VIDEO_PLAYBACK_FAILED_DOWNLOAD_INSTEAD": "This video cannot be played on your browser", "PEOPLE": "People", "INDEXING_SCHEDULED": "indexing is scheduled...", @@ -248,41 +222,27 @@ "UNIDENTIFIED_FACES": "unidentified faces", "OBJECTS": "objects", "TEXT": "text", - "METADATA": "Metadata", "INFO": "Info ", "INFO_OPTION": "Info (I)", - "FILE_ID": "File ID", "FILE_NAME": "File name", - "CAPTION": "Description", "CAPTION_PLACEHOLDER": "Add a description", - "CREATION_TIME": "Creation time", - "UPDATED_ON": "Updated on", "LOCATION": "Location", "SHOW_ON_MAP": "View on OpenStreetMap", "DETAILS": "Details", "VIEW_EXIF": "View all EXIF data", "NO_EXIF": "No EXIF data", "EXIF": "EXIF", - "DEVICE": "Device", - "IMAGE_SIZE": "Image size", - "FLASH": "Flash", - "FOCAL_LENGTH": "Focal length", - "APERTURE": "Aperture", "ISO": "ISO", - "SHOW_ALL": "show all", "TWO_FACTOR": "Two-factor", "TWO_FACTOR_AUTHENTICATION": "Two-factor authentication", "TWO_FACTOR_QR_INSTRUCTION": "Scan the QR code below with your favorite authenticator app", "ENTER_CODE_MANUALLY": "Enter the code manually", "TWO_FACTOR_MANUAL_CODE_INSTRUCTION": "Please enter this code in your favorite authenticator app", "SCAN_QR_CODE": "Scan QR code instead", - "CONTINUE": "Continue", - "BACK": "Back", "ENABLE_TWO_FACTOR": "Enable two-factor", "ENABLE": "Enable", "LOST_DEVICE": "Lost two-factor device", "INCORRECT_CODE": "Incorrect code", - "RECOVER_TWO_FACTOR": "Recover two-factor", "TWO_FACTOR_INFO": "Add an additional layer of security by requiring more than your email and password to log in to your account", "DISABLE_TWO_FACTOR_LABEL": "Disable two-factor authentication", "UPDATE_TWO_FACTOR_LABEL": "Update your authenticator device", @@ -293,30 +253,17 @@ "UPDATE": "Update", "DISABLE_TWO_FACTOR": "Disable two-factor", "DISABLE_TWO_FACTOR_MESSAGE": "Are you sure you want to disable your two-factor authentication", - "TWO_FACTOR_SETUP_FAILED": "Failed to setup two factor, please try again", - "TWO_FACTOR_SETUP_SUCCESS": "Two factor authentication successfully configured", - "TWO_FACTOR_DISABLE_SUCCESS": "Two factor authentication disabled", "TWO_FACTOR_DISABLE_FAILED": "Failed to disable two factor, please try again", "EXPORT_DATA": "Export data", "SELECT_FOLDER": "Select folder", "DESTINATION": "Destination", "START": "Start", - "EXPORT_IN_PROGRESS": "Export in progress...", - "PAUSE": "Pause", - "RESUME": "Resume", - "MINIMIZE": "Minimize", "LAST_EXPORT_TIME": "Last export time", - "SUCCESSFULLY_EXPORTED_FILES": "Successful exports", - "FAILED_EXPORTED_FILES": "Failed exports", "EXPORT_AGAIN": "Resync", - "RETRY_EXPORT": "Retry failed exports", "LOCAL_STORAGE_NOT_ACCESSIBLE": "Local storage not accessible", "LOCAL_STORAGE_NOT_ACCESSIBLE_MESSAGE": "Your browser or an addon is blocking ente from saving data into local storage. please try loading this page after switching your browsing mode.", - "RETRY": "Retry", "SEND_OTT": "Send OTP", "EMAIl_ALREADY_OWNED": "Email already taken", - "EMAIL_UDPATE_SUCCESSFUL": "Your email has been updated successfully", - "UPLOAD_FAILED": "Upload failed", "ETAGS_BLOCKED": "

We were unable to upload the following files because of your browser configuration.

Please disable any addons that might be preventing ente from using eTags to upload large files, or use our desktop app for a more reliable import experience.

", "SKIPPED_VIDEOS_INFO": "

Presently we do not support adding videos via public links.

To share videos, please signup for ente and share with the intended recipients using their email.

", "LIVE_PHOTOS_DETECTED": "The photo and video files from your Live Photos have been merged into a single file", @@ -339,7 +286,6 @@ "THUMBNAIL_GENERATION_FAILED_INFO": "These files were uploaded, but unfortunately we could not generate the thumbnails for them.", "UPLOAD_TO_COLLECTION": "Upload to album", "UNCATEGORIZED": "Uncategorized", - "MOVE_TO_UNCATEGORIZED": "Move to uncategorized", "ARCHIVE": "Archive", "ARCHIVE_COLLECTION": "Archive album", "ARCHIVE_SECTION_NAME": "Archive", @@ -349,10 +295,8 @@ "UNARCHIVE_COLLECTION": "Unarchive album", "MOVE": "Move", "ADD": "Add", - "SORT": "Sort", "REMOVE": "Remove", "YES_REMOVE": "Yes, remove", - "CONFIRM_REMOVE": "Confirm removal", "REMOVE_FROM_COLLECTION": "Remove from album", "TRASH": "Trash", "MOVE_TO_TRASH": "Move to trash", @@ -360,8 +304,6 @@ "TRASH_FILE_MESSAGE": "The file will be removed from all albums and moved to trash.", "DELETE_PERMANENTLY": "Delete permanently", "RESTORE": "Restore", - "CONFIRM_RESTORE": "Confirm restoration", - "RESTORE_MESSAGE": "Restore selected files ?", "RESTORE_TO_COLLECTION": "Restore to album", "EMPTY_TRASH": "Empty trash", "EMPTY_TRASH_TITLE": "Empty trash?", @@ -374,7 +316,6 @@ "CONFIRM_SELF_REMOVE_MESSAGE": "Selected items will be removed from this album. Items which are only in this album will be moved to Uncategorized.", "CONFIRM_SELF_AND_OTHER_REMOVE_MESSAGE": "Some of the items you are removing were added by other people, and you will lose access to them.", "SORT_BY_CREATION_TIME_ASCENDING": "Oldest", - "SORT_BY_CREATION_TIME_DESCENDING": "Newest", "SORT_BY_UPDATION_TIME_DESCENDING": "Last updated", "SORT_BY_NAME": "Name", "COMPRESS_THUMBNAILS": "Compress thumbnails", @@ -391,21 +332,13 @@ "UPDATE_CREATION_TIME_NOT_STARTED": "Select the option you want to use", "UPDATE_CREATION_TIME_COMPLETED": "Successfully updated all files", "UPDATE_CREATION_TIME_COMPLETED_WITH_ERROR": "File time updation failed for some files, please retry", - "FILE_NAME_CHARACTER_LIMIT": "100 characters max", "CAPTION_CHARACTER_LIMIT": "5000 characters max", "DATE_TIME_ORIGINAL": "EXIF:DateTimeOriginal", "DATE_TIME_DIGITIZED": "EXIF:DateTimeDigitized", "CUSTOM_TIME": "Custom time", "REOPEN_PLAN_SELECTOR_MODAL": "Re-open plans", "OPEN_PLAN_SELECTOR_MODAL_FAILED": "Failed to open plans", - "COMMENT": "Comment", - "ABUSE_REPORT_DESCRIPTION": "Submitting this report will notify the album owner.", - "OTHER_REASON_REQUIRES_COMMENTS": "Reason = other, require a mandatory comment ", - "REPORT_SUBMIT_SUCCESS_CONTENT": "Your report has been submitted", - "REPORT_SUBMIT_SUCCESS_TITLE": "Report sent", - "REPORT_SUBMIT_FAILED": "Failed to sent report, try again", "INSTALL": "Install", - "ALBUM_URL": "Album url", "SHARING_DETAILS": "Sharing details", "MODIFY_SHARING": "Modify sharing", "NOT_FOUND": "404 - not found", @@ -413,8 +346,6 @@ "LINK_EXPIRED_MESSAGE": "This link has either expired or been disabled!", "MANAGE_LINK": "Manage link", "LINK_TOO_MANY_REQUESTS": "This album is too popular for us to handle!", - "DISABLE_PUBLIC_SHARING": "Disable public sharing", - "DISABLE_PUBLIC_SHARING_MESSAGE": "Are you sure you want to disable public sharing?", "FILE_DOWNLOAD": "Allow downloads", "LINK_PASSWORD_LOCK": "Password lock", "PUBLIC_COLLECT": "Allow adding photos", @@ -423,26 +354,8 @@ "LINK_EXPIRY_NEVER": "Never", "DISABLE_FILE_DOWNLOAD": "Disable download", "DISABLE_FILE_DOWNLOAD_MESSAGE": "

Are you sure that you want to disable the download button for files?

Viewers can still take screenshots or save a copy of your photos using external tools.

", - "ABUSE_REPORT": "Abuse report", - "ABUSE_REPORT_BUTTON_TEXT": "Report abuse?", "MALICIOUS_CONTENT": "Contains malicious content", "COPYRIGHT": "Infringes on the copyright of someone I am authorized to represent", - "ENTER_EMAIL_ADDRESS": "Email*", - "SELECT_REASON": "Select a reason*", - "ENTER_FULL_NAME": "Full name*", - "ENTER_DIGITAL_SIGNATURE": "Typing your full name in this box will act as your digital signature*", - "ENTER_ON_BEHALF_OF": "I am reporting on behalf of*", - "ENTER_ADDRESS": "Address*", - "ENTER_JOB_TITLE": "Job title*", - "ENTER_CITY": "City*", - "ENTER_PHONE": "Phone number*", - "ENTER_STATE": "State*", - "ENTER_POSTAL_CODE": "Zip/postal code*", - "ENTER_COUNTRY": "Country*", - "JUDICIAL_DESCRIPTION": "By checking the following boxes, I state UNDER PENALTY OF PERJURY of law that:", - "TERM_1": "I hereby state that I have a good faith belief that the sharing of copyrighted material at the location above is not authorized by the copyright owner, its agent, or the law (e.g., as a fair use). ", - "TERM_2": "I hereby state that the information in this Notice is accurate and, under penalty of perjury, that I am the owner, or authorized to act on behalf of, the owner, of the copyright or of an exclusive right under the copyright that is allegedly infringed. ", - "TERM_3": "I acknowledge that any person who knowingly materially misrepresents that material or activity is infringing may be subject to liability for damages. ", "SHARED_USING": "Shared using ", "ENTE_IO": "ente.io", "LIVE": "LIVE", @@ -451,11 +364,9 @@ "PASSWORD_LOCK": "Password lock", "LOCK": "Lock", "DOWNLOAD_UPLOAD_LOGS": "Debug logs", - "CHOOSE_UPLOAD_TYPE": "Upload", "UPLOAD_FILES": "File", "UPLOAD_DIRS": "Folder", "UPLOAD_GOOGLE_TAKEOUT": "Google takeout", - "CANCEL_UPLOADS": "Cancel uploads", "DEDUPLICATE_FILES": "Deduplicate files", "NO_DUPLICATES_FOUND": "You've no duplicate files that can be cleared", "CLUB_BY_CAPTURE_TIME": "Club by capture time", @@ -468,11 +379,8 @@ "YES_STOP_UPLOADS": "Yes, stop uploads", "albums_one": "1 Album", "albums_other": "{{count}} Albums", - "NEW": "New", - "VIEW_ALL_ALBUMS": "View all Albums", "ALL_ALBUMS": "All Albums", "ALBUMS": "Albums", - "ENDS": "Ends", "ENTER_TWO_FACTOR_OTP": "Enter the 6-digit code from your authenticator app.", "CREATE_ACCOUNT": "Create account", "COPIED": "Copied", @@ -528,7 +436,6 @@ "IGNORE_THIS_VERSION": "Ignore this version", "TODAY": "Today", "YESTERDAY": "Yesterday", - "AT": "at", "NAME_PLACEHOLDER": "Name...", "ROOT_LEVEL_FILE_WITH_FOLDER_NOT_ALLOWED": "Cannot create albums from file/folder mix", "ROOT_LEVEL_FILE_WITH_FOLDER_NOT_ALLOWED_MESSAGE": "

You have dragged and dropped a mixture of files and folders.

Please provide either only files, or only folders when selecting option to create separate albums

", diff --git a/scripts/purge_unused_strings.sh b/scripts/purge_unused_strings.sh new file mode 100755 index 000000000..246cefbbd --- /dev/null +++ b/scripts/purge_unused_strings.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Set the path to the JSON file and folder +json_file_path="./public/locales/en/translation.json" +folder_path="./src" +tab_width=4 + +# Check if jq and grep are installed +if ! command -v jq &> /dev/null || ! command -v grep &> /dev/null +then + echo "jq or grep command not found. Please install jq and grep." + exit +fi + +# Recursive function to check for keys in nested JSON objects +check_keys() { + local keys="$1" + local parent_key="$2" + for key in $keys + do + local full_key="" + if [[ -z $parent_key ]]; then + full_key="$key" + else + full_key="$parent_key.$key" + fi + local children_keys=$(jq -r --arg key "$key" 'select(.[$key] | type == "object") | .[$key] | keys[]' "$json_file_path") + if [ -n "$children_keys" ]; then + # check first if the key is not in the ignore list + check_keys "$children_keys" "$full_key" + else + if ! grep -rqE "'$full_key'|\"$full_key\"" "$folder_path"; then + # Remove the key from the JSON file + # echo the command to remove the key from the JSON file + jq "del(.$(echo $full_key | sed 's/\./"."/g' | sed 's/^/"/' | sed 's/$/"/'))" "$json_file_path" > "$json_file_path.tmp" && mv "$json_file_path.tmp" "$json_file_path" + echo "Removing key \"$full_key\" from the JSON file" + else + echo "Key \"$full_key\" is being used." + fi + fi + done +} + +# Get the top-level keys from the JSON file +keys=$(jq -r 'keys[]' "$json_file_path") + +# Loop through the keys and recursively check for nested keys +check_keys "$keys" "" + +# Format the updated JSON using the specified tab width +jq --indent "$tab_width" '.' "$json_file_path" > "$json_file_path.tmp" && mv "$json_file_path.tmp" "$json_file_path" + + + + +echo "Done checking for missing keys." diff --git a/src/components/ChangeEmail.tsx b/src/components/ChangeEmail.tsx index f127059f9..b753393ca 100644 --- a/src/components/ChangeEmail.tsx +++ b/src/components/ChangeEmail.tsx @@ -41,7 +41,7 @@ function ChangeEmailForm() { ottInputRef.current?.focus(); }, 250); } catch (e) { - setFieldError('email', t('EMAIl_ALREADY_OWNED}')); + setFieldError('email', t('EMAIl_ALREADY_OWNED')); } setLoading(false); };