forked from Shinonome/dots-hyprland
move translations into quickshell folder
This commit is contained in:
@@ -14,6 +14,7 @@ Singleton {
|
|||||||
property bool isScanning: scanLanguagesProcess.running
|
property bool isScanning: scanLanguagesProcess.running
|
||||||
property bool isLoading: false
|
property bool isLoading: false
|
||||||
property string translationKeepSuffix: "/*keep*/"
|
property string translationKeepSuffix: "/*keep*/"
|
||||||
|
property string translationsPath: Quickshell.shellPath("translations")
|
||||||
|
|
||||||
property string languageCode: {
|
property string languageCode: {
|
||||||
var configLang = Config?.options.language.ui ?? "auto";
|
var configLang = Config?.options.language.ui ?? "auto";
|
||||||
@@ -26,7 +27,7 @@ Singleton {
|
|||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: scanLanguagesProcess
|
id: scanLanguagesProcess
|
||||||
command: ["find", FileUtils.trimFileProtocol(Qt.resolvedUrl(Directories.config + "/quickshell/translations/").toString()), "-name", "*.json", "-exec", "basename", "{}", ".json", ";"]
|
command: ["find", root.translationsPath, "-name", "*.json", "-exec", "basename", "{}", ".json", ";"]
|
||||||
running: true
|
running: true
|
||||||
|
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
@@ -60,7 +61,7 @@ Singleton {
|
|||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: translationFileView
|
id: translationFileView
|
||||||
path: root.languageCode?.length > 0 ? Qt.resolvedUrl(Directories.config + "/quickshell/translations/" + root.languageCode + ".json") : ""
|
path: root.languageCode?.length > 0 ? Qt.resolvedUrl(`${root.translationsPath}/${root.languageCode}.json`) : ""
|
||||||
|
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
var textContent = "";
|
var textContent = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user