Skip to content

Add Japanese - #41

Merged
FarmLox merged 1 commit into
no-faff:mainfrom
coolvitto:main
Jun 25, 2026
Merged

Add Japanese#41
FarmLox merged 1 commit into
no-faff:mainfrom
coolvitto:main

Conversation

@coolvitto

Copy link
Copy Markdown
Contributor

Add Japanese language

What this changes

Add Japanese language.

Add Japanese language
@FarmLox
FarmLox merged commit a268b8d into no-faff:main Jun 25, 2026
@FarmLox

FarmLox commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@coolvitto This is amazing. I've made an enormous effort starting to machine translate the resx files for the nine languages apart from English. The idea was to give a head start to any native speaker kind enough to come along and offer to take the job on (like bovirus did for Italian). I've got it, cn-ZH, es and pt-BR done and was literally just about to set about tackling Japanese, right now.

But what you've given me is pure gold, and comes just at the right time. It's synchronicity!

So thanks very much indeed. I'll get back to you properly later, probably tonight.

What a wonderful surprise 🙏

@coolvitto

Copy link
Copy Markdown
Contributor Author

I'm glad I could be of help.
I wish you continued success with the app.

coolvitto

FarmLox added a commit that referenced this pull request Jun 25, 2026
Refine the Japanese draft (coolvitto, #41) ahead of it going live:

- 製品 (was プロダクト) for "product" throughout: the native word Microsoft
  uses for an installed product, not the English loanword.
- 件名 (was サブジェクト) for the "Subject" file-property label, matching
  how Japanese Windows names that document property.
- 準備完了 (was 待機中) for the post-scan "Ready" status; 待機中 read as
  "standby/waiting" rather than start-up finished.
- A comma after すべて in the Move button's screen-reader label so Narrator
  cannot misparse すべて選択した as "select all".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FarmLox added a commit that referenced this pull request Jun 26, 2026
Wire coolvitto's Japanese translation (#41) into the live UI: add "ja" to
the supported-culture list and 日本語 to the globe menu, so Japanese is
chosen from the menu or applied automatically on a Japanese-language
Windows. Add JapaneseResxParityTests, the same neutral-key completeness
guard Italian has, so a future neutral key cannot ship untranslated into
the Japanese UI. Update the AppSettings.Language doc comment for the new
culture.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FarmLox added a commit that referenced this pull request Jul 19, 2026
Addresses every actionable finding from the independent ship-readiness
review at non-repo-files/v1.5.4-ship-readiness-review.md. Findings
that the review flagged but explicitly did not fix here are documented
inline with their reasoning.

Native interop (latent UB; harmless on x64 by ABI luck):
- SHFILEOPSTRUCT: Pack=8 -> Pack=1 to match the Windows SDK's
  pshpack1.h declaration. Pack=8 inserted 4 bytes of padding before
  pFrom on x64, putting the C# field at offset 16 while the kernel
  reads from offset 12 - the shell happened to read field-aligned
  bytes that just so happened to look right.
- MSIHANDLE: changed from IntPtr (8 bytes on x64) to uint (4 bytes,
  matching `typedef unsigned long MSIHANDLE` in msi.h). The IntPtr
  signature would crash on x86 where the calling convention pushes
  8 bytes for a 4-byte argument. Cascaded the type change through
  Msi.cs and MsiFileInfoService.cs.
- X509Certificate.CreateFromSignedFile result is now disposed too
  (was leaked until finalisation; the X509Certificate2 wrapper
  duplicates the handle so the inner needs its own using).

Operation correctness:
- F5 keybinding (and any other Re-scan trigger) now gates on
  Cleanup.IsOperating and Completion.IsComplete via a new
  ScanViewModel.IsExternallyBlocked flag flipped from MainViewModel.
  Without this, F5 during a Move started a parallel scan that raced
  the active operation.
- EnumeratePatches now throws InvalidOperationException after
  MaxConsecutiveNonSuccess just like EnumerateProducts does. The
  silent break would have left real-but-superseded patches missing
  from the result set, classifying them as orphaned and offering
  them for cleanup.
- EnumeratePatches now Array.Clear's its GUID buffers between
  iterations, matching EnumerateProducts.
- Pre-flight write probe in CleanupViewModel.MoveAllAsync is now
  cancellable: the operationCts is created BEFORE the probe (was
  after), so the Cancel button on the operating overlay actually
  cancels rather than waiting out the SMB timeout. The probe also
  goes through the injected IFileSystem so MockFileSystem-driven
  tests don't hit real disk.
- Settings file lost-update race fixed: SaveAfterDelayAsync re-loads
  before saving, copies MoveDestination onto the freshly-loaded
  AppSettings, then writes. Previously, the cached _settings instance
  could clobber updates the detail-window code-behinds wrote
  (window-size persistence) while the user was typing in the move-
  destination textbox.
- PruneEmptySubdirectories called with CancellationToken.None: best-
  effort cleanup, not an operation the user's Cancel should
  re-classify a successful Move/Delete as cancelled.
- Move/DeleteFailed status pill now also includes the crash log path,
  so users can find detail rather than guess where to look.
- Maximize/Restore button glyph now updates with the window state.

Path leakage under elevation:
- DescribeWriteFailure no longer routes ex.Message into the dialog.
  Even an IOException's .Message can carry paths from outside the
  user's typed destination (lock-holder process paths, NTFS
  resolution chains); under elevation those could be paths from
  another user's profile. Caller now writes to crash log first,
  passes the log path through DescribeWriteFailure, and the dialog
  body shows only the user's own dest plus the log-path pointer.
  Resx patterns updated; matching tests inverted.
- ScanViewModel generic-exception catch shows a dialog (was status
  pill only, easily missed).
- DispatcherUnhandledException in App.xaml.cs guards against re-
  entry: a second exception during the MessageBox's nested message
  pump no longer stacks two dialogs / two log entries.

CLI:
- Rejects extra positional args for /s, /d (silent truncation
  before); /m allows args[1] only.
- /m PATH path with unquoted spaces ("/m D:\My Backup") used to
  become "D:\My" with no warning.
- Three-state exit code: 0 success, 2 partial success, 1 full
  failure. Documented in --help. Sysadmin retry policies can now
  distinguish "all files failed" from "1 of 100 failed".
- DeletingFiles / MovingFiles status messages take a pluralised
  noun parameter so "1 files" is no longer printed for single-
  orphan runs.
- Console.CancelKeyPress handler registered BEFORE the mutex
  acquisition so a Ctrl+C in the gap prints "Cancelling..."
  gracefully.
- Pre-mutex-cancel path also unhooks the cancel handler before
  return, matching the post-finally cleanup.

Threading / state:
- ScanViewModel re-samples HasPendingReboot AFTER the scan await,
  not before. Sampling before could publish a stale "no pending
  reboot" if Windows Update queued a reboot during a multi-second
  scan, allowing Move/Delete to enable on stale state.
- PropertyChanged-based MoveDestination binding (was LostFocus): the
  400 ms debounce now actually earns its keep (per-keystroke updates
  let the placeholder hide on the first character and the Move
  button enable as soon as the path becomes non-empty), and the
  debounce prevents save thrashing.
- MoveAllAsync uses the captured `dest` consistently (was reading
  MoveDestination live for confirmation / move call / restore-hint
  string), closing a race where a fast user could change the
  textbox between IsInstallerFolderOrChild validation and the Move
  service call.

Localisation:
- Strings.en-GB.resx deleted: it was a 1:1 duplicate of the neutral
  resx, and the project's NeutralLanguage is en-GB so .NET fallback
  already returned the neutral resource for en-GB consumers. The
  satellite assembly was loaded but its content was identical.
  Maintenance trap eliminated.
- Resx patterns added: Cli.Help.ExitCodes* (the new --help block),
  Cli.PendingRebootBlocked, Cli.EventLogPendingRebootBlocked.

UX polish:
- Result overlay tab-cycles inside the overlay's two buttons (was
  cycling through main-window buttons behind the overlay until
  focus eventually landed on Close).
- Result overlay has a 1px slate border so it reads as a layered
  window instead of a free-floating block.
- Click on the dim margin around the result overlay dismisses it.
- Maximize/Restore button glyph swaps between U+25A1 and U+2750.
- Result-screen errors block is now keyboard-focusable so screen
  readers can read it (overrides SelectableText style's
  IsTabStop=False locally).
- AboutWindow Close button gets AutomationProperties.Name (was
  inconsistent with the four other windows' close buttons).
- SubtleLink hyperlinks now underline on hover so the link is
  discoverable without relying on colour shift alone.

Tests:
- DescribeWriteFailureTests: inverted to assert the inner exception
  message does NOT leak and the log path DOES surface.
- MainViewModelTests timing-coupled debounce wait now reads
  CleanupViewModel.MoveDestinationSaveDelay (made internal)
  instead of hardcoding 700 ms.
- OrphanedFilesViewModelTests dispose-cancel test uses
  TaskCompletionSource (await-based) instead of
  DateTime.UtcNow polling.
- PendingRebootServiceTests removed the tautological
  Assert.IsType<bool>(svc.HasPendingReboot()) test.
- PruneEmptySubdirectoriesTests gated on the
  INSTALLERCLEAN_TEST_PRUNE=1 env var so they don't delete real
  installer-folder subdirs on dev/CI hosts.
- InstallerClean.Tests.csproj sets RestorePackagesWithLockFile=true
  so test dependency drift can't mask production behaviour.

Project notes drift:
- The notes said neutral resx is en-US; actually en-GB. Fixed and
  noted the en-GB.resx satellite removal.
- The notes said only Core has SupportedOSPlatform; CLI has it too.
  Now mentions both.
- "Nothing currently blocking" replaced with a pointer to the latest
  ship-readiness review.
- MEMORY.md "no ex.Message to UI" claim qualified with the documented
  inline exceptions (DescribeWriteFailure, ScanViewModel's
  InvalidOperationException catch).

Findings explicitly NOT actioned (with reasoning):
- #18, #25, #59 are duplicates of #1, #11.
- #31 EventTrigger animation paths: reviewer's own conclusion was
  "no fix unless profiler shows it".
- #32 Process.Start as Admin: would require explorer-token-drop
  machinery; deferred (a click-once-per-session UX paper-cut).
- #36, #41, #44, #48, #53, #54, #57: reviewer confirmed not bugs.
- #40 RescanRequested via constructor: reviewer's "not a bug today".
- #43 AllowsTransparency: acceptable trade-off for confirm dialogs.
- #45, #46 manifest version: cosmetic.
- #47 Inno [Files] precondition: release-script concern, not
  shipped product.
- #55, #56: minor UX nits.
- #58 CrashLog.Write return success/failure: would change the
  signature across every caller; out of scope for a fixup pass.

178/178 tests passed before this commit; running on Windows after.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
FarmLox added a commit that referenced this pull request Jul 19, 2026
A complete Japanese GUI translation, very kindly contributed by coolvitto. Thank you, much appreciated.
FarmLox added a commit that referenced this pull request Jul 19, 2026
Refine the Japanese draft (coolvitto, #41) ahead of it going live:

- 製品 (was プロダクト) for "product" throughout: the native word Microsoft
  uses for an installed product, not the English loanword.
- 件名 (was サブジェクト) for the "Subject" file-property label, matching
  how Japanese Windows names that document property.
- 準備完了 (was 待機中) for the post-scan "Ready" status; 待機中 read as
  "standby/waiting" rather than start-up finished.
- A comma after すべて in the Move button's screen-reader label so Narrator
  cannot misparse すべて選択した as "select all".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FarmLox added a commit that referenced this pull request Jul 19, 2026
Wire coolvitto's Japanese translation (#41) into the live UI: add "ja" to
the supported-culture list and 日本語 to the globe menu, so Japanese is
chosen from the menu or applied automatically on a Japanese-language
Windows. Add JapaneseResxParityTests, the same neutral-key completeness
guard Italian has, so a future neutral key cannot ship untranslated into
the Japanese UI. Update the AppSettings.Language doc comment for the new
culture.

Co-Authored-By: Claude Opus 4.8 (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