mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 17:52:10 -04:00
feat: add setting to change and hotreload locale (#1817)
* feat: add setting to change and hotreload locale * fix: typo in component id * feat: add persistent locale setting * feat: wrap useLocale in a settings set hook, enable locale hotreload when editing settings file * chore: update translation and settings file * feat: enable fuzzy search in locale setting * fix: regenerate translations with official plugins cloned * fix: revert back to system's locale for displaying certain time formats
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import json
|
||||
import re
|
||||
from collections import Counter
|
||||
from pathlib import Path
|
||||
|
||||
@@ -82,7 +82,15 @@ CATEGORY_KEYWORDS = {
|
||||
"Displays": ["monitor", "screen", "resolution"],
|
||||
"Desktop Widgets": ["conky", "desktop clock"],
|
||||
"Audio": ["sound", "volume", "speaker", "microphone", "headphones", "pipewire"],
|
||||
"Window Rules": ["window", "rules", "matching", "floating", "fullscreen", "opacity"],
|
||||
"Window Rules": [
|
||||
"window",
|
||||
"rules",
|
||||
"matching",
|
||||
"floating",
|
||||
"fullscreen",
|
||||
"opacity",
|
||||
],
|
||||
"Locale": ["locale", "language", "country"],
|
||||
}
|
||||
|
||||
TAB_INDEX_MAP = {
|
||||
@@ -115,6 +123,7 @@ TAB_INDEX_MAP = {
|
||||
"DesktopWidgetsTab.qml": 27,
|
||||
"WindowRulesTab.qml": 28,
|
||||
"AudioTab.qml": 29,
|
||||
"LocaleTab.qml": 30,
|
||||
}
|
||||
|
||||
TAB_CATEGORY_MAP = {
|
||||
@@ -147,6 +156,7 @@ TAB_CATEGORY_MAP = {
|
||||
27: "Desktop Widgets",
|
||||
28: "Window Rules",
|
||||
29: "Audio",
|
||||
30: "Locale",
|
||||
}
|
||||
|
||||
SEARCHABLE_COMPONENTS = [
|
||||
|
||||
@@ -3925,6 +3925,27 @@
|
||||
],
|
||||
"description": "Automatically lock the screen when DMS starts"
|
||||
},
|
||||
{
|
||||
"section": "lockBeforeSuspend",
|
||||
"label": "Lock before suspend",
|
||||
"tabIndex": 11,
|
||||
"category": "Lock Screen",
|
||||
"keywords": [
|
||||
"automatic",
|
||||
"automatically",
|
||||
"before",
|
||||
"lock",
|
||||
"login",
|
||||
"password",
|
||||
"prepares",
|
||||
"screen",
|
||||
"security",
|
||||
"sleep",
|
||||
"suspend",
|
||||
"system"
|
||||
],
|
||||
"description": "Automatically lock the screen when the system prepares to suspend"
|
||||
},
|
||||
{
|
||||
"section": "lockScreenNotificationMode",
|
||||
"label": "Notification Display",
|
||||
@@ -5849,27 +5870,6 @@
|
||||
"icon": "schedule",
|
||||
"description": "Gradually fade the screen before locking with a configurable grace period"
|
||||
},
|
||||
{
|
||||
"section": "lockBeforeSuspend",
|
||||
"label": "Lock before suspend",
|
||||
"tabIndex": 21,
|
||||
"category": "Power & Sleep",
|
||||
"keywords": [
|
||||
"automatically",
|
||||
"before",
|
||||
"energy",
|
||||
"lock",
|
||||
"power",
|
||||
"prepares",
|
||||
"screen",
|
||||
"security",
|
||||
"shutdown",
|
||||
"sleep",
|
||||
"suspend",
|
||||
"system"
|
||||
],
|
||||
"description": "Automatically lock the screen when the system prepares to suspend"
|
||||
},
|
||||
{
|
||||
"section": "fadeToLockGracePeriod",
|
||||
"label": "Lock fade grace period",
|
||||
@@ -6437,5 +6437,33 @@
|
||||
"volume"
|
||||
],
|
||||
"icon": "computer"
|
||||
},
|
||||
{
|
||||
"section": "_tab_30",
|
||||
"label": "Locale",
|
||||
"tabIndex": 30,
|
||||
"category": "Locale",
|
||||
"keywords": [
|
||||
"country",
|
||||
"language",
|
||||
"locale"
|
||||
],
|
||||
"icon": "language"
|
||||
},
|
||||
{
|
||||
"section": "locale",
|
||||
"label": "Locale Settings",
|
||||
"tabIndex": 30,
|
||||
"category": "Locale",
|
||||
"keywords": [
|
||||
"change",
|
||||
"country",
|
||||
"interface",
|
||||
"language",
|
||||
"locale",
|
||||
"settings"
|
||||
],
|
||||
"icon": "language",
|
||||
"description": "Change the locale used by the DMS interface."
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2043,6 +2043,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Change the locale used by the DMS interface.",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Channel",
|
||||
"translation": "",
|
||||
@@ -3114,6 +3121,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Current Locale",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Current Monitor",
|
||||
"translation": "",
|
||||
@@ -3849,6 +3863,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Disk Usage Display",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Disks",
|
||||
"translation": "",
|
||||
@@ -6936,6 +6957,20 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Locale",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Locale Settings",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Location",
|
||||
"translation": "",
|
||||
@@ -10184,6 +10219,20 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Remaining",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Remaining / Total",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Remove",
|
||||
"translation": "",
|
||||
@@ -11549,6 +11598,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Show Memory in GB",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Show Network",
|
||||
"translation": "",
|
||||
@@ -11661,6 +11717,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Show Swap",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Show System Date",
|
||||
"translation": "",
|
||||
@@ -11766,6 +11829,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Show in GB",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Show launcher overlay when typing in Niri overview. Disable to use another launcher.",
|
||||
"translation": "",
|
||||
@@ -12914,6 +12984,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Total",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Total Jobs",
|
||||
"translation": "",
|
||||
|
||||
Reference in New Issue
Block a user