Latin rises again in the translate button
Posts written in Latin used to die at the translate button, then ask the model again on every visit. Now any two- or three-letter language code gets through, so quod erat demonstrandum reads in English.

You open a post that begins Quod erat demonstrandum and click Translate. A moment later the English sits where the Latin was, with "Translated from Latin" underneath and "Show original" beside it. Before this, that click came back as an unsupported source language and the post stayed as it was.
Credit goes to mnapoli, who loosened the gate in front of the model. The translator used to accept a source language only if the machine's locale tables knew it, and those tables have no Latin, so the model's correct "la" was thrown out. Now the answer only has to be two or three lowercase letters. The language you translate into still has to come from the locale list. A good translation is cached for seven days, and a translated body over 16,000 characters is rejected.
One catch. Because the gate checks the shape of the code and not whether the language exists, a meaningless answer gets through too. A model that returns xx or zxx has that code cached and printed as "Translated from xx" instead of an error.
Key files · #1325
- app/
Actions/ CreateCommitTranslation.php - app/
Services/ CommitTranslations.php - app/
Ai/ CommitTranslator.phpAgents/ - app/
Http/ CommitTranslationController.phpControllers/ - app/
Http/ CreateCommitTranslationRequest.phpRequests/ - app/
Jobs/ DetectCommitLanguage.php - resources/
js/ commit-translation.tsxcomponents/ - tests/
Feature/ CommitTranslationControllerTest.phpControllers/