chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.3.1 Latest 5 packages
0
0
Names and identifiers are kept from a browser's translation
Merged Approved
This marks the ALT badge, ⓘ lines, short times, account names, @handles, DIDs, mentions and the wordmark translate="no". A new translateOf finds a whole-text @handle or DID. I read the whole diff and found nothing wrong.
- Matching:
translateOfonly matches a whole text that is a domain or a DID, so captions and comments are translated as before. The tests cover its edge cases (v1.2,3.5, and a handle inside a sentence). - Server test: the ssr feed check guards the ALT badge and the byline handle. It also checks that the Spanish captions stay translatable.
- Changeset and docs: the changeset and
docs/internals.mdare both there. - Not run: I didn't run the checks.
Two small notes, neither blocking:
- A bare dotted word such as
Node.jsorMr.Smithas a whole text or title would also be kept from translation. That is harmless. HeaderViewnow splitsmetainto per-item spans, so its DOM differs from before. Nothing I could see depends on the old shape.
Thanks. Kept both as they are. A bare domain stays matched because a screen's title can be a handle written without its @, and a lone dotted word kept as written loses little. Nothing reads HeaderView's meta as one text node: the line still reads 'a · b' and the server test hydrates it unchanged.
All checks have passed
8 passed
Merged as 5fe1e2a
Chrome on iOS, translating next.grain.social, drew a photo's ALT badge as "OLD": it read "ALT" as German's "alt". The renderer and the shell now mark names and identifiers
translate="no", so a browser's translation leaves them alone and translates people's words as before.Claude Opus 5.5 · low
What changes
Kept from translation: a picture's ALT badge and its ⓘ lines (camera, lens, settings, under a carousel too), a
Time's short time ("3h"), accounts' names and @handles (aLinkwithstyle: "name"; aText,Linklabel,Headertitle or meta item,Baror sheet title or pushed screen's title that is an @handle or a DID whole; a mention in text; a profile's names; aFaceslist's,Accounts', the composer's @ suggestions' and the shell's search rows; a quoted post's byline; the handle a delete asks to be typed) and the app's wordmark (Nav, the root screen's title, the story viewer's).Translated as before: captions, gallery titles, comments, and the app's own words ("Show more", tab labels).
For an app's authors:
translateOf(text), exported from@hud/renderer, says"no"for an @handle or a DID and nothing else;LinkButtontakestranslate.Why
The feed mixes languages (Spanish and French captions under
<html lang="en">), so the browser offers to translate the whole page, and translates UI words and identifiers with it: "ALT" became "OLD" from German, "13h" became "13 Uhr" into German.translate="no"is the HTML attribute Chrome, Safari and Google Translate honour. Identifiers are found in the renderer (web/renderer/src/translate.ts) rather than by a new catalog prop: a byline's handle is a plainTextin Grain's views, and a prop would need the resolver, HUDKit and hudkit to change for something only a web page's translation reads. iOS and Android don't translate pages.How it was checked
cd web && npm run check,npm run unit(withtranslate.test.ts),npm run ssr, andnode harness/docs.mjs.translate="no", or where its Spanish gallery title or caption is; reverting the badge andTextmade it fail as it should.--lang=de, locale de-DE), the feed drawn by the renderer as a server does, translated by Google Translate's page widget: German to English, the ALT badges read "OLD" before and "ALT" after; English to German, the times read "13 Uhr" before and "13h" after, the handles and names stay, and the captions, the title and "Show more" ("Mehr anzeigen") are translated.Shortcomings
<title>and meta tags can't carry the attribute, so a translated tab title still translates an @handle in it.just checkin full (cargo, e2e) is left to CI: no Rust changed.Review
A quick look.
web/renderer/src/translate.tsfirst, thenText.svelteandLink.svelte; the rest is one attribute each.