Skip to content
quarry Artifact [27b475233b]
Login

Artifact [27b475233b]

Artifact 27b475233b5efceeb1c400796f35771197e4db9909d4ac6aab09deffb2febac0:

Ticket change [27b475233b] - New ticket [cfef2718e1] Localisation: a language selector and translatable interface strings. by dmestas on 2026-08-18 19:37:21.
D 2026-08-18T19:37:21.949
J cmimetype text/x-markdown
J comment Forgejo\scarries\sa\slanguage\sselector\sin\sits\sfooter.\squarry\shas\sthe\sslot\sfor\sone;\swhat\sit\sdoes\snot\shave\sis\sanything\sto\sselect\sbetween.\n\n##\sWhat\shas\sto\shappen\sfirst\n\nEvery\svisible\sstring\sis\scurrently\sa\sliteral\sinside\sa\sGo\stemplate.\sTranslation\sneeds\sthem\sextracted\sto\sa\scatalogue\skeyed\sby\smessage\sid,\swith\sthe\stemplates\scalling\sa\slookup.\sThat\sis\sthe\sbulk\sof\sthe\swork\sand\sit\sis\smechanical.\n\n##\sChoosing\sa\slanguage,\swithout\sJavaScript\n\nThe\stheme\sswitcher\salready\sestablishes\sthe\spattern\sthis\sshould\sfollow:\sa\sform\sPOST\sto\s`/lang`,\sa\scookie,\sand\sthe\schoice\sresolved\sserver-side\sbefore\sthe\sfirst\sbyte.\sThat\skeeps\sthe\sone-script\srule\sand\savoids\sa\sflash\sof\sthe\swrong\slanguage.\s`Accept-Language`\ssupplies\sthe\sdefault\swhen\sno\scookie\sis\sset,\swhich\sis\sthe\s"system"\sstate\sof\sthe\ssame\sthree-way\sshape.\n\n##\sWhat\smust\sNOT\sbe\stranslated\n\nRepository\scontent.\sCheck-in\scomments,\swiki\spages,\stickets\sand\sfile\snames\sare\sthe\scorpus,\sin\swhatever\slanguage\stheir\sauthors\swrote.\sOnly\squarry\schrome\sis\stranslatable,\sand\sthe\sboundary\sneeds\sto\sbe\sexplicit\sor\sa\stranslator\swill\sreasonably\sassume\sotherwise.\n\n##\sTwo\sthings\sthat\swill\sbite\n\n-\sDates\salready\sgo\sthrough\sa\srelative-time\shelper\s(`ago`),\swhich\sis\sEnglish-only\sand\spluralises\sin\sEnglish.\sIt\sneeds\sthe\scatalogue\stoo,\sand\splural\srules\sare\snot\suniform\sacross\slanguages\s—\sthis\sis\sthe\spart\sthat\scannot\sbe\sdone\sby\sstring\ssubstitution\salone.\n-\sThe\slayout\sis\scurrently\ssized\sby\sEnglish.\sGerman\scompounds\sand\sJapanese\sline-breaking\swill\sboth\sfind\sthe\splaces\swhere\sa\swidth\swas\schosen\sby\seye.\n\nNot\surgent,\sbut\sworth\sdeciding\sbefore\sthe\sstring\scount\sgrows\smuch\sfurther:\sextraction\sgets\smore\sexpensive\sper\sscreen\sadded.
J severity Minor
J status Open
J title Localisation:\sa\slanguage\sselector\sand\stranslatable\sinterface\sstrings
J type Feature_Request
K cfef2718e1ba1f49a8ff59d9e9f9948287b9379a
U dmestas
Z 98f15b4dc9a9286de7f85096ae7ce1db