Доброе утро.
В текущий момент, в kwin поломан перевод для kcmkwinrules в ветке master.
Можно исправить приложенным патчем.
--
С Уважением,
С Уважением,
Виктор
diff -urN source/kcmkwin/kwinrules/Messages.sh source-patched/kcmkwin/kwinrules/Messages.sh
--- source/kcmkwin/kwinrules/Messages.sh 2020-04-28 20:58:53.000000000 +0300
+++ source-patched/kcmkwin/kwinrules/Messages.sh 2020-04-29 07:49:53.761705576 +0300
@@ -1,4 +1,4 @@
#! /usr/bin/env bash
$EXTRACTRC *.ui >> rc.cpp || exit 11
-$XGETTEXT *.cpp *.h -o $podir/kcmkwinrules.pot
+$XGETTEXT `find . -name \*.cpp -o -name \*.h -o -name \*.qml` -o $podir/kcmkwinrules.pot
rm -f rc.cpp
diff -urN source/kcmkwin/kwinrules/package/contents/ui/FileDialogLoader.qml source-patched/kcmkwin/kwinrules/package/contents/ui/FileDialogLoader.qml
--- source/kcmkwin/kwinrules/package/contents/ui/FileDialogLoader.qml 2020-04-28 20:58:53.000000000 +0300
+++ source-patched/kcmkwin/kwinrules/package/contents/ui/FileDialogLoader.qml 2020-04-29 08:06:57.085091665 +0300
@@ -25,7 +25,7 @@
id: root
active: false
- property string title : i18n("Select File");
+ property string title : i18nd("kcmkwinrules", "Select File");
property string lastFolder : ""
property bool isSaveDialog : false
@@ -37,7 +37,7 @@
title: root.title
selectExisting: !root.isSaveDialog
folder: (root.lastFolder == "") ? shortcuts.home : root.lastFolder
- nameFilters: [ i18n("KWin Rules (*.kwinrule)") ]
+ nameFilters: [ i18nd("kcmkwinrules", "KWin Rules (*.kwinrule)") ]
defaultSuffix: "*.kwinrule"
Component.onCompleted: {
diff -urN source/kcmkwin/kwinrules/package/contents/ui/OptionsComboBox.qml source-patched/kcmkwin/kwinrules/package/contents/ui/OptionsComboBox.qml
--- source/kcmkwin/kwinrules/package/contents/ui/OptionsComboBox.qml 2020-04-28 20:58:53.000000000 +0300
+++ source-patched/kcmkwin/kwinrules/package/contents/ui/OptionsComboBox.qml 2020-04-29 08:09:28.938432828 +0300
@@ -43,14 +43,14 @@
var selectionCount = selectionMask.toString(2).replace(/0/g, '').length;
switch (selectionCount) {
case 0:
- return i18n("None selected");
+ return i18nd("kcmkwinrules", "None selected");
case 1:
var selectedValue = selectionMask.toString(2).length - 1;
return model.textOfValue(selectedValue);
case count:
- return i18n("All selected");
+ return i18nd("kcmkwinrules", "All selected");
}
- return i18np("%1 selected", "%1 selected", selectionCount);
+ return i18ndp("kcmkwinrules", "%1 selected", "%1 selected", selectionCount);
}
delegate: QQC2.ItemDelegate {
diff -urN source/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml source-patched/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
--- source/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml 2020-04-28 20:58:53.000000000 +0300
+++ source-patched/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml 2020-04-29 08:10:34.745102883 +0300
@@ -55,7 +55,7 @@
bottom: parent.bottom
}
helpfulAction: QQC2.Action {
- text: i18n("Add Properties...")
+ text: i18nd("kcmkwinrules", "Add Properties...")
icon.name: "list-add-symbolic"
onTriggered: {
propertySheet.open();
@@ -74,7 +74,7 @@
footer: RowLayout {
QQC2.Button {
- text: checked ? i18n("Close") : i18n("Add Properties...")
+ text: checked ? i18nd("kcmkwinrules", "Close") : i18nd("kcmkwinrules", "Add Properties...")
icon.name: checked ? "dialog-close" : "list-add-symbolic"
checkable: true
checked: propertySheet.sheetOpen
@@ -87,7 +87,7 @@
Layout.fillWidth: true
}
QQC2.Button {
- text: i18n("Detect Window Properties")
+ text: i18nd("kcmkwinrules", "Detect Window Properties")
icon.name: "edit-find"
onClicked: {
overlayModel.onlySuggestions = true;
@@ -100,8 +100,8 @@
from: 0
to: 30
textFromValue: (value, locale) => {
- return (value == 0) ? i18n("Instantly")
- : i18np("After %1 second", "After %1 seconds", value)
+ return (value == 0) ? i18nd("kcmkwinrules", "Instantly")
+ : i18ndp("kcmkwinrules", "After %1 second", "After %1 seconds", value)
}
}
@@ -120,7 +120,7 @@
parent: view
header: Kirigami.Heading {
- text: i18n("Select properties")
+ text: i18nd("kcmkwinrules", "Select properties")
}
footer: Kirigami.SearchField {
id: searchField
@@ -213,9 +213,9 @@
}
switch (type) {
case RuleItem.Boolean:
- return value ? i18n("Yes") : i18n("No");
+ return value ? i18nd("kcmkwinrules", "Yes") : i18nd("kcmkwinrules", "No");
case RuleItem.Percentage:
- return i18n("%1 %", value);
+ return i18nd("kcmkwinrules", "%1 %", value);
case RuleItem.Coordinate:
var point = value.split(',');
return i18nc("Coordinates (x, y)", "(%1, %2)", point[0], point[1]);
diff -urN source/kcmkwin/kwinrules/package/contents/ui/RulesList.qml source-patched/kcmkwin/kwinrules/package/contents/ui/RulesList.qml
--- source/kcmkwin/kwinrules/package/contents/ui/RulesList.qml 2020-04-28 20:58:53.000000000 +0300
+++ source-patched/kcmkwin/kwinrules/package/contents/ui/RulesList.qml 2020-04-29 08:11:19.915105211 +0300
@@ -69,7 +69,7 @@
Kirigami.PlaceholderMessage {
visible: ruleBookView.count == 0
anchors.fill: parent
- text: i18n("No rules for specific windows are currently set");
+ text: i18nd("kcmkwinrules", "No rules for specific windows are currently set");
}
}
@@ -77,11 +77,11 @@
id: exportInfo
icon.source: "document-export"
showCloseButton: true
- text: i18n("Select the rules to export")
+ text: i18nd("kcmkwinrules", "Select the rules to export")
actions: [
Kirigami.Action {
iconName: "document-save"
- text: i18n("Save Rules")
+ text: i18nd("kcmkwinrules", "Save Rules")
// FIXME: It does not update on selection changes
// enabled: selectedIndexes.length > 0
onTriggered: {
@@ -93,7 +93,7 @@
footer: RowLayout {
QQC2.Button {
- text: i18n("Add New...")
+ text: i18nd("kcmkwinrules", "Add New...")
icon.name: "list-add-symbolic"
enabled: !exportInfo.visible
onClicked: {
@@ -104,7 +104,7 @@
Layout.fillWidth: true
}
QQC2.Button {
- text: i18n("Import...")
+ text: i18nd("kcmkwinrules", "Import...")
icon.name: "document-import"
enabled: !exportInfo.visible
onClicked: {
@@ -112,7 +112,7 @@
}
}
QQC2.Button {
- text: i18n("Export...")
+ text: i18nd("kcmkwinrules", "Export...")
icon.name: "document-export"
enabled: ruleBookView.count > 0
checkable: true
@@ -185,7 +185,7 @@
actions: [
Kirigami.Action {
- text: i18n("Edit")
+ text: i18nd("kcmkwinrules", "Edit")
iconName: "edit-entry"
onTriggered: {
kcm.editRule(index);
@@ -193,7 +193,7 @@
}
,
Kirigami.Action {
- text: i18n("Delete")
+ text: i18nd("kcmkwinrules", "Delete")
iconName: "entry-delete"
onTriggered: {
kcm.removeRule(index);
@@ -221,7 +221,7 @@
FileDialogLoader {
id: importDialog
- title: i18n("Import Rules")
+ title: i18nd("kcmkwinrules", "Import Rules")
isSaveDialog: false
onLastFolderChanged: {
exportDialog.lastFolder = lastFolder;
@@ -233,7 +233,7 @@
FileDialogLoader {
id: exportDialog
- title: i18n("Export Rules")
+ title: i18nd("kcmkwinrules", "Export Rules")
isSaveDialog: true
onLastFolderChanged: {
importDialog.lastFolder = lastFolder;
diff -urN source/kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml source-patched/kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml
--- source/kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml 2020-04-28 20:58:53.000000000 +0300
+++ source-patched/kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml 2020-04-29 08:11:49.448440068 +0300
@@ -63,13 +63,13 @@
Layout.fillWidth: true
}
QQC2.RadioButton {
- text: i18n("Yes")
+ text: i18nd("kcmkwinrules", "Yes")
checked: ruleValue
Layout.margins: Kirigami.Units.smallSpacing
onToggled: valueEditor.valueEdited(checked)
}
QQC2.RadioButton {
- text: i18n("No")
+ text: i18nd("kcmkwinrules", "No")
checked: !ruleValue
Layout.margins: Kirigami.Units.smallSpacing
onToggled: valueEditor.valueEdited(!checked)
@@ -136,14 +136,14 @@
onMoved: valueEditor.valueEdited(Math.round(slider.value))
}
QQC2.Label {
- text: i18n("%1 %", Math.round(slider.value))
+ text: i18nd("kcmkwinrules", "%1 %", Math.round(slider.value))
horizontalAlignment: Qt.AlignRight
Layout.minimumWidth: maxPercentage.width + Kirigami.Units.smallSpacing
Layout.margins: Kirigami.Units.smallSpacing
}
TextMetrics {
id: maxPercentage
- text: i18n("%1 %", 100)
+ text: i18nd("kcmkwinrules", "%1 %", 100)
}
}
}
_______________________________________________ kde-russian mailing list [email protected] https://lists.kde.ru/mailman/listinfo/kde-russian
