Skip to content

fix(sync): name the export action, and stop shipping a raw i18n key - #529

Merged
axpnet merged 1 commit into
mainfrom
fix/sync-template-export-labels
Jul 30, 2026
Merged

fix(sync): name the export action, and stop shipping a raw i18n key#529
axpnet merged 1 commit into
mainfrom
fix/sync-template-export-labels

Conversation

@axpnet

@axpnet axpnet commented Jul 30, 2026

Copy link
Copy Markdown
Member

Two defects in the AeroSync Templates dialog, both on screen, both found while verifying #514 in the running app rather than by reading the code.

The raw key

The Bash format radio shipped as Bash script (.sh)(common.default).

common.default was never a key in en.json, and the call site's guard could not save it:

({t('common.default') || 'default'})

t() returns the key itself when it misses, and a non-empty string is truthy, so the || branch was unreachable by construction. The app logged [i18n] Missing translation: common.default on every render of the dialog while the user read the key on screen.

The key is added and translated across all 46 non-English locales, and the dead guard is removed rather than left in place implying a safety it never provided.

The button that named a format instead of an action

exportButtonLabel fell back to syncPanel.templateFormatBash and syncPanel.templateFormatPwsh for the two script formats. Those are the exact strings used by the format radios, so the dialog presented two identical Bash script (.sh) controls, and the only one that did anything read as one more format to pick.

It now reads Export script for the three script formats and Export Template for .aerosync. Both are keys that already existed and are already translated, so this adds no new string beyond common.default.

Verified in the app

Driven headlessly through the WebKit inspector against a connected SFTP remote, reading the labels back from the live DOM:

Format selected Action button
.aeroftp-script Export script
.aerosync Export Template
Bash Export script
PowerShell Export script

and the Bash radio now reads Bash script (.sh)(Default).

Gates

tsc --noEmit clean, vitest 592/592, vite build clean, i18n:validate 47/47 with 0 placeholders and 0 orphan keys. No Rust touched.

Summary by CodeRabbit

  • Bug Fixes

    • Export actions now display the correct label based on the selected format.
    • Format options consistently show the localized “Default” hint.
  • Localization

    • Added localized “Default” labels across supported languages.

Two defects in the AeroSync Templates dialog, both visible on screen and both found while verifying #514 in the running app.

The Bash format was labelled `Bash script (.sh)(common.default)`. The key `common.default` never existed in `en.json`, and the `|| 'default'` guard at the call site could not save it: `t()` returns the key itself on a miss, and a key is truthy, so the fallback was unreachable by construction. The key is added here and translated in all 46 locales, and the dead guard is gone rather than left to imply a safety it never provided.

The export button named the format instead of the action. For bash and PowerShell it fell back to `templateFormatBash` and `templateFormatPwsh`, the same strings as the format radios, so the dialog showed two identical `Bash script (.sh)` controls and the only one that did anything read as one more format to choose from. It now says `Export script` for the three script formats and `Export Template` for `.aerosync`, which are both existing keys.

Verified in the running app through the WebKit inspector, against a connected SFTP remote: the Bash radio reads `Bash script (.sh)(Default)`, and the action button reads `Export script` for `.aeroftp-script`, bash and PowerShell, `Export Template` for `.aerosync`.

Gates: tsc clean, vitest 592/592, vite build clean, i18n:validate 47/47 with 0 placeholders and 0 orphans.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@snyk-io

snyk-io Bot commented Jul 30, 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

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

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 55065c70-7e3f-43cd-86ab-118e5b4c2dd2

📥 Commits

Reviewing files that changed from the base of the PR and between 6b748fe and a1c8277.

📒 Files selected for processing (48)
  • src/components/Sync/SyncTemplateDialog.tsx
  • src/i18n/locales/bg.json
  • src/i18n/locales/bn.json
  • src/i18n/locales/ca.json
  • src/i18n/locales/cs.json
  • src/i18n/locales/cy.json
  • src/i18n/locales/da.json
  • src/i18n/locales/de.json
  • src/i18n/locales/el.json
  • src/i18n/locales/en.json
  • src/i18n/locales/es.json
  • src/i18n/locales/et.json
  • src/i18n/locales/eu.json
  • src/i18n/locales/fi.json
  • src/i18n/locales/fr.json
  • src/i18n/locales/gl.json
  • src/i18n/locales/hi.json
  • src/i18n/locales/hr.json
  • src/i18n/locales/hu.json
  • src/i18n/locales/hy.json
  • src/i18n/locales/id.json
  • src/i18n/locales/is.json
  • src/i18n/locales/it.json
  • src/i18n/locales/ja.json
  • src/i18n/locales/ka.json
  • src/i18n/locales/km.json
  • src/i18n/locales/ko.json
  • src/i18n/locales/lt.json
  • src/i18n/locales/lv.json
  • src/i18n/locales/mk.json
  • src/i18n/locales/ms.json
  • src/i18n/locales/nl.json
  • src/i18n/locales/no.json
  • src/i18n/locales/pl.json
  • src/i18n/locales/pt.json
  • src/i18n/locales/ro.json
  • src/i18n/locales/ru.json
  • src/i18n/locales/sk.json
  • src/i18n/locales/sl.json
  • src/i18n/locales/sr.json
  • src/i18n/locales/sv.json
  • src/i18n/locales/sw.json
  • src/i18n/locales/th.json
  • src/i18n/locales/tl.json
  • src/i18n/locales/tr.json
  • src/i18n/locales/uk.json
  • src/i18n/locales/vi.json
  • src/i18n/locales/zh.json

📝 Walkthrough

Walkthrough

The Sync template dialog now simplifies export button label selection and uses a translated default hint. The common default translation is added across the updated locale files.

Changes

Sync export localization

Layer / File(s) Summary
Simplify Sync export labels
src/components/Sync/SyncTemplateDialog.tsx
AeroSync formats use the template export label, while other formats use the AeroSync script label; default hints now rely directly on common.default.
Add default translations
src/i18n/locales/*.json
The common translation namespace now includes localized default labels across the updated locales.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the two main changes: renaming the export action and adding the missing i18n default key.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sync-template-export-labels

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@axpnet

axpnet commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 56 minutes.

@axpnet

axpnet commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@axpnet
axpnet merged commit 669814f into main Jul 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant