Files
thoughtsync/android/app/src/main/res/values/strings.xml
T
bvandeusenandClaude Opus 5 750d11d32e
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 3m0s
Android / Kotlin + Rust (debug APK) (push) Failing after 4m57s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 5m21s
Desktop (Tauri) / Update manifest (push) Successful in 4s
android: connect a server from the phone (M12 step 6)
The plumbing has been bound since step 4 — probe, link by password or token,
unlink, sync — with nothing on top of it. Until this commit the phone was a
good standalone notes app that could not be the SAME notes as the desktop,
which is the point of the project.

Structurally a port of the desktop's SyncView.vue: same probe-then-link order,
same copy wherever the copy was already right. The two surfaces pair with the
same servers, and a difference in wording here would read as a difference in
behaviour.

BEING UNLINKED IS NOT A PROBLEM, and the screen is written around that. It
leads with "Working offline on this device" and says what connecting would
ADD. A local-first app that frames its resting state as unfinished setup is
lying about what it is. The drawer badge follows the same rule: it says
nothing at all when unlinked, rather than "Off".

Probe before credentials. A typo that reaches a stranger's server should cost
a round trip, not a password — so the address is checked first, what answered
is shown (name, version, compatibility), and only then does a sign-in form
appear. An incompatible server never gets one; the core would refuse the link
anyway, and collecting a password to throw away is worse than not asking.

CLEARTEXT IS NOW PERMITTED, deliberately and not silently. Android blocks
plain http from API 28, and the core explicitly supports a self-hosted server
on a LAN — `http://192.168.1.10:8000` is a case it has a test for. The
platform default would make this app unusable for exactly the people it is
built for, with a transport error they could do nothing about. A
network-security-config would be tighter in principle but matches domains and
IP literals, not CIDR ranges, so it cannot express "my own network". The other
half of the trade is a warning that appears the moment a probed address starts
with http:// and BEFORE any credential field: anyone on the same network can
read your password and your notes.

Credentials never enter the view model. The address, email and device name are
`rememberSaveable` so a rotation doesn't cost a retype; the password and the
token are plain `remember` on purpose — rememberSaveable persists into the
instance-state bundle, and a secret has no business being written there to
save four seconds of typing. They reach the core as a `Credentials` sealed
type and die with the composable.

That sealed type also fixed a bug detekt surfaced by complaining about a
six-parameter function: `link_with_token` takes NO device name (the token was
already minted against a named device in the web app), so the flat argument
list meant the form collected one in token mode and silently dropped it. The
field now exists only on the password path.

Threading, which differs by call and is easy to get wrong in one direction:
probe / linkWithPassword / linkWithToken / unlink / syncNow are Rust async
through uniffi, so Kotlin sees suspend functions already driven by tokio and
awaits them directly — wrapping them in Dispatchers.IO would park a thread to
wait on something that never blocks one. syncStatus and hasPending are
ordinary blocking FFI into SQLite and do need it.

A sync that changed anything tells the board to reload, because a pull can
have rewritten every note it is holding. Wired explicitly at the one place
that owns both view models rather than through a shared event bus. A no-op
sync deliberately does not, so the board never flashes its loading state for
nothing.

Sync results are kept RAW in state and turned into sentences in the UI, where
stringResource is in scope — the same split Time.kt draws for timestamps. The
summary counts what MOVED; batches, pages, noop and cursor are all real
numbers and none of them answer "are my notes in step". Rejections are
surfaced rather than swallowed: only a person can resolve them. So is a revoke
that didn't land — someone disconnecting to retire a phone has to be told a
live credential is still out there, and has to still find it when they come
back to check, so it is a persistent notice and not a toast.

Also here: `Panel`/`Notice` extracted as shared tinted chrome, drawn from the
same note palette the cards use rather than Material's errorContainer, so a
warning is the same yellow a note can be. `PlainTextField` gained a visual
transformation for the password field. `formatReminder` became `formatInstant`
now that "last synced" reads it too.

Verified locally per ci-requirements.md: ktlint and detekt clean in
ci-rust-android:1.97, uniffi bindings generated from a host build and read to
confirm ULong on the summary counters, `Compatibility.Ok`/`RevokeOutcome.
Unsupported` being objects, and all five sync calls being suspend. Every
R.string/R.plurals reference cross-checked for existence, kind and format
arity. A symbol-resolution pass over the whole package caught a composable a
bad edit had deleted — ktlint and detekt both parse without resolving, so
neither could see it.

Not done: no automatic sync. The desktop is manual-only too, so this is parity
rather than a gap, but pull-to-refresh on the board is the obvious phone-native
follow-up.

Worth an operator decision, not changed here: allowBackup is still true, so
Android's cloud backup now includes a device token as well as the notes. Good
for restoring to a new phone, and a wider blast radius than before this commit.

Scribe #2777

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 15:41:02 -04:00

182 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ThoughtSync</string>
<!-- Search bar -->
<string name="search_hint">Search your notes</string>
<string name="search_clear">Clear search</string>
<string name="nav_open">Open navigation</string>
<string name="nav_labels">Labels</string>
<!-- Compose sheet -->
<string name="compose_open">New note</string>
<string name="compose_kind_note">Note</string>
<string name="compose_kind_list">List</string>
<string name="compose_title_hint">Title</string>
<string name="compose_body_hint">Take a note…</string>
<string name="compose_list_hint">One item per line</string>
<string name="compose_cancel">Cancel</string>
<string name="compose_save">Save</string>
<!-- Board -->
<string name="board_empty_note">Empty note</string>
<plurals name="board_more_items">
<item quantity="one">+%d more item</item>
<item quantity="other">+%d more items</item>
</plurals>
<!-- Empty states. Each destination says something true of ITSELF; a single
"nothing here" reads as encouragement on the board and as a fault in Trash. -->
<string name="board_empty_title">Nothing here yet</string>
<string name="board_empty_body">Tap + to start a note or a list. Everything stays on this device until you connect a server.</string>
<string name="empty_search_title">No matches</string>
<string name="empty_search_body">Nothing matched “%1$s”.</string>
<string name="empty_trash_title">Trash is empty</string>
<string name="empty_trash_body">Deleted notes wait here before they are removed for good.</string>
<string name="empty_archive_title">Nothing archived</string>
<string name="empty_archive_body">Archived notes leave the board but stay searchable.</string>
<string name="empty_reminders_title">No reminders</string>
<string name="empty_reminders_body">Notes with a reminder set will appear here.</string>
<!-- Editor -->
<string name="board_open_note">Open note</string>
<string name="editor_back">Back to notes</string>
<string name="editor_title_hint">Title</string>
<string name="editor_body_hint">Note</string>
<string name="editor_add_item">Add item</string>
<string name="editor_remove_item">Remove item</string>
<string name="editor_remove_label">Remove label</string>
<string name="editor_reminder">Set a reminder</string>
<string name="editor_make_list">Make a checklist</string>
<string name="editor_make_note">Switch to a note</string>
<string name="editor_more">More actions</string>
<string name="editor_pin">Pin</string>
<string name="editor_unpin">Unpin</string>
<string name="editor_labels">Labels…</string>
<string name="editor_archive">Archive</string>
<string name="editor_unarchive">Unarchive</string>
<string name="editor_trash">Move to trash</string>
<string name="editor_restore">Restore</string>
<string name="editor_cancel">Cancel</string>
<!-- Deleting for good is the only thing in the app that cannot be undone, so
the copy says exactly that rather than asking "Are you sure?". -->
<string name="editor_delete_forever">Delete forever</string>
<string name="editor_delete_forever_title">Delete this note?</string>
<string name="editor_delete_forever_body">It will be removed from this device and from every device you sync with. This cannot be undone.</string>
<string name="editor_delete_forever_confirm">Delete</string>
<!-- Pickers -->
<string name="color_picker_title">Color</string>
<string name="label_picker_title">Labels</string>
<string name="label_new_hint">Type a label and press enter</string>
<string name="label_from_tag">from #tag</string>
<string name="label_none_body">No labels yet. Type one above, or write a #tag in a note and it becomes one.</string>
<string name="picker_next">Next</string>
<string name="picker_set">Set</string>
<string name="picker_time_title">Pick a time</string>
<!-- Reminders -->
<string name="reminder_title">Remind me</string>
<string name="reminder_later_today">Later today</string>
<string name="reminder_tomorrow">Tomorrow</string>
<string name="reminder_next_week">Next week</string>
<string name="reminder_pick">Pick a date &amp; time</string>
<string name="reminder_clear">Remove reminder</string>
<string name="reminder_done">Done</string>
<string name="reminder_snooze_hour">Snooze 1h</string>
<string name="reminder_snooze_day">Snooze 1d</string>
<string name="recurrence_none">Once</string>
<string name="recurrence_daily">Daily</string>
<string name="recurrence_weekly">Weekly</string>
<string name="recurrence_monthly">Monthly</string>
<string name="recurrence_yearly">Yearly</string>
<!-- Store failure -->
<string name="store_unavailable_title">Your notes couldn\'t be opened</string>
<string name="store_unavailable_body">The note store on this device could not be read. Reinstalling will start a fresh one, but anything not synced to a server would be lost.</string>
<!-- Sync. Opt-in, and the copy has to carry that: being unlinked is the
normal resting state of a local-first app, not unfinished setup. -->
<string name="sync_title">Sync</string>
<string name="sync_badge_on">On</string>
<string name="sync_badge_unsent">Unsent</string>
<!-- Linked -->
<string name="sync_connected_to">Connected to</string>
<string name="sync_linked_as">as %1$s</string>
<string name="sync_last_synced">Last synced %1$s</string>
<string name="sync_never">never</string>
<string name="sync_unsent">This device has changes that haven\'t been sent yet.</string>
<string name="sync_now">Sync now</string>
<string name="sync_disconnect">Disconnect</string>
<string name="sync_disconnect_title">Stop syncing with this server?</string>
<string name="sync_disconnect_body">Your notes stay on this device, and the copy on the server is left alone. This device\'s access token is revoked, so it can\'t be used to reach the server again.</string>
<string name="sync_footer">Your notes live on this device either way — syncing just keeps a server copy in step, so your other devices can catch up.</string>
<string name="sync_failed_title">Sync failed</string>
<string name="sync_rejected_title">The server wouldn\'t accept some changes</string>
<plurals name="sync_rejected_body">
<item quantity="one">%1$d change was rejected: %2$s</item>
<item quantity="other">%1$d changes were rejected: %2$s</item>
</plurals>
<string name="sync_degraded_title">Some features aren\'t available here</string>
<string name="sync_degraded_body">This server doesn\'t support: %1$s. Everything else syncs normally.</string>
<!-- Unlinked -->
<string name="sync_offline_title">Working offline on this device</string>
<string name="sync_offline_body">Everything works without a server — your notes are stored on this phone. Connect a ThoughtSync server if you want them to reach your other devices.</string>
<string name="sync_address_label">Server address</string>
<string name="sync_address_hint">notes.example.com</string>
<string name="sync_address_help">Uses https unless you type http:// yourself.</string>
<string name="sync_check">Check</string>
<string name="sync_probe_failed">Couldn\'t reach that server</string>
<string name="sync_link_failed">Couldn\'t connect</string>
<string name="sync_server_generic">ThoughtSync server</string>
<string name="sync_server_version">v%1$s</string>
<string name="sync_compat_ok">Fully compatible.</string>
<string name="sync_compat_degraded">Compatible, but these features aren\'t available on this server: %1$s.</string>
<!-- Shown before any credential field, whenever the probed address is http://.
Android blocks cleartext by default and this app allows it so that a
self-hosted server on a LAN works at all; this is the other half of
that trade. -->
<string name="sync_insecure_title">This connection isn\'t encrypted</string>
<string name="sync_insecure_body">You\'re about to sign in over plain http. Anyone on the same network can read your password and your notes. Use https unless this is a server you control, on a network you trust.</string>
<string name="sync_signin">Sign in</string>
<string name="sync_mode_password">Email and password</string>
<string name="sync_mode_token">Device token</string>
<string name="sync_email">Email</string>
<string name="sync_password">Password</string>
<string name="sync_token">Paste a device token</string>
<string name="sync_token_help">Create one in the web app under Account → Linked devices.</string>
<string name="sync_device_name">Name for this device</string>
<string name="sync_device_name_help">Shown in your account\'s list of linked devices.</string>
<string name="sync_connect">Connect and sync</string>
<!-- An unlink whose server-side revoke didn\'t land leaves a live credential.
Never a transient message: someone disconnecting to retire a phone has to
still find this when they come back to check. -->
<string name="sync_revoke_title">This device\'s token is still valid on the server</string>
<string name="sync_revoke_unsupported">This server is older than in-app sign-out, so this device\'s token had to be left in place. Revoke it in the web app under Account → Linked devices.</string>
<string name="sync_revoke_failed">%1$s Until it\'s revoked, this device\'s token still works — you can revoke it in the web app under Account → Linked devices.</string>
<!-- What a sync did. Counts what MOVED; batches, pages and cursors are real
numbers that answer nobody\'s question. -->
<string name="sync_summary">Synced — %1$s.</string>
<string name="sync_summary_sent">sent %1$d</string>
<string name="sync_summary_received">received %1$d</string>
<string name="sync_summary_uptodate">Already up to date.</string>
<plurals name="sync_summary_attachments">
<item quantity="one">%d attachment</item>
<item quantity="other">%d attachments</item>
</plurals>
<plurals name="sync_summary_attachments_failed">
<item quantity="one">%d attachment didn\'t download — it\'ll retry on the next sync.</item>
<item quantity="other">%d attachments didn\'t download — they\'ll retry on the next sync.</item>
</plurals>
<!-- Errors -->
<string name="error_dismiss">Dismiss</string>
</resources>