{
  "id": 2937915,
  "title": "The Translate Button Is Declarative; the Community Workflow Is Not",
  "url": "https://urgent.news/2026/08/24/the-translate-button-is-declarative-the-community-workflow-is-not",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-24T04:12:17.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/susiewang/the-translate-button-is-declarative-the-community-workflow-is-not-5cc8"
  },
  "original_language": "en",
  "account": "The translate button in a multilingual community chat application may appear to solve language barriers, but the underlying workflow presents complex challenges. When a user requests translation, the system must record the request, handle failures, manage changes to the original message, and allow moderators to review the translation. The translation process itself is an imperative operation, distinct from the declarative nature of the user interface.\n\nThe tutorial demonstrates how to build a workflow around Tencent RTC's translation capability for a social messaging experience. The design adheres to six rules: recording translation requests, rejecting locally without invoking translation if the source is not eligible, handling translation failures by keeping the original message visible, discarding late results when the source changes, preserving machine translations and opening human review for disputed meanings, and labeling corrections as human corrections instead of rewriting history.\n\nThe architecture consists of an event-driven pipeline, where user commands are processed by pure decision functions, append domain events, and trigger imperative workers. Pure code determines the validity of requests and the UI display, while the imperative shell deals with operations that can fail, such as persisting events, invoking translation, and notifying moderators. This separation of pure and imperative code highlights where nondeterminism enters the system, making it clear where engineering judgment is needed.",
  "summary": "A translation button can make multilingual community chat look solved. The user clicks, translated text appears, and the implementation seems almost too easy to count as serious engineering. Then production asks the less photogenic questions: What if the message is deleted while translation is running? Does a retry create two competing translations? Can moderators inspect the original wording?…",
  "key_points": [
    "Translate button is declarative UI element, not translation process",
    "Workflow includes recording requests, handling failures and changes",
    "Six rules govern translation system architecture and operation"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}