Доброй ночи.
В kdeconnect-kde, в новой версии 1.4, без перевода два модуля.
Окно приложения, и окно отправки SMS.
Приложу патч для Messages.sh.
Само создание файлов локализации не исправило проблему.
Текст из qml файлов отображался без перевода.
Если наложить второй патч, который приложил к этому сообщению,
то перевод отображается.
 
-- 
С Уважением,
Виктор
 
victorr2...@yandex.ru
 
diff -urN kdeconnect-kde-1.4/app/Messages.sh kdeconnect-kde-1.4-patched/app/Messages.sh
--- kdeconnect-kde-1.4/app/Messages.sh	1970-01-01 03:00:00.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/Messages.sh	2019-12-21 00:41:27.981183614 +0300
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+$EXTRACTRC `find . -name '*.ui' -o -name '*.rc'` >> rc.cpp
+$XGETTEXT `find . -name '*.cpp' -o -name '*.qml'` -o $podir/kdeconnect-app.pot
diff -urN kdeconnect-kde-1.4/smsapp/Messages.sh kdeconnect-kde-1.4-patched/smsapp/Messages.sh
--- kdeconnect-kde-1.4/smsapp/Messages.sh	1970-01-01 03:00:00.000000000 +0300
+++ kdeconnect-kde-1.4-patched/smsapp/Messages.sh	2019-12-21 00:41:27.981183614 +0300
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+$EXTRACTRC `find . -name '*.ui' -o -name '*.rc'` >> rc.cpp
+$XGETTEXT `find . -name '*.cpp' -o -name '*.qml'` -o $podir/kdeconnect-sms.pot
diff -urN kdeconnect-kde-1.4/app/qml/DevicePage.qml kdeconnect-kde-1.4-patched/app/qml/DevicePage.qml
--- kdeconnect-kde-1.4/app/qml/DevicePage.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/DevicePage.qml	2019-12-21 01:17:13.028331884 +0300
@@ -64,11 +64,11 @@
                     Kirigami.Action {
                         iconName:"network-disconnect"
                         onTriggered: deviceView.currentDevice.unpair()
-                        text: i18n("Unpair")
+                        text: i18nd("kdeconnect-app", "Unpair")
                     },
                     Kirigami.Action {
                         iconName:"hands-free"
-                        text: i18n("Send Ping")
+                        text: i18nd("kdeconnect-app", "Send Ping")
                         onTriggered: {
                             deviceView.currentDevice.pluginCall("ping", "sendPing");
                         }
@@ -91,19 +91,19 @@
                 property list<QtObject> plugins : [
 
                     PluginItem {
-                        name: i18n("Multimedia control")
+                        name: i18nd("kdeconnect-app", "Multimedia control")
                         interfaceFactory: MprisDbusInterfaceFactory
                         component: "qrc:/qml/mpris.qml"
                         pluginName: "mprisremote"
                     },
                     PluginItem {
-                        name: i18n("Remote input")
+                        name: i18nd("kdeconnect-app", "Remote input")
                         interfaceFactory: RemoteControlDbusInterfaceFactory
                         component: "qrc:/qml/mousepad.qml"
                         pluginName: "remotecontrol"
                     },
                     PluginItem {
-                        name: i18n("Presentation Remote")
+                        name: i18nd("kdeconnect-app", "Presentation Remote")
                         interfaceFactory: RemoteKeyboardDbusInterfaceFactory
                         component: "qrc:/qml/presentationRemote.qml"
                         pluginName: "remotecontrol"
@@ -111,7 +111,7 @@
                     PluginItem {
                         readonly property var lockIface: LockDeviceDbusInterfaceFactory.create(deviceView.currentDevice.id())
                         pluginName: "lockdevice"
-                        name: lockIface.isLocked ? i18n("Unlock") : i18n("Lock")
+                        name: lockIface.isLocked ? i18nd("kdeconnect-app", "Unlock") : i18nd("kdeconnect-app", "Lock")
                         onClick: function() {
                             lockIface.isLocked = !lockIface.isLocked;
                         }
@@ -119,13 +119,13 @@
                     PluginItem {
                         readonly property var findmyphoneIface: FindMyPhoneDbusInterfaceFactory.create(deviceView.currentDevice.id())
                         pluginName: "findmyphone"
-                        name: i18n("Find Device")
+                        name: i18nd("kdeconnect-app", "Find Device")
                         onClick: function() {
                             findmyphoneIface.ring()
                         }
                     },
                     PluginItem {
-                        name: i18n("Run command")
+                        name: i18nd("kdeconnect-app", "Run command")
                         interfaceFactory: RemoteCommandsDbusInterfaceFactory
                         component: "qrc:/qml/runcommand.qml"
                         pluginName: "remotecommands"
@@ -133,14 +133,14 @@
                     PluginItem {
                         readonly property var shareIface: ShareDbusInterfaceFactory.create(deviceView.currentDevice.id())
                         pluginName: "share"
-                        name: i18n("Share File")
+                        name: i18nd("kdeconnect-app", "Share File")
                         onClick: function() {
                             fileDialog.open()
                             shareIface.shareUrl(fileDialog.fileUrl)
                         }
                     },
                     PluginItem {
-                        name: i18n("Volume control")
+                        name: i18nd("kdeconnect-app", "Volume control")
                         interfaceFactory: RemoteSystemVolumeDbusInterfaceFactory
                         component: "qrc:/qml/volume.qml"
                         pluginName: "remotesystemvolume"
@@ -154,7 +154,7 @@
                 readonly property var actions: []
                 Button {
                     anchors.centerIn: parent
-                    text: i18n("Pair")
+                    text: i18nd("kdeconnect-app", "Pair")
                     icon.name:"network-connect"
                     onClicked: deviceView.currentDevice.requestPair()
                 }
@@ -167,13 +167,13 @@
                 RowLayout {
                         anchors.centerIn: parent
                     Button {
-                        text: i18n("Accept")
+                        text: i18nd("kdeconnect-app", "Accept")
                         icon.name:"dialog-ok"
                         onClicked: deviceView.currentDevice.acceptPairing()
                     }
 
                     Button {
-                        text: i18n("Reject")
+                        text: i18nd("kdeconnect-app", "Reject")
                         icon.name:"dialog-cancel"
                         onClicked: deviceView.currentDevice.rejectPairing()
                     }
@@ -188,7 +188,7 @@
 
                 Label {
                     anchors.centerIn: parent
-                    text: i18n("This device is not reachable")
+                    text: i18nd("kdeconnect-app", "This device is not reachable")
                 }
             }
         }
@@ -196,7 +196,7 @@
 
     FileDialog {
         id: fileDialog
-        title: i18n("Please choose a file")
+        title: i18nd("kdeconnect-app", "Please choose a file")
         folder: shortcuts.home
     }
 }
diff -urN kdeconnect-kde-1.4/app/qml/FindDevicesPage.qml kdeconnect-kde-1.4-patched/app/qml/FindDevicesPage.qml
--- kdeconnect-kde-1.4/app/qml/FindDevicesPage.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/FindDevicesPage.qml	2019-12-21 01:17:13.084998549 +0300
@@ -32,10 +32,10 @@
     }
 
     objectName: "FindDevices"
-    title: i18n("Pair")
+    title: i18nd("kdeconnect-app", "Pair")
 
     Label {
-        text: i18n("No devices found")
+        text: i18nd("kdeconnect-app", "No devices found")
         anchors.centerIn: parent
         visible: devices.count === 0
     }
@@ -50,11 +50,11 @@
                 text: switch (parseInt(section))
                 {
                     case DevicesModel.Paired:
-                        return i18n("Remembered")
+                        return i18nd("kdeconnect-app", "Remembered")
                     case DevicesModel.Reachable:
-                        return i18n("Available")
+                        return i18nd("kdeconnect-app", "Available")
                     case (DevicesModel.Reachable | DevicesModel.Paired):
-                        return i18n("Connected")
+                        return i18nd("kdeconnect-app", "Connected")
                 }
 
             }
diff -urN kdeconnect-kde-1.4/app/qml/main.qml kdeconnect-kde-1.4-patched/app/qml/main.qml
--- kdeconnect-kde-1.4/app/qml/main.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/main.qml	2019-12-21 01:17:13.084998549 +0300
@@ -33,7 +33,7 @@
 
     Kirigami.Action {
         id: findDevicesAction
-        text: i18n("Find devices...")
+        text: i18nd("kdeconnect-app", "Find devices...")
         iconName: "list-add"
         checked: pageStack.currentItem && pageStack.currentItem.objectName == "FindDevices"
 
diff -urN kdeconnect-kde-1.4/app/qml/mousepad.qml kdeconnect-kde-1.4-patched/app/qml/mousepad.qml
--- kdeconnect-kde-1.4/app/qml/mousepad.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/mousepad.qml	2019-12-21 01:17:13.084998549 +0300
@@ -27,7 +27,7 @@
 Kirigami.Page
 {
     id: mousepad
-    title: i18n("Remote Control")
+    title: i18nd("kdeconnect-app", "Remote Control")
     property QtObject pluginInterface
     property QtObject device
 
diff -urN kdeconnect-kde-1.4/app/qml/mpris.qml kdeconnect-kde-1.4-patched/app/qml/mpris.qml
--- kdeconnect-kde-1.4/app/qml/mpris.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/mpris.qml	2019-12-21 01:17:13.084998549 +0300
@@ -30,7 +30,7 @@
     property bool muted: false
     property int volumeUnmuted
     property var volume: pluginInterface.volume
-    title: i18n("Multimedia Controls")
+    title: i18nd("kdeconnect-app", "Multimedia Controls")
 
     onVolumeChanged: {
         if (muted && volume != 0) {
@@ -73,7 +73,7 @@
 
     Label {
         id: noPlayersText
-        text: i18n("No players available")
+        text: i18nd("kdeconnect-app", "No players available")
         anchors.centerIn: parent
         visible: pluginInterface.playerList.length == 0
     }
@@ -121,7 +121,7 @@
         Label {
             id: artistAlbum
             Layout.fillWidth: true
-            text: i18n("%1 - %2", root.pluginInterface.artist, root.pluginInterface.album)
+            text: i18nd("kdeconnect-app", "%1 - %2", root.pluginInterface.artist, root.pluginInterface.album)
             visible: !nowPlaying.visible && root.pluginInterface.album.length > 0 && root.pluginInterface.artist.length > 0
             wrapMode: Text.Wrap
         }
diff -urN kdeconnect-kde-1.4/app/qml/presentationRemote.qml kdeconnect-kde-1.4-patched/app/qml/presentationRemote.qml
--- kdeconnect-kde-1.4/app/qml/presentationRemote.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/presentationRemote.qml	2019-12-21 01:17:13.084998549 +0300
@@ -26,12 +26,12 @@
 Kirigami.Page
 {
     id: mousepad
-    title: i18n("Presentation Remote")
+    title: i18nd("kdeconnect-app", "Presentation Remote")
     property QtObject pluginInterface
 
     actions.main: Kirigami.Action {
         icon.name: "view-fullscreen"
-        text: i18n("Enable Full-Screen")
+        text: i18nd("kdeconnect-app", "Enable Full-Screen")
         onTriggered: {
             mousepad.pluginInterface.sendKeyPress("", 25 /*XK_F5*/);
         }
diff -urN kdeconnect-kde-1.4/app/qml/runcommand.qml kdeconnect-kde-1.4-patched/app/qml/runcommand.qml
--- kdeconnect-kde-1.4/app/qml/runcommand.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/runcommand.qml	2019-12-21 01:17:13.084998549 +0300
@@ -27,15 +27,15 @@
 Kirigami.Page
 {
     id: root
-    title: i18n("Run command")
+    title: i18nd("kdeconnect-app", "Run command")
     property QtObject pluginInterface
 
     actions.main: Kirigami.Action {
         icon.name: "document-edit"
-        text: i18n("Edit commands")
+        text: i18nd("kdeconnect-app", "Edit commands")
         onTriggered: {
             pluginInterface.editCommands();
-            showPassiveNotification(i18n("You can edit commands on the connected device"));
+            showPassiveNotification(i18nd("kdeconnect-app", "You can edit commands on the connected device"));
         }
     }
 
@@ -55,7 +55,7 @@
 
     Label {
         visible: commandsList.count === 0
-        text: i18n("No commands defined")
+        text: i18nd("kdeconnect-app", "No commands defined")
         anchors.centerIn: parent
     }
 
diff -urN kdeconnect-kde-1.4/app/qml/volume.qml kdeconnect-kde-1.4-patched/app/qml/volume.qml
--- kdeconnect-kde-1.4/app/qml/volume.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/app/qml/volume.qml	2019-12-21 01:17:13.084998549 +0300
@@ -27,7 +27,7 @@
 Kirigami.Page
 {
     id: root
-    title: i18n("Volume control")
+    title: i18nd("kdeconnect-app", "Volume control")
     property QtObject pluginInterface
 
     ListView {
diff -urN kdeconnect-kde-1.4/smsapp/qml/ChatMessage.qml kdeconnect-kde-1.4-patched/smsapp/qml/ChatMessage.qml
--- kdeconnect-kde-1.4/smsapp/qml/ChatMessage.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/smsapp/qml/ChatMessage.qml	2019-12-21 01:19:52.564994127 +0300
@@ -119,7 +119,7 @@
 			Controls.Menu {
 				id: contextMenu
 				Controls.MenuItem {
-					text: i18n("Copy Message")
+					text: i18nd("kdeconnect-sms", "Copy Message")
 					enabled: bodyLabel.visible
 					onTriggered: {
 					        root.messageCopyRequested(messageBody)
@@ -147,7 +147,7 @@
 				}
 				Controls.Label {
 					id: dateLabeltest
-					text: spoilerHint == "" ? qsTr("Spoiler") : spoilerHint
+					text: spoilerHint == "" ? i18nd("kdeconnect-sms", "Spoiler") : spoilerHint
 					color: sentByMe ? Kirigami.Theme.textColor
 								: Kirigami.Theme.complementaryTextColor
 					font.pixelSize: Kirigami.Units.gridUnit * 0.8
@@ -187,7 +187,7 @@
 //								mediaLocation === "" &&
 //								mediaGetUrl !== ""
 					}
-					text: qsTr("Download")
+					text: i18nd("kdeconnect-sms", "Download")
 					onClicked: {
 						print("Downloading " + mediaGetUrl + "...")
 						kaidan.downloadMedia(msgId, mediaGetUrl)
diff -urN kdeconnect-kde-1.4/smsapp/qml/ConversationDisplay.qml kdeconnect-kde-1.4-patched/smsapp/qml/ConversationDisplay.qml
--- kdeconnect-kde-1.4/smsapp/qml/ConversationDisplay.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/smsapp/qml/ConversationDisplay.qml	2019-12-21 01:17:13.208331879 +0300
@@ -196,7 +196,7 @@
             TextArea {
                 id: messageField
                 Layout.fillWidth: true
-                placeholderText: page.isMultitarget ? i18n("Replying to multitarget messages is not supported") : i18n("Compose message")
+                placeholderText: page.isMultitarget ? i18nd("kdeconnect-sms", "Replying to multitarget messages is not supported") : i18nd("kdeconnect-sms", "Compose message")
                 wrapMode: TextArea.Wrap
                 topPadding: Kirigami.Units.gridUnit * 0.5
                 bottomPadding: topPadding
diff -urN kdeconnect-kde-1.4/smsapp/qml/ConversationList.qml kdeconnect-kde-1.4-patched/smsapp/qml/ConversationList.qml
--- kdeconnect-kde-1.4/smsapp/qml/ConversationList.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/smsapp/qml/ConversationList.qml	2019-12-21 01:17:13.331665209 +0300
@@ -35,7 +35,7 @@
         id: noDevicesWarning
         visible: !page.deviceConnected
         timeout: -1
-        text: "⚠️ " + i18n("No devices available") + " ⚠️"
+        text: "⚠️ " + i18nd("kdeconnect-sms", "No devices available") + " ⚠️"
 
         MouseArea {
             // Detect mouseover and show another tooltip with more information
@@ -45,13 +45,13 @@
             ToolTip.visible: containsMouse
             ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
             // TODO: Wrap text if line is too long for the screen
-            ToolTip.text: i18n("No new messages can be sent or received, but you can browse cached content")
+            ToolTip.text: i18nd("kdeconnect-sms", "No new messages can be sent or received, but you can browse cached content")
         }
     }
 
     contextualActions: [
         Kirigami.Action {
-            text: i18n("Refresh")
+            text: i18nd("kdeconnect-sms", "Refresh")
             icon.name: "view-refresh"
             enabled: devicesCombo.count > 0
             onTriggered: {
@@ -59,7 +59,7 @@
             }
         },
         Kirigami.Action {
-            text: i18n("About...")
+            text: i18nd("kdeconnect-sms", "About...")
             icon.name: "help-about"
             onTriggered: {
                 applicationWindow().pageStack.push(aboutPageComponent, { aboutData: aboutData });
@@ -89,12 +89,12 @@
     header: Kirigami.InlineMessage {
         Layout.fillWidth: true
         visible: page.initialMessage.length > 0
-        text: i18n("Choose recipient")
+        text: i18nd("kdeconnect-sms", "Choose recipient")
 
         actions: [
           Kirigami.Action {
               iconName: "dialog-cancel"
-              text: i18n("Cancel")
+              text: i18nd("kdeconnect-sms", "Cancel")
               onTriggered: initialMessage = ""
             }
         ]
@@ -103,7 +103,7 @@
     footer: ComboBox {
         id: devicesCombo
         enabled: count > 0
-        displayText: !enabled ? i18n("No devices available") : undefined
+        displayText: !enabled ? i18nd("kdeconnect-sms", "No devices available") : undefined
         model: DevicesSortProxyModel {
             id: devicesModel
             //TODO: make it possible to filter if they can do sms
@@ -149,7 +149,7 @@
              * Used as the filter of the list of messages
              */
             id: filter
-            placeholderText: i18n("Filter...")
+            placeholderText: i18nd("kdeconnect-sms", "Filter...")
             width: parent.width
             z: 10
             onTextChanged: {
diff -urN kdeconnect-kde-1.4/smsapp/qml/main.qml kdeconnect-kde-1.4-patched/smsapp/qml/main.qml
--- kdeconnect-kde-1.4/smsapp/qml/main.qml	2019-12-07 20:22:52.000000000 +0300
+++ kdeconnect-kde-1.4-patched/smsapp/qml/main.qml	2019-12-21 01:17:13.331665209 +0300
@@ -32,7 +32,7 @@
     height: 600
 
     pageStack.initialPage: ConversationList {
-        title: i18n("KDE Connect SMS")
+        title: i18nd("kdeconnect-sms", "KDE Connect SMS")
         initialMessage: _initialMessage
     }
 }
_______________________________________________
kde-russian mailing list
kde-russian@lists.kde.ru
https://lists.kde.ru/mailman/listinfo/kde-russian

Ответить