Skip to content

fix(launch): use a clear cancel label in the shortlink confirmation dialog#1677

Open
giladresisi wants to merge 1 commit into
mainfrom
fix/shortlink-dialog-cancel-label
Open

fix(launch): use a clear cancel label in the shortlink confirmation dialog#1677
giladresisi wants to merge 1 commit into
mainfrom
fix/shortlink-dialog-cancel-label

Conversation

@giladresisi

Copy link
Copy Markdown
Collaborator

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

  • Pass a custom cancel label — "No, original URLs" — at the shortlink call site in manage.modal.tsx, using the existing (previously unused there) cancelButton parameter of deleteDialog. All other deleteDialog usages keep the default "No, cancel!".
  • Add the no_original_urls key to the English source translations and run lingo.dev to translate it across all 14 target locales (i18n.lock updated).
  • Hand-fix 8 machine translations (ja, ko, ar, tr, zh, bn, ru, vi) that rendered the label as a statement of absence ("there are no original URLs") instead of a choice ("No, keep the original URLs"), matching each locale's existing button-label style.

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

…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>
@postiz-contribution postiz-contribution Bot added the contribution:approved Approved contributor label Jul 5, 2026
@postiz-contribution

Copy link
Copy Markdown

Contribution-checker quality warning
Heuristic score: 20/100 (low). This is a non-blocking warning surfaced by the project's quality settings.

Heuristics that flagged:

  • Excessive inline code references: 6 inline refs (>3)
  • PR doesn't use the repo's PR template: 5 required checkbox items missing (max 1, match ≥80%)
  • Body adds too many extra headers beyond the template: 3 extra headers (>1)
  • AI watermark phrase: Matched: "Generated with Claude Code"
  • Commit message too long: Longest: 758 chars

If this is a genuine contribution, please add detail to your PR description and tighten the diff scope before reviewers look at it.

@postiz-agent

postiz-agent Bot commented Jul 5, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Comment on lines +378 to +380
t('yes_shortlink_it', 'Yes, shortlink it!'),
undefined,
t('no_original_urls', 'No, original URLs')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution:approved Approved contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant