# Feature OP-19082 - Display exact translation key of each UI element directly in the interface

Project: OpenProject
Status: new
URL: https://community.openproject.org/work_packages/OP-19082

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Low |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes | 2 |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Translations |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As a** \[translator / localization contributor\]  
**I want to** be able to see the exact translation key (I18n string tag) of each UI element directly in the interface  
**so that** I can safely translate, review, and debug strings with full context, without guessing which key corresponds to which UI element.

## Acceptance criteria

*   OpenProject includes a special **“string‑tag” language** (e.g. `tags.yml`).
    
*   When this language is selected, the UI displays **translation keys** (like `root -> activities -> work_packages -> activity_tab -> label_activity_show_only_comments`) instead of the translated text.
    
*   The `tags.yml` file can be generated automatically from existing YAML translation files (for example from `en.yml`) via a simple script.
    
*   The feature does not require changes to the core product logic or runtime behavior for non‑translator users.
    
*   (Optional) A **“Translator mode”** flag exists in user settings (`User settings → Language`).
    
*   When this flag is enabled, a **language switch** appears in the UI (e.g. near the avatar or in the user menu).
    
*   The language switch allows instant switching between:
    
    *   The user’s preferred language,
        
    *   English (default),
        
    *   And the “string‑tag” language (or any other language for comparison).
        

## Technical notes

*   The “string‑tag” language can initially be implemented as a **YAML‑based language file** (`config/locales/tags.yml`), generated from the existing key structure.
    
*   A script can walk the `en.yml` (or equivalent) tree and produce `tags.yml` where each value is the full key path.
    
*   No new I18n backend changes are needed; this is a specialization of the existing internationalization system.
    
*   In the long term, a lightweight **dev‑mode mechanism** could inject keys on the fly without relying on a dedicated language, but this would add more “dev‑only” code and is intentionally out of scope for the first version.
    
*   The language switch in the UI can reuse the existing language‑selection logic and only be exposed when the “Translator mode” flag is enabled.
    

## Permissions and visibility considerations

**To whom is this feature visible?**

*   Visible to **all users** who select the “string‑tag” language in their account settings.
    
*   Visible to **translators and contributors** who have the “Translator mode” flag enabled.
    
*   The “Translator mode” flag can be restricted (e.g. to users with admin, translation, or dev roles) via configuration if desired.
    

**When is it not visible?**

*   The “string‑tag” language is hidden by default and must be explicitly enabled in the system configuration.
    
*   The “Translator mode” flag and the in‑UI language switch are not shown to users who do not have the required role or permission.
    
*   The feature is not visible in the UI when the environment is not in “development” or “translator” mode.
    

## Translation considerations

*   The **main user‑facing texts** of this feature include:
    
    *   Label for the “Translator mode” flag (e.g., “Translator mode” / “Mode traducteur”).
        
    *   Label for the in‑UI language switch (e.g., “Language / Switch language”).
        
    *   The special language name (e.g., “String‑tag language” / “String‑tag”).
        
*   These labels should be present in **English, German, French, and other major supported languages**.
    
*   The key paths themselves are not meant to be translated; they are **development‑oriented strings** visible only to contributors and translators.
    

**Key terms and phrases (in main languages):**

<br>

<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><thead class="op-uc-table--head"><tr class="op-uc-table--row"><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">English</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">French</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">German</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Translator mode</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Mode traducteur</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Übersetzermodus</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">String‑tag language</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Langue « string‑tag »</p></td><td class="op-uc-table--cell"><p class="op-uc-p">String‑Tag‑Sprache</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Show translation keys</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Afficher les clés de traduction</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Übersetzungsschlüssel anzeigen</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Language switch</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Sélecteur de langue</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Sprachwechsler</p></td></tr></tbody></table></figure><br>

<br>

## Out of scope

*   Dynamically injecting translation keys via a frontend dev‑tool (e.g. browser extension or overlay) is **not** part of this story.
    
*   Overhauling the existing I18n architecture or key‑naming conventions is **not** required; this feature works with the current structure.
    
*   Creating a full‑fledged “translation editor” inside OpenProject (with glossary, context screenshots, etc.) is a separate feature and out of scope here.
    
*   Supporting “string‑tag” languages for non‑UI texts (e.g. emails, background workers) is optional and can be addressed in a later follow‑up.
    

## Teams to be informed / consulted

Please set the **“To be informed / consulted teams”** field to include:

*   **Frontend team** (for UI changes and language‑switch implementation)
    
*   **Backend / I18n team** (for translation‑file structure and permissions)
    
*   **DevOps / Release team** (if we want to enable/disable this feature per environment)
    
*   **Community / Translation team** (since this feature directly impacts translators and contributors)
    

<br>
