Skip to content

Use template variables for version numbers in translation strings #3595

@KJ7LNW

Description

@KJ7LNW

Issue Description

Currently, version numbers are hardcoded in translation strings in the announcement component:

// English (webview-ui/src/i18n/locales/en/chat.json)
"title": "🎉 Roo Code 3.16 Released",
"description": "Roo Code 3.16 brings new features and improvements based on your feedback."

// Spanish (webview-ui/src/i18n/locales/es/chat.json)
"title": "🎉 Roo Code 3.16 publicado",
"description": "Roo Code 3.16 trae nuevas funcionalidades y mejoras basadas en tus comentarios."

This is inefficient because:

  1. All translation files need to be updated manually with each new version release
  2. Translations may become outdated if not all files are updated
  3. It creates unnecessary work for translators

Proposed Solution

Replace hardcoded version numbers with template variables:

// English
"title": "🎉 Roo Code {{version}} Released",
"description": "Roo Code {{version}} brings new features and improvements based on your feedback."

// Spanish
"title": "🎉 Roo Code {{version}} publicado",
"description": "Roo Code {{version}} trae nuevas funcionalidades y mejoras basadas en tus comentarios."

Then update the Announcement component to pass the current version from package.json to the translation function.

Benefits

  • Translations only need to be updated when the text content changes, not for version bumps
  • Ensures consistent version numbers across all languages
  • Reduces maintenance overhead for translators

Current app version: 3.16.6 (from package.json)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions