fix(launch): use a clear cancel label in the shortlink confirmation dialog#1677
fix(launch): use a clear cancel label in the shortlink confirmation dialog#1677giladresisi wants to merge 1 commit into
Conversation
…ialog
The shortlink question dialog used the generic "No, cancel!" cancel
label, which reads as aborting the whole post instead of declining
shortlinks. Pass a custom cancel label ("No, original URLs") via the
existing deleteDialog cancelButton param.
Adds the no_original_urls key to the English source, translates it to
all 14 lingo.dev locales, and hand-fixes 8 machine translations that
rendered the label as "there are no original URLs" instead of a choice.
Manually tested locally: the dialog now shows "Yes, shortlink it!" /
"No, original URLs", and both choices schedule the post with/without
shortlinked URLs accordingly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Contribution-checker quality warning Heuristics that flagged:
If this is a genuine contribution, please add detail to your PR description and tighten the diff scope before reviewers look at it. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| t('yes_shortlink_it', 'Yes, shortlink it!'), | ||
| undefined, | ||
| t('no_original_urls', 'No, original URLs') |
There was a problem hiding this comment.
Bug: The translation key no_original_urls is missing for the Georgian (ka_ge) locale, causing an English fallback string to be displayed on a button for Georgian users.
Severity: LOW
Suggested Fix
Add the missing no_original_urls key with its corresponding Georgian translation to the libraries/react-shared-libraries/src/translation/locales/ka_ge/translation.json file to ensure consistent localization.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: apps/frontend/src/components/new-launch/manage.modal.tsx#L378-L380
Potential issue: The translation key `no_original_urls` is missing from the Georgian
locale file (`ka_ge/translation.json`). The code at the specified location calls
`i18next.t('no_original_urls', 'No, original URLs')`, providing a hardcoded English
string as a fallback. For users with their language set to Georgian, the system fails to
find the translation key and defaults to this English text. This results in a
mixed-language user experience within the shortlink confirmation dialog, where the
cancel button appears in English while the rest of the UI is in Georgian.
Did we get this right? 👍 / 👎 to inform future reviews.
Problem
When scheduling a post with links, the "Do you want to shortlink the URLs?" confirmation dialog answered with "Yes, shortlink it!" / "No, cancel!". The cancel label is misleading — it reads like it aborts posting altogether, when it actually just posts with the original URLs.
Changes
manage.modal.tsx, using the existing (previously unused there)cancelButtonparameter ofdeleteDialog. All otherdeleteDialogusages keep the default "No, cancel!".no_original_urlskey to the English source translations and run lingo.dev to translate it across all 14 target locales (i18n.lockupdated).Testing
Manually tested locally: the dialog now shows "Yes, shortlink it!" / "No, original URLs", and both choices schedule the post with/without shortlinked URLs respectively. All 16 locale JSON files verified to parse.
🤖 Generated with Claude Code