-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing Unused Translation Strings #7437
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@AaronPresley is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
5aa25ed
to
9bd781e
Compare
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 This PR introduced no changes to the javascript bundle 🙌 |
i wonder, do we need this script in the repo or can we just run this every 4 months manually? |
@PeerRich up to you, but I assume you'd prefer to be able to run this script regardless of my ongoing direct involvement in the project. It's a pretty simple script with no new dependencies that weren't already being used ( |
# Conflicts: # apps/web/public/static/locales/ar/common.json # apps/web/public/static/locales/cs/common.json # apps/web/public/static/locales/da/common.json # apps/web/public/static/locales/de/common.json # apps/web/public/static/locales/es/common.json # apps/web/public/static/locales/fr/common.json # apps/web/public/static/locales/he/common.json # apps/web/public/static/locales/id/common.json # apps/web/public/static/locales/it/common.json # apps/web/public/static/locales/ja/common.json # apps/web/public/static/locales/ko/common.json # apps/web/public/static/locales/nl/common.json # apps/web/public/static/locales/no/common.json # apps/web/public/static/locales/pl/common.json # apps/web/public/static/locales/pt-BR/common.json # apps/web/public/static/locales/pt/common.json # apps/web/public/static/locales/ro/common.json # apps/web/public/static/locales/ru/common.json # apps/web/public/static/locales/sr/common.json # apps/web/public/static/locales/sv/common.json # apps/web/public/static/locales/tr/common.json # apps/web/public/static/locales/uk/common.json # apps/web/public/static/locales/vi/common.json # apps/web/public/static/locales/zh-CN/common.json # apps/web/public/static/locales/zh-TW/common.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nitpicks but overall pretty nice! Thank you for your contribution 🙏 @AaronPresley
"confirmed_event_type_subject": "Confirmed: {{eventType}} with {{name}} at {{date}}", | ||
"new_event_request": "New event request: {{attendeeName}} - {{date}} - {{eventType}}", | ||
"confirm_or_reject_request": "Confirm or reject the request", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is being used in organizer-request-email.ts
"event_type_has_been_rescheduled_on_time_date": "Your {{title}} has been rescheduled to {{date}}.", | ||
"event_has_been_rescheduled": "Updated - Your event has been rescheduled", | ||
"request_reschedule_title_attendee": "Request to reschedule your booking", | ||
"request_reschedule_subtitle": "{{organizer}} has cancelled the booking and requested you to pick another time.", | ||
"request_reschedule_title_organizer": "You have requested {{attendee}} to reschedule", | ||
"request_reschedule_subtitle_organizer": "You have cancelled the booking and {{attendee}} should pick a new booking time with you.", | ||
"rescheduled_event_type_subject": "Request for reschedule sent: {{eventType}} with {{name}} at {{date}}", | ||
"requested_to_reschedule_subject_attendee": "Action Required Reschedule: Please book a new time for {{eventType}} with {{name}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is being used in attendee-was-requested-to-reschedule-email.ts
"create_account": "Create Account", | ||
"confirm_password": "Confirm password", | ||
"create_your_account": "Create your account", | ||
"sign_up": "Sign up", | ||
"youve_been_logged_out": "You've been logged out", | ||
"hope_to_see_you_soon": "We hope to see you again soon!", | ||
"logged_out": "Logged out", | ||
"please_try_again_and_contact_us": "Please try again and contact us if the issue persists.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is used in two files
"create_account": "Create Account", | ||
"confirm_password": "Confirm password", | ||
"create_your_account": "Create your account", | ||
"sign_up": "Sign up", | ||
"youve_been_logged_out": "You've been logged out", | ||
"hope_to_see_you_soon": "We hope to see you again soon!", | ||
"logged_out": "Logged out", | ||
"please_try_again_and_contact_us": "Please try again and contact us if the issue persists.", | ||
"incorrect_2fa_code": "Two-factor code is incorrect.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also used in two files ( /pages/auth, /pages/settings/my-account)
"finish": "Finish", | ||
"few_sentences_about_yourself": "A few sentences about yourself. This will appear on your personal url page.", | ||
"nearly_there": "Nearly there!", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used in /getting-started
"finish": "Finish", | ||
"few_sentences_about_yourself": "A few sentences about yourself. This will appear on your personal url page.", | ||
"nearly_there": "Nearly there!", | ||
"nearly_there_instructions": "Last thing, a brief description about you and a photo really help you get bookings and let people know who they’re booking with.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also used in /gettting-started
"nearly_there": "Nearly there!", | ||
"nearly_there_instructions": "Last thing, a brief description about you and a photo really help you get bookings and let people know who they’re booking with.", | ||
"set_availability_instructions": "Define ranges of time when you are available on a recurring basis. You can create more of these later and assign them to different calendars.", | ||
"set_availability": "Set your availability", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used in /getting-started
"set_availability_instructions": "Define ranges of time when you are available on a recurring basis. You can create more of these later and assign them to different calendars.", | ||
"set_availability": "Set your availability", | ||
"continue_without_calendar": "Continue without calendar", | ||
"connect_your_calendar": "Connect your calendar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used in getting-started
"event_is_in_the_past": "The event is in the past", | ||
"cancelling_event_recurring": "The event is one instance of a recurring event.", | ||
"cancelling_all_recurring": "These are all remaining instances in the recurring event.", | ||
"error_with_status_code_occured": "An error with status code {{status}} occurred.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also being used
"installed_app_calendar_description": "Set the calendars to check for conflicts to prevent double bookings.", | ||
"installed_app_conferencing_description": "Add your favourite video conferencing apps for your meetings", | ||
"installed_app_payment_description": "Configure which payment processing services to use when charging your clients.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key has not beein deleted from other translation files
"installed_app_calendar_description": "Set the calendars to check for conflicts to prevent double bookings.", | ||
"installed_app_conferencing_description": "Add your favourite video conferencing apps for your meetings", | ||
"installed_app_payment_description": "Configure which payment processing services to use when charging your clients.", | ||
"installed_app_analytics_description": "Configure which analytics apps to use for your booking pages", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key has not beein deleted from other translation files
"installed_app_conferencing_description": "Add your favourite video conferencing apps for your meetings", | ||
"installed_app_payment_description": "Configure which payment processing services to use when charging your clients.", | ||
"installed_app_analytics_description": "Configure which analytics apps to use for your booking pages", | ||
"installed_app_other_description": "All your installed apps from other categories.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key has not beein deleted from other translation files
"installed_app_payment_description": "Configure which payment processing services to use when charging your clients.", | ||
"installed_app_analytics_description": "Configure which analytics apps to use for your booking pages", | ||
"installed_app_other_description": "All your installed apps from other categories.", | ||
"installed_app_automation_description": "Configure which automation apps to use", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key has not beein deleted from other translation files
"installed_app_analytics_description": "Configure which analytics apps to use for your booking pages", | ||
"installed_app_other_description": "All your installed apps from other categories.", | ||
"installed_app_automation_description": "Configure which automation apps to use", | ||
"installed_app_web3_description": "Configure which web3 apps to use for your booking pages", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key has not beein deleted from other translation files
"trigger": "Trigger", | ||
"triggers": "Triggers", | ||
"action": "Action", | ||
"workflows_to_automate_notifications": "Create workflows to automate notifications and reminders", | ||
"workflow_name": "Workflow name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"email_body": "Email body", | ||
"subject": "Email subject", | ||
"text_message": "Text message", | ||
"specific_issue": "Have a specific issue?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"rainbow_connect_wallet_gate": "Connect your wallet if you own <1>{{name}}</1> (<3>{{symbol}}</3>).", | ||
"rainbow_insufficient_balance": "Your connected wallet doesn't contain enough <1>{{symbol}}</1>.", | ||
"rainbow_sign_message_request": "Sign the message request on your wallet.", | ||
"rainbow_signature_error": "Error requesting signature from your wallet.", | ||
"token_address": "Token Address", | ||
"blockchain": "Blockchain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"old_password": "Old password", | ||
"secure_password": "Your new super secure password", | ||
"error_updating_password": "Error updating password", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"general_description": "Manage settings for your language and timezone", | ||
"calendars_description": "Configure how your event types interact with your calendars", | ||
"appearance_description": "Manage settings for your booking appearance", | ||
"conferencing_description": "Add your favourite video conferencing apps for your meetings", | ||
"password_description": "Manage settings for your account passwords", | ||
"2fa_description": "Manage settings for your account passwords", | ||
"we_just_need_basic_info": "We just need some basic info to get your profile setup.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"we_just_need_basic_info": "We just need some basic info to get your profile setup.", | ||
"skip": "Skip", | ||
"do_this_later": "Do this later", | ||
"set_availability_getting_started_subtitle_1": "Define ranges of time when you are available", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"skip": "Skip", | ||
"do_this_later": "Do this later", | ||
"set_availability_getting_started_subtitle_1": "Define ranges of time when you are available", | ||
"set_availability_getting_started_subtitle_2": "You can customise all of this later in the availability page.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
@@ -1272,11 +838,7 @@ | |||
"workflow_example_4": "Send email reminder 1 hour before events starts to attendee", | |||
"workflow_example_5": "Send custom email when event is rescheduled to host", | |||
"workflow_example_6": "Send custom SMS when new event is booked to host", | |||
"welcome_to_cal_header": "Welcome to {{appName}}!", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is being used
@@ -1272,11 +838,7 @@ | |||
"workflow_example_4": "Send email reminder 1 hour before events starts to attendee", | |||
"workflow_example_5": "Send custom email when event is rescheduled to host", | |||
"workflow_example_6": "Send custom SMS when new event is booked to host", | |||
"welcome_to_cal_header": "Welcome to {{appName}}!", | |||
"edit_form_later_subtitle": "You’ll be able to edit this later.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key is being used
@@ -1272,11 +838,7 @@ | |||
"workflow_example_4": "Send email reminder 1 hour before events starts to attendee", | |||
"workflow_example_5": "Send custom email when event is rescheduled to host", | |||
"workflow_example_6": "Send custom SMS when new event is booked to host", | |||
"welcome_to_cal_header": "Welcome to {{appName}}!", | |||
"edit_form_later_subtitle": "You’ll be able to edit this later.", | |||
"connect_calendar_later": "I'll connect my calendar later", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"create_first_api_key": "Create your first API key", | ||
"create_first_api_key_description": "API keys allow other apps to communicate with {{appName}}", | ||
"back_to_signin": "Back to sign in", | ||
"reset_link_sent": "Reset link sent", | ||
"password_reset_email": "An email is on it’s way to {{email}} with instructions to reset your password.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"create_first_api_key": "Create your first API key", | ||
"create_first_api_key_description": "API keys allow other apps to communicate with {{appName}}", | ||
"back_to_signin": "Back to sign in", | ||
"reset_link_sent": "Reset link sent", | ||
"password_reset_email": "An email is on it’s way to {{email}} with instructions to reset your password.", | ||
"password_reset_leading": "If you don't receive an email soon, check that the email address you entered is correct, check your spam folder or reach out to support if the issue persists.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
@@ -1515,12 +1034,9 @@ | |||
"minimum_round_robin_hosts_count": "Number of hosts required to attend", | |||
"hosts": "Hosts", | |||
"upgrade_to_enable_feature": "You need to create a team to enable this feature. Click to create a team.", | |||
"new_attendee": "New Attendee", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
@@ -1515,12 +1034,9 @@ | |||
"minimum_round_robin_hosts_count": "Number of hosts required to attend", | |||
"hosts": "Hosts", | |||
"upgrade_to_enable_feature": "You need to create a team to enable this feature. Click to create a team.", | |||
"new_attendee": "New Attendee", | |||
"awaiting_approval": "Awaiting Approval", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
"requires_google_calendar": "This app requires a Google Calendar connection", | ||
"connected_google_calendar": "You have connected a Google Calendar account.", | ||
"using_meet_requires_calendar": "Using Google Meet requires a connected Google Calendar", | ||
"continue_to_install_google_calendar": "Continue to install Google Calendar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key is being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a lot of keys that are being used in the code but removed in the en.json file.
great catch @Udit-takkar! @AaronPresley can you check why your script falsely removed the used string? |
This PR currently has a merge conflict. Please resolve this and then re-add the |
Hello, all 👋 Firstly, huge thanks to @Udit-takkar for your thorough review. I did find instances where my script was incorrectly identifying a string as "missing" when it was in fact being used. I've updated my script to include a much more thorough review of the codebase and identify other areas where a given key could be used in other ways. Unfortunately, a script like this is always imperfect. Ultimately it requires looking into each individual key and make a judgement whether it's proper to remove. A huge change like this also causes a lot of potential merge conflicts which continue to pile on. Unfortunately I don't have the time or capacity to finish out this change, and for that I apologize. Therefore I'll be closing this PR. However, I have created Issue #7646 which includes a summary of my script's findings in greater detail. My hope is that by making this information available as an Issue, it will be easier to make small improvements over time (vs a passive PR that's very difficult to review). Please check out the issue for further details, and a better breakdown on where and how a given key is being used through the codebase. And one more thanks to @Udit-takkar for the time you took to review this PR 🙏 |
@AaronPresley Thanks for trying! I was keeping an eye on this to ensure I could review it rapidly as it is conflicting immediately otherwise - but I agree with your point and realise how hard this is; We'll take it from here 🙌 |
What does this PR do?
This PR introduces a new script that checks whether the primary language's translation file(s) have a translation string that's not being used within the codebase itself. This script does not automatically run, and is simply intended to be run periodically.
Also part of this PR is the removal of the 485 unused keys that the script detected.
🎉 485 unused keys * 34 supported languages = 16,490 total keys that no longer have to be managed 🎉
See this README.md for full script documentation.
Environment: Production
Type of change
How should this be tested?