1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-27 13:35:18 -04:00
Files
DankMaterialShell/quickshell/translations
Maddison Cohodas 48f6a0c632 feat(bar): separate workspace appearance for unfocused displays (#2687)
* feat(bar): separate workspace appearance for unfocused displays

Add a toggle in the Workspace Appearance card to style workspace
indicators independently on displays that aren't currently focused.

The card is split into Focused Display and Unfocused Display(s) tabs.
When the new master toggle is off (default), unfocused displays inherit
the focused settings, preserving existing behavior. When on, unfocused
displays use their own colors (focused/occupied/unfocused/urgent) and
focused border (enable, color, thickness).

WorkspaceSwitcher resolves the focused monitor per compositor and routes
color/border resolution through isFocusedMonitor/useUnfocusedAppearance.

* refactor(bar): address review feedback for unfocused workspace appearance

- Consolidate focused-monitor lookup into BarWidgetService.getFocusedScreenName(),
  adding Mango support, and drop the duplicate compositor switches in
  WorkspaceSwitcher (effectiveScreenName + isFocusedMonitor now use the helper).
- Extract the shared color and border options into reusable
  WorkspaceAppearanceColorOptions and WorkspaceAppearanceBorderFields components
  so the focused and unfocused tabs no longer duplicate the layout.
- Gate the unfocused-display options on BarWidgetService.focusedScreenDetectionSupported
  and show an explanatory note on compositors without focus detection (e.g. labwc),
  instead of silently no-opping.
2026-06-26 23:34:24 -04:00
..
2025-11-12 17:18:45 -05:00
2025-11-12 17:18:45 -05:00
2025-11-12 17:18:45 -05:00

DankMaterialShell Translations

This directory contains translation files for DankMaterialShell extracted from all qsTr() calls in the QML codebase.

Files

  • en.json - Source language file with English strings and file references
  • template.json - Empty template for creating new translations
  • extract_translations.py - Script to regenerate translation files

POEditor Format

The JSON files follow POEditor's import format:

[
  {
    "term": "string to translate",
    "context": "file:line",
    "reference": "Modules/Settings/AboutTab.qml:45",
    "comment": ""
  }
]

Field Descriptions

  • term: The source string in English (from qsTr() calls)
  • context: Primary location where the string appears (file:line)
  • reference: All locations where this string is used (comma-separated)
  • comment: Additional notes for translators (currently empty)

How to Create a New Translation

  1. Copy template.json to your language code (e.g., es.json for Spanish)
  2. Fill in the translation field for each entry:
    {
      "term": "Settings",
      "translation": "Configuración",
      "context": "Modals/Settings/SettingsModal.qml:147",
      "reference": "Modals/Settings/SettingsModal.qml:147",
      "comment": ""
    }
    
  3. Import to POEditor or use directly in your translation workflow

Regenerating Translation Files

To update the translation files after code changes:

cd /home/brandon/.config/quickshell/DankMaterialShellGit/translations
./extract_translations.py

This will scan all QML files and regenerate en.json and template.json.

Notes

  • Strings are deduplicated - if the same string appears in multiple locations, references are merged
  • File paths are relative to the project root
  • Line numbers are preserved for accurate context
  • Empty strings and comments are reserved for translator notes