Skip to content

fix(ssh-auth-sock): warn when override path looks bogus#1439

Merged
annejan merged 3 commits into
mainfrom
fix/ssh-auth-sock-override-warn
May 9, 2026
Merged

fix(ssh-auth-sock): warn when override path looks bogus#1439
annejan merged 3 commits into
mainfrom
fix/ssh-auth-sock-override-warn

Conversation

@annejan
Copy link
Copy Markdown
Member

@annejan annejan commented May 9, 2026

Summary

Two reviewer findings on the SSH_AUTH_SOCK override (post-merge of #1438):

  • src/util.h — clarify that "no validation" applies to the runtime env-setup step, and note that the Settings dialog now does a soft check at save time.
  • src/configdialog.cpp — when the user types a non-empty override and saves, soft-check the path before writing the setting:
    • QFileInfo::exists() + isReadable()
    • on Unix, stat() + S_ISSOCK to confirm it's a Unix domain socket (Windows ssh-agent uses a named pipe — skipped there)
    • If any check fails, a non-blocking QMessageBox::warning tells the user the path looks invalid and that the value will still be saved as entered.

The runtime probe in Util::initialiseSshAuthSock() is unchanged — it still uses the override verbatim, no ssh-add validation. This preserves the "QtPass trusts the user choice" stance (e.g. agent started after QtPass launches) while giving immediate feedback on typos.

Test plan

  • qmake6 && make -j4 clean
  • tests/auto/util/tst_util — 113 passed (no behavioural change to runtime probe; existing initialiseSshAuthSockOverrideSkipsAgentValidation still asserts the no-validation contract)
  • doxygen Doxyfile — zero warnings
  • clang-format applied
  • lupdate ran (4 new tr() strings: dialog title, 3 reasons, body template)
  • Manual UI test: type a bogus path, verify warning shows + setting persists; type a real socket, verify no warning

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Localization
    • Updated translation catalogs across many languages.
    • Refreshed Config dialog text: clipboard options, required-field validation, profile/password-store prompts, GnuPG install guidance, system tray and dependency notices.
    • Added new validation/warning messages for SSH agent override and path/socket checks (some translations pending).
    • Extended coverage for import/export/keygen dialogs, main window actions, search and user-management strings.

Two reviewer findings on the SSH_AUTH_SOCK override path (post-merge of
#1438):

- src/util.h: doc tweak — clarify that the "no validation" line refers
  to the runtime environment-setup step. The Settings dialog now does a
  soft check at save time.

- src/configdialog.cpp: when the user types a non-empty override and
  saves, do a soft check before writing the setting:
  - QFileInfo::exists() and isReadable()
  - on Unix, stat() + S_ISSOCK to confirm it's a Unix domain socket
    (Windows ssh-agent uses a named pipe, so we skip the socket check
    there)

  When any check fails, show a non-blocking QMessageBox::warning telling
  the user the path looks invalid and that the value will still be saved
  as entered. This preserves the "QtPass trusts the user choice" stance
  (e.g. user might start their agent after launching QtPass) while
  giving immediate feedback on typos. The runtime probe in
  Util::initialiseSshAuthSock() is unchanged — it still uses the
  override verbatim, no ssh-add validation, matching the existing
  contract.

No new tests: the warning is a UI-side soft check on data the user just
typed, with no side effects beyond the dialog. The existing
initialiseSshAuthSockOverrideSkipsAgentValidation test continues to
verify the runtime "no validation" contract.

lupdate refreshed the .ts files to pick up the four new tr() strings
(dialog title + 3 reasons + body template).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

Retargets many locale .ts UI message locations to generated ui_*.h headers and adds new ConfigDialog runtime and validation messages (required-field, filesystem/SSH_AUTH_SOCK checks, profile/password-store prompts/errors, GnuPG install guidance, and dependency notices) across numerous language files.

Changes

Qt Translation Update (ConfigDialog + UI headers)

Layer / File(s) Summary
UI header retargets
localization/localization_*.ts
Retarget many .ui-sourced strings into generated ui_*.h headers (MainWindow, ConfigDialog UI, Export/Import/Keygen/Password/Users dialogs, password generation and content-panel options).
ConfigDialog runtime / validation
localization/localization_*.ts
Add/re-anchor configdialog.cpp messages: required-field prompts, path/SSH_AUTH_SOCK validation (existence/readable/socket-type and multi-line "%1" warning), and new type="unfinished" entries.
Profile & dependency flows
localization/localization_*.ts
Profile directory/password-store creation prompts, create/failure/error messages, "Password store not initialised", profile status lines, and dependency notices (“System tray is not available”, missing Pass OTP extension, missing qrencode, GnuPG Autodetect guidance) re-anchored or added.

Sequence Diagram(s)

(Conditions for sequence diagrams are met: new control flow across multiple components.)

sequenceDiagram
  participant User
  participant ConfigDialog
  participant Filesystem
  participant GnuPG
  participant UI
  User->>UI: open ConfigDialog / change SSH_AUTH_SOCK
  UI->>ConfigDialog: submit override/path
  ConfigDialog->>Filesystem: check path exists/readable/is-socket
  Filesystem-->>ConfigDialog: result (ok/error)
  ConfigDialog->>GnuPG: optional autodetect probe
  GnuPG-->>ConfigDialog: probe result
  ConfigDialog->>UI: show validation message / profile prompts / dependency hints
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • IJHack/QtPass#1438: Introduces the SSH_AUTH_SOCK override UI and related lupdate strings referenced here.
  • IJHack/QtPass#1215: Updates Portuguese translation files and overlaps ConfigDialog/UI string changes.
  • IJHack/QtPass#1420: Related translation updates to ConfigDialog/system-tray strings in Serbian locales.

Suggested labels

size:M

Suggested reviewers

  • nogeenhenk

"I hopped through strings with nimble paws,
Re-anchored headers, no more .ui flaws.
Profiles and SSH socks now stand in line,
Seventeen tongues sing the UI fine.
🐇✨"

✨ 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/ssh-auth-sock-override-warn

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 18

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@localization/localization_af.ts`:
- Around line 486-513: Add Afrikaans translations for the five empty messages
corresponding to the source strings "The path does not exist.", "The path is not
readable.", "The path is not a Unix domain socket.", "Potentially invalid
SSH_AUTH_SOCK override", and the multi-line "The SSH_AUTH_SOCK override value
may be invalid...\n\n%1\n\nThe value will still be saved as entered." in
localization_af.ts by filling each <translation> element with a best-effort
Afrikaans sentence while preserving type="unfinished" (do not remove or change
the attribute) and ensure the multi-line message includes the %1 placeholder
verbatim in the translated text; update only the <translation> contents for
those message entries.

In `@localization/localization_ar.ts`:
- Around line 453-480: Fill the five empty translation entries in
localization_ar.ts for the SSH_AUTH_SOCK validation messages by providing
best-effort Arabic translations (keep the attribute type="unfinished") for these
source strings: "The path does not exist.", "The path is not readable.", "The
path is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK
override", and the multi-line message starting "The SSH_AUTH_SOCK override value
may be invalid.\n\n%1\n\nThe value will still be saved as entered."; ensure each
corresponding <translation> element contains the Arabic text and retains
type="unfinished" so Weblate can refine them later.

In `@localization/localization_bg.ts`:
- Around line 486-513: Add Bulgarian translations (marked type="unfinished") for
the five new message entries that are currently empty: the strings "The path
does not exist.", "The path is not readable.", "The path is not a Unix domain
socket.", "Potentially invalid SSH_AUTH_SOCK override", and the multiline "The
SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value will still be
saved as entered." in localization_bg.ts; update the corresponding <translation>
elements to contain accurate Bulgarian text (keeping type="unfinished") so the
bg locale no longer falls back to English, and ensure the multiline message
preserves %1 placeholder and paragraph breaks.

In `@localization/localization_bn.ts`:
- Around line 531-558: Add best-effort Bengali translations for the four new
SSH_AUTH_SOCK validation messages by replacing the empty <translation
type="unfinished"></translation> entries corresponding to the source texts "The
path does not exist.", "The path is not readable.", "The path is not a Unix
domain socket.", and the two-line "Potentially invalid SSH_AUTH_SOCK override" /
"The SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value will still
be saved as entered." with appropriate Bengali strings (retain
type="unfinished") so Weblate has initial translations to refine; ensure the
exact source strings above are matched to update the correct <translation>
elements and do not change the surrounding XML structure or attributes.

In `@localization/localization_ca.ts`:
- Around line 486-513: Replace the five empty translation entries for the
SSH_AUTH_SOCK validation messages in localization_ca.ts (the messages with
source texts "The path does not exist.", "The path is not readable.", "The path
is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK override", and
the multi-line "The SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe
value will still be saved as entered.") with concise Catalan translations,
keeping the translation attributes as type="unfinished" so Weblate reviewers can
verify them; update only the <translation> content for those specific message
blocks referenced from configdialog.cpp without changing other tags or
structure.

In `@localization/localization_cs.ts`:
- Around line 338-365: Add Czech translations for the five new empty
<translation type="unfinished"> entries corresponding to the messages from
configdialog.cpp: "The path does not exist.", "The path is not readable.", "The
path is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK
override", and the multi-line "The SSH_AUTH_SOCK override value may be
invalid.\n\n%1\n\nThe value will still be saved as entered." — update each empty
<translation type="unfinished"> element in localization_cs.ts with a best-effort
Czech string (keep type="unfinished") matching the meaning and punctuation of
the source, preserving the %1 placeholder and paragraph breaks exactly for the
multi-line message.

In `@localization/localization_cy.ts`:
- Around line 1904-1908: The translation for the source "Show unusable keys" in
localization/localization_cy.ts is truncated ("Dangos bysellau na ellir eu");
replace it with a complete Welsh translation such as "Dangos bysellau na ellir
eu defnyddio" (or "Dangos allweddi na ellir eu defnyddio" if preferred), update
the translation element for that message (the one matching source "Show unusable
keys"), and if you’re not 100% confident mark the translation with
type="unfinished"; ensure the replacement uses the same XML/TS attribute
structure and correct encoding.
- Around line 531-557: Add Welsh translations for the five new source strings
from configdialog.cpp: "The path does not exist.", "The path is not readable.",
"The path is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK
override", and the multi-line "The SSH_AUTH_SOCK override value may be
invalid.\n\n%1\n\nThe value will still be saved as entered."; update their
corresponding <translation> elements in localization/localization_cy.ts (leave
type="unfinished"), ensure placeholders like %1 and any newlines/formatting are
preserved exactly, and avoid altering other attributes or tags so the
translations replace the empty entries without changing structure.

In `@localization/localization_da.ts`:
- Around line 486-513: Add Danish translations for the empty SSH_AUTH_SOCK
messages in localization_da.ts by filling the <translation> elements for the
source strings "The path does not exist.", "The path is not readable.", "The
path is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK override"
and the multi-line message containing "%1" with best-effort Danish text while
keeping type="unfinished"; ensure the placeholder %1 remains exactly as in the
source and no HTML or script changes are introduced so the strings stay safe for
runtime replacement.

In `@localization/localization_de_DE.ts`:
- Around line 478-505: Fill the five empty German translations in
localization_de_DE.ts for the new SSH_AUTH_SOCK-related messages: provide
best-effort German text for the source strings "The path does not exist.", "The
path is not readable.", "The path is not a Unix domain socket.", "Potentially
invalid SSH_AUTH_SOCK override" and the multi-line "The SSH_AUTH_SOCK override
value may be invalid.\n\n%1\n\nThe value will still be saved as entered." while
keeping each translation element marked type="unfinished"; update the
corresponding <translation> text entries (referencing the source strings from
configdialog.cpp shown in the diff) with concise German translations that
preserve the placeholder %1.

In `@localization/localization_de_LU.ts`:
- Around line 467-494: Add German (Luxembourg) best-effort translations for the
four empty SSH_AUTH_SOCK-related entries in localization/localization_de_LU.ts
corresponding to the source strings "The path does not exist.", "The path is not
readable.", "The path is not a Unix domain socket.", and the multi-line "The
SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value will still be
saved as entered."; replace the empty <translation
type="unfinished"></translation> tags with appropriate German translations
(keeping type="unfinished") so the de_LU locale no longer falls back to English
but still signals the translation is provisional.

In `@localization/localization_el.ts`:
- Around line 457-484: Provide Greek translations for the five empty
<translation> entries corresponding to the source strings "The path does not
exist.", "The path is not readable.", "The path is not a Unix domain socket.",
"Potentially invalid SSH_AUTH_SOCK override", and the multiline "The
SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value will still be
saved as entered."; ensure each translation preserves the %1 placeholder exactly
and keep type="unfinished" on each <translation> element; craft concise, natural
Greek text that matches the original meanings (including the multiline structure
for the SSH_AUTH_SOCK message) so the placeholder and line breaks remain intact.

In `@localization/localization_en_GB.ts`:
- Around line 486-513: Fill the empty <translation type="unfinished"> entries
for the six SSH_AUTH_SOCK validation messages by providing British English
translations that match the source meanings (e.g. "The path does not exist.",
"The path is not readable.", "The path is not a Unix domain socket.",
"Potentially invalid SSH_AUTH_SOCK override", and the multi-line warning
starting "The SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value
will still be saved as entered."). Keep each translation marked with
type="unfinished" (do not remove or change that attribute) and ensure spelling
and phrasing follow British English conventions used elsewhere in the file.

In `@localization/localization_en_US.ts`:
- Around line 486-513: Fill the empty <translation> tags by copying the
corresponding <source> text into each <translation> for the six messages shown
(e.g., "The path does not exist.", "The path is not readable.", "The path is not
a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK override", and the
multi-line SSH_AUTH_SOCK override message) while leaving the attribute
type="unfinished" intact so Weblate can refine them later; locate these messages
in the same message blocks referencing configdialog.cpp (the strings above) and
replace the empty translations with the exact source text.

In `@localization/localization_es_AR.ts`:
- Around line 536-563: Translate the five empty Spanish entries in
localization/localization_es_AR.ts corresponding to the configdialog messages:
"The path does not exist.", "The path is not readable.", "The path is not a Unix
domain socket.", "Potentially invalid SSH_AUTH_SOCK override", and the
multi-line message beginning "The SSH_AUTH_SOCK override value may be invalid."
Replace each empty <translation type="unfinished"></translation> with an
appropriate es_AR translation (keep type="unfinished"), ensuring the placeholder
%1 remains exactly as-is in the multi-line message and do not alter surrounding
XML structure or tags; use the exact source strings to locate the correct
<message> blocks (from configdialog.cpp entries) and update only their
<translation> contents.

In `@localization/localization_es_EC.ts`:
- Around line 536-563: Add best-effort Spanish translations (marked
type="unfinished") for the five empty SSH_AUTH_SOCK validation messages shown by
the source strings "The path does not exist.", "The path is not readable.", "The
path is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK
override", and the multi-line "The SSH_AUTH_SOCK override value may be
invalid.\n\n%1\n\nThe value will still be saved as entered." — update the
corresponding <translation> elements to contain appropriate Spanish text (short,
natural translations) while preserving the type="unfinished" attribute so
Weblate can refine them later.

In `@localization/localization_es_ES.ts`:
- Around line 536-563: Add best-effort Spanish translations for the five
unfinished SSH_AUTH_SOCK validation messages in localization_es_ES.ts by
populating the empty <translation type="unfinished">...</translation> tags for
the source strings "The path does not exist.", "The path is not readable.", "The
path is not a Unix domain socket.", "Potentially invalid SSH_AUTH_SOCK override"
and the multi-line message beginning "The SSH_AUTH_SOCK override value may be
invalid." — use terminology consistent with existing SSH_AUTH_SOCK entries
(e.g., "sustitución", "detección automática") and keep each translation marked
type="unfinished" so Weblate can refine them later.

In `@localization/localization_es_MX.ts`:
- Around line 536-563: The Spanish localization file localization_es_MX.ts
contains empty translations for the SSH_AUTH_SOCK validation messages; fill in
best-effort Spanish translations for the source strings "The path does not
exist.", "The path is not readable.", "The path is not a Unix domain socket.",
"Potentially invalid SSH_AUTH_SOCK override", and the multi-line message
starting "The SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value
will still be saved as entered.", ensuring each translation is added as the
translation text and retains type="unfinished" so Weblate can refine them later;
update the translation entries corresponding to those source strings in the file
(eg. entries from configdialog.cpp referenced in the diff) only—do not change
source texts or attributes other than populating the translation content.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 35c8cdbe-6992-489f-8cd9-727386d6f9b1

📥 Commits

Reviewing files that changed from the base of the PR and between 7c8b368 and 88b9ab4.

📒 Files selected for processing (66)
  • localization/localization_af.ts
  • localization/localization_ar.ts
  • localization/localization_bg.ts
  • localization/localization_bn.ts
  • localization/localization_ca.ts
  • localization/localization_cs.ts
  • localization/localization_cy.ts
  • localization/localization_da.ts
  • localization/localization_de_DE.ts
  • localization/localization_de_LU.ts
  • localization/localization_el.ts
  • localization/localization_en_GB.ts
  • localization/localization_en_US.ts
  • localization/localization_es_AR.ts
  • localization/localization_es_EC.ts
  • localization/localization_es_ES.ts
  • localization/localization_es_MX.ts
  • localization/localization_es_UY.ts
  • localization/localization_et.ts
  • localization/localization_fa.ts
  • localization/localization_fi.ts
  • localization/localization_fr_BE.ts
  • localization/localization_fr_FR.ts
  • localization/localization_fr_LU.ts
  • localization/localization_fy_NL.ts
  • localization/localization_gl.ts
  • localization/localization_he.ts
  • localization/localization_hi.ts
  • localization/localization_hr.ts
  • localization/localization_hu.ts
  • localization/localization_id.ts
  • localization/localization_it.ts
  • localization/localization_ja.ts
  • localization/localization_ko.ts
  • localization/localization_lb_LU.ts
  • localization/localization_lt.ts
  • localization/localization_lv.ts
  • localization/localization_mr.ts
  • localization/localization_nb.ts
  • localization/localization_nl_BE.ts
  • localization/localization_nl_NL.ts
  • localization/localization_pa_IN.ts
  • localization/localization_pl.ts
  • localization/localization_pt_BR.ts
  • localization/localization_pt_PT.ts
  • localization/localization_ro.ts
  • localization/localization_ru.ts
  • localization/localization_si.ts
  • localization/localization_sk.ts
  • localization/localization_sl.ts
  • localization/localization_sq.ts
  • localization/localization_sr_Cyrl.ts
  • localization/localization_sr_RS.ts
  • localization/localization_sv.ts
  • localization/localization_sw.ts
  • localization/localization_ta.ts
  • localization/localization_te.ts
  • localization/localization_th.ts
  • localization/localization_tr.ts
  • localization/localization_uk.ts
  • localization/localization_ur.ts
  • localization/localization_vi.ts
  • localization/localization_zh_CN.ts
  • localization/localization_zh_Hant.ts
  • src/configdialog.cpp
  • src/util.h

Comment thread localization/localization_af.ts
Comment thread localization/localization_ar.ts
Comment thread localization/localization_bg.ts
Comment thread localization/localization_bn.ts
Comment thread localization/localization_ca.ts
Comment thread localization/localization_en_GB.ts
Comment thread localization/localization_en_US.ts
Comment thread localization/localization_es_AR.ts
Comment thread localization/localization_es_ES.ts
Comment thread localization/localization_es_MX.ts
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 17 file(s) based on 18 unresolved review comments.

Files modified:

  • localization/localization_af.ts
  • localization/localization_ar.ts
  • localization/localization_bg.ts
  • localization/localization_bn.ts
  • localization/localization_ca.ts
  • localization/localization_cs.ts
  • localization/localization_cy.ts
  • localization/localization_da.ts
  • localization/localization_de_DE.ts
  • localization/localization_de_LU.ts
  • localization/localization_el.ts
  • localization/localization_en_GB.ts
  • localization/localization_en_US.ts
  • localization/localization_es_AR.ts
  • localization/localization_es_EC.ts
  • localization/localization_es_ES.ts
  • localization/localization_es_MX.ts

Commit: 86d287c626fc053699a56dab4c6f92b39a806219

The changes have been pushed to the fix/ssh-auth-sock-override-warn branch.

Time taken: 4m 48s

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⚠️ Branch updated during autofix.

The branch was updated while autofix was in progress. Please try again.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.26%. Comparing base (7c8b368) to head (f6bbd0f).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/configdialog.cpp 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1439      +/-   ##
==========================================
- Coverage   33.39%   33.26%   -0.14%     
==========================================
  Files          44       44              
  Lines        4324     4341      +17     
==========================================
  Hits         1444     1444              
- Misses       2880     2897      +17     
Flag Coverage Δ
qtpass 33.26% <0.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Fixed 17 file(s) based on 18 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
localization/localization_en_US.ts (2)

727-1007: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Export/Import dialog en_US entries are still empty

In changed ExportPublicKeyDialog and ImportKeyDialog blocks, many translations remain empty (e.g., Line 731, Line 737, Line 743, Line 932, Line 938, Line 944). These should be filled with best-effort en_US text (typically identical to <source>) while keeping type="unfinished".

As per coding guidelines, "fill empty entries with best-effort translations marked type="unfinished"".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@localization/localization_en_US.ts` around lines 727 - 1007, Fill all empty
<translation> entries in the ExportPublicKeyDialog and ImportKeyDialog message
blocks by copying the corresponding <source> text into each <translation>
element while leaving the attribute type="unfinished" intact; target the strings
associated with ExportPublicKeyDialog (e.g., "Export Public Key", "Public key",
"Copy to Clipboard", "Save to File...", "Public key for %1", "Copied!", "Save
Public Key", "ASCII-armored key (*.asc);;All files (*)", "Could not open %1 for
writing: %2", "Could not write to %1: %2") and ImportKeyDialog (e.g., "Import
GPG Key", the descriptive import sentence, "From File...", "From Clipboard",
"Paste an ASCII-armored GPG key here...", "Import", "ASCII-armored GPG key",
"All Files", "Import Key", "Could not open file: %1", "%1 does not look like an
ASCII-armored GPG key. Convert it with <code>gpg --armor --export</code> first,
or paste the armored block via <b>From Clipboard</b>.", "GPG import
failed:\n%1", "Could not parse imported key id from GPG output.", "Successfully
imported key: %1"); ensure each translation exactly matches its source text and
preserve any placeholders like %1 and markup.

13-608: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fill empty en_US translations in changed message blocks

Multiple changed entries still have empty <translation type="unfinished"></translation> (for example, Line 16, Line 94, Line 166, Line 172, Line 184, Line 483, Line 521). Please populate these with the source text so the locale file is complete while remaining type="unfinished".

Suggested pattern
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Settings</translation>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Show process output</translation>

As per coding guidelines, "fill empty entries with best-effort translations marked type="unfinished"".

Also applies to: 1319-1790

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@localization/localization_en_US.ts` around lines 13 - 608, Several message
entries in localization_en_US.ts (e.g., source strings "Show process output",
"Enable content search (pass grep)", "(Optional path ...)", "This field is
required", "Create profile directory?", "Would you like to create a password
store at %1?", "Could not create profile directory: %1", "Select recipients for
%1", "New Profile", "Failed to create password-store at: %1", "New profile: %1
at %2", "Profile: %1 at %2", "Fill in all required fields", etc.) have empty
<translation type="unfinished"></translation> tags; populate each empty
translation by copying the corresponding <source> text into its <translation>
value while keeping type="unfinished" unchanged so the locale remains marked
unfinished but complete. Locate these messages by their source strings (and
related functions in configdialog.cpp like the ones producing "This field is
required" and profile/create prompts) and update the translation nodes
accordingly for all affected blocks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@localization/localization_ca.ts`:
- Around line 496-499: Update the Catalan translation for the source string "The
path is not a Unix domain socket." in localization_ca.ts by replacing the
incorrect word "sòcol" with the proper technical term "socket" (i.e., change "El
camí no és un sòcol de domini Unix." to use "socket" so it reads "El camí no és
un socket de domini Unix."). Ensure the translation string for that <message>
entry matches the corrected wording and retains the existing attributes (e.g.,
type="unfinished") if present.

In `@localization/localization_en_GB.ts`:
- Around line 193-196: The en_GB translation for the source string "Optional
path to override SSH_AUTH_SOCK. Leave empty to auto-probe via gpgconf (issue
`#543`)." was altered to add the extra word "see"; update the <translation> entry
corresponding to that <source> so it matches the source wording exactly (replace
"Optional path to override SSH_AUTH_SOCK. Leave empty to auto-detect via gpgconf
(see issue `#543`)." with the same phrasing as the <source> text, preserving
"auto-probe" and "(issue `#543`)"). Ensure the <translation> tag content exactly
mirrors the source text and save the .ts file.

In `@localization/localization_es_EC.ts`:
- Around line 536-567: Update the Spanish translations for the SSH_AUTH_SOCK
override messages so terminology is consistent: for the source strings
"Potentially invalid SSH_AUTH_SOCK override" and "The SSH_AUTH_SOCK override
value may be invalid.\n\n%1\n\nThe value will still be saved as entered."
replace "Sustitución de SSH_AUTH_SOCK" and "El valor de sustitución de
SSH_AUTH_SOCK" with "Anulación de SSH_AUTH_SOCK" and "El valor de anulación de
SSH_AUTH_SOCK" respectively, preserving the %1 placeholder and line breaks
exactly and leaving other translations unchanged.

---

Outside diff comments:
In `@localization/localization_en_US.ts`:
- Around line 727-1007: Fill all empty <translation> entries in the
ExportPublicKeyDialog and ImportKeyDialog message blocks by copying the
corresponding <source> text into each <translation> element while leaving the
attribute type="unfinished" intact; target the strings associated with
ExportPublicKeyDialog (e.g., "Export Public Key", "Public key", "Copy to
Clipboard", "Save to File...", "Public key for %1", "Copied!", "Save Public
Key", "ASCII-armored key (*.asc);;All files (*)", "Could not open %1 for
writing: %2", "Could not write to %1: %2") and ImportKeyDialog (e.g., "Import
GPG Key", the descriptive import sentence, "From File...", "From Clipboard",
"Paste an ASCII-armored GPG key here...", "Import", "ASCII-armored GPG key",
"All Files", "Import Key", "Could not open file: %1", "%1 does not look like an
ASCII-armored GPG key. Convert it with <code>gpg --armor --export</code> first,
or paste the armored block via <b>From Clipboard</b>.", "GPG import
failed:\n%1", "Could not parse imported key id from GPG output.", "Successfully
imported key: %1"); ensure each translation exactly matches its source text and
preserve any placeholders like %1 and markup.
- Around line 13-608: Several message entries in localization_en_US.ts (e.g.,
source strings "Show process output", "Enable content search (pass grep)",
"(Optional path ...)", "This field is required", "Create profile directory?",
"Would you like to create a password store at %1?", "Could not create profile
directory: %1", "Select recipients for %1", "New Profile", "Failed to create
password-store at: %1", "New profile: %1 at %2", "Profile: %1 at %2", "Fill in
all required fields", etc.) have empty <translation
type="unfinished"></translation> tags; populate each empty translation by
copying the corresponding <source> text into its <translation> value while
keeping type="unfinished" unchanged so the locale remains marked unfinished but
complete. Locate these messages by their source strings (and related functions
in configdialog.cpp like the ones producing "This field is required" and
profile/create prompts) and update the translation nodes accordingly for all
affected blocks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5b8f0ad6-92dc-435d-b812-394283d72014

📥 Commits

Reviewing files that changed from the base of the PR and between 88b9ab4 and 86d287c.

📒 Files selected for processing (17)
  • localization/localization_af.ts
  • localization/localization_ar.ts
  • localization/localization_bg.ts
  • localization/localization_bn.ts
  • localization/localization_ca.ts
  • localization/localization_cs.ts
  • localization/localization_cy.ts
  • localization/localization_da.ts
  • localization/localization_de_DE.ts
  • localization/localization_de_LU.ts
  • localization/localization_el.ts
  • localization/localization_en_GB.ts
  • localization/localization_en_US.ts
  • localization/localization_es_AR.ts
  • localization/localization_es_EC.ts
  • localization/localization_es_ES.ts
  • localization/localization_es_MX.ts

Comment thread localization/localization_ca.ts
Comment thread localization/localization_en_GB.ts Outdated
Comment thread localization/localization_es_EC.ts
distclean+qmake6 regenerated the .ts files without the spurious
location pointers into generated headers (ui_configdialog.h,
ui_mainwindow.h, etc.) that lupdate had captured earlier. Net -9861
lines, no semantic change to translations or source strings.

Plus 3 reviewer findings on the new SSH_AUTH_SOCK strings:

- ca: "sòcol" → "socket" in "El camí no és un socket de domini Unix."
  ("sòcol" means a wall socket / plinth, not a Unix-domain socket).

- en_GB: undo a CodeRabbit auto-fix divergence — the en_GB translation
  had drifted to "auto-detect via gpgconf (see issue #543)" when the
  source uses "auto-probe" and "(issue #543)" with no leading "see".
  Mirror the source exactly.

- es_EC: standardise on "Anulación" for the override-related strings.
  The Settings-dialog warning had used "Sustitución" / "sustitución",
  inconsistent with the existing override-label "Anulación de
  SSH_AUTH_SOCK:" in the same file.

Skipped — out of scope for this PR:
- en_US bulk fills for ExportPublicKeyDialog and ImportKeyDialog
  blocks (those source strings live behind separate features and were
  not touched here).
- en_US bulk fills for unrelated ConfigDialog entries (pre-existing
  empties; Weblate territory).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@annejan
Copy link
Copy Markdown
Member Author

annejan commented May 9, 2026

Pushed f6bbd0f.

1. Removed generated-header locations from .ts files (make distclean && qmake6)

lupdate had captured `<location filename="../src/ui_configdialog.h" ...>` etc. — pointers into Qt-generated headers that don't exist in source control. distclean wiped them, qmake6 regenerated cleanly. Net -9861 lines across 63 .ts files, zero string changes.

2. Three reviewer findings, all still valid:

Locale Fix
ca "sòcol" (wall-socket / plinth) → "socket" — Unix domain socket sense
en_GB revert CodeRabbit drift back to source wording: "auto-probe" + "(issue #543)", no spurious "see"
es_EC "Sustitución" / "sustitución" → "Anulación" / "anulación" for the warning, matching the existing override label in the same file

Skipped — out of scope for #1439:

Validation: lrelease6 on the 3 fixed files — 304 finished + 8 unfinished, no errors.

@coveralls
Copy link
Copy Markdown

coveralls commented May 9, 2026

Coverage Status

coverage: 28.234% (-0.08%) from 28.31% — fix/ssh-auth-sock-override-warn into main

@annejan annejan merged commit 4ec1e0f into main May 9, 2026
25 of 27 checks passed
@annejan annejan deleted the fix/ssh-auth-sock-override-warn branch May 9, 2026 21:20
annejan added a commit that referenced this pull request May 9, 2026
Best-effort Chinese translations for the validation strings introduced
in #1439, kept type="unfinished" so Weblate can refine. Reuses the 覆盖
terminology established in PR #1441 for "override":

- "The path does not exist." → "路径不存在。"
- "The path is not readable." → "路径不可读。"
- "The path is not a Unix domain socket." → "路径不是 Unix 域套接字。"
- "Potentially invalid SSH_AUTH_SOCK override" → "SSH_AUTH_SOCK 覆盖值可能无效"
- "The SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value
  will still be saved as entered." → matching multi-line form, %1
  placeholder preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
annejan added a commit that referenced this pull request May 9, 2026
* i18n(zh_CN): "绕过" → "覆盖" for SSH_AUTH_SOCK override

Reviewer-flagged: the existing translation rendered "override" as 绕过
(bypass / circumvent), which has the wrong semantic — "override" here
means "replace with this value", not "skip". 覆盖 is the term used
elsewhere in the file (e.g. "强制覆盖?" for "force overwrite") and is
what the dialog label should read.

Two strings touched:
- "SSH_AUTH_SOCK override:" → "SSH_AUTH_SOCK 覆盖:"
- "Optional path to override SSH_AUTH_SOCK..." → leading verb 覆盖

The "(auto-probe via gpgconf)" parenthetical was unaffected; left
alone.

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

* i18n(zh_CN): fill 5 SSH_AUTH_SOCK validation messages

Best-effort Chinese translations for the validation strings introduced
in #1439, kept type="unfinished" so Weblate can refine. Reuses the 覆盖
terminology established in PR #1441 for "override":

- "The path does not exist." → "路径不存在。"
- "The path is not readable." → "路径不可读。"
- "The path is not a Unix domain socket." → "路径不是 Unix 域套接字。"
- "Potentially invalid SSH_AUTH_SOCK override" → "SSH_AUTH_SOCK 覆盖值可能无效"
- "The SSH_AUTH_SOCK override value may be invalid.\n\n%1\n\nThe value
  will still be saved as entered." → matching multi-line form, %1
  placeholder preserved.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
annejan added a commit that referenced this pull request May 10, 2026
Reviewed every translation in the 31 locales sitting between 95% and
99.9% finished — all of them had non-empty <translation
type="unfinished"> entries from earlier rounds (mostly the
SSH_AUTH_SOCK + override-warn strings from #1438/#1439). Each
translation preserves placeholders (%1) and source punctuation,
matches established locale terminology (e.g. zh_CN/zh_Hant 覆盖/覆寫,
sr_Cyrl/sr_RS надјачавање/nadjačavanje, ja 上書き), and reads
naturally; promoted to "finished" by stripping type="unfinished".

One small terminology fix on the way:

- zh_CN: "Potentially invalid SSH_AUTH_SOCK override" was rendered
  "SSH_AUTH_SOCK 覆盖值可能无效" (= "SSH_AUTH_SOCK override value may be
  invalid"). Awkward as a dialog title — re-ordered to
  "可能无效的 SSH_AUTH_SOCK 覆盖" matching the natural Chinese pattern and
  the existing zh_Hant rendering ("可能無效的 SSH_AUTH_SOCK 覆寫").

Locales touched (31, all now 312/312 finished):
  cy, es_UY, et, fi, fr_BE, fr_LU, fy_NL, gl, hi, hr, hu, id, ja,
  ko, lb_LU, lt, lv, nl_BE, pa_IN, ro, si, sq, sr_Cyrl, sr_RS, sw,
  ta, te, uk, ur, zh_CN, zh_Hant.

Out of scope (deliberately skipped per request):
  he, en_US, ru — sitting at 13.4% / 63.1% / 69.2% with hundreds of
  pre-existing untranslated entries that pre-date this PR's work.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
annejan added a commit that referenced this pull request May 13, 2026
…1469)

The Settings dialog warning logic added in #1439 (configdialog.cpp
on_accepted) had no unit tests. Extract the validation rules into a
pure helper so they're testable without a Qt event loop or
QMessageBox spy.

Production change (mechanical, no semantic diff):

- New Util::sshAuthSockOverrideStatus(QString) returning an enum:
  Valid / DoesNotExist / NotReadable / NotUnixDomainSocket. Same three
  checks as before (exists, readable, S_ISSOCK on Unix), now reusable
  and unit-testable.
- ConfigDialog::on_accepted switches the three inline if/else branches
  to a switch over the enum. Translation strings stay in ConfigDialog
  (Util has no tr() callers).
- Dropped now-unused #include <QFileInfo> and #include <sys/stat.h>
  from configdialog.cpp.

Tests (tst_util.cpp):

- sshAuthSockOverrideStatusDoesNotExist — non-existent path
- sshAuthSockOverrideStatusRegularFileRejected — regular file (Unix)
- sshAuthSockOverrideStatusNotReadable — chmod 0 (Unix; skipped under
  root since euid 0 ignores mode bits)
- sshAuthSockOverrideStatusValid — bind(2) a real Unix domain socket
  and assert Valid

POSIX socket(2)/bind(2) instead of QLocalServer to avoid pulling
QtNetwork into the util test target. Unix-only tests SKIP on Windows
where the production code also skips the socket check (ssh-agent uses
a named pipe there).

Build clean, 124/124 util tests pass (was 120, +4).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants