Добрый день.У кого-нибудь отображается перевод строк в контекстном меню dolphin «Поделиться»?Или это я неправильно собираю пакет purpose?А то у меня что-то действия в этом меню без перевода.Совсем непонятно назначение строки вadd_definitions(-DTRANSLATION_DOMAIN=\"purpose5\")в файле /purpose/CMakeLists.txtНет ни файла локализации, ни Messages.sh с таким именем, а используютсяadd_definitions(-DTRANSLATION_DOMAIN=для отдельных модулей.Ещё в приложении полно файлов qml, и для них не работают строкиadd_definitions(-DTRANSLATION_DOMAIN=в файлах CMakeLists.txt для этих модулей.Видимо правильнее использовать вызов i18nd.Вообще в паре модулей как раз и используется i18nd, и в них перевод работает.Например в файле /purpose/src/plugins/twitter/contents/config/config.qmlЕсли наложить приложенный патч, то будет отображаться перевод и в остальных модулях. -- С Уважением,Виктор victorr2...@yandex.ru diff -urN purpose-5.62.0/src/plugins/bluetooth/bluetoothplugin_config.qml purpose-5.62.0-patched/src/plugins/bluetooth/bluetoothplugin_config.qml
--- purpose-5.62.0/src/plugins/bluetooth/bluetoothplugin_config.qml 2019-09-26 04:44:34.0 +0300
+++ purpose-5.62.0-patched/src/plugins/bluetooth/bluetoothplugin_config.qml 2019-10-01 14:01:02.874308013 +0300
@@ -31,7 +31,7 @@
anchors.bottomMargin: Kirigami.Units.smallSpacing
Kirigami.Heading {
-text: i18n("Choose a device to send to:")
+text: i18nd("purpose_bluetooth", "Choose a device to send to:")
visible: list.count !== 0
level: 1
}
@@ -65,7 +65,7 @@
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter
visible: list.count === 0
-text: i18n("No devices found")
+text: i18nd("purpose_bluetooth", "No devices found")
}
}
}
diff -urN purpose-5.62.0/src/plugins/nextcloud/nextcloudplugin_config.qml purpose-5.62.0-patched/src/plugins/nextcloud/nextcloudplugin_config.qml
--- purpose-5.62.0/src/plugins/nextcloud/nextcloudplugin_config.qml 2019-09-26 04:44:34.0 +0300
+++ purpose-5.62.0-patched/src/plugins/nextcloud/nextcloudplugin_config.qml 2019-10-01 14:19:30.807617753 +0300
@@ -46,7 +46,7 @@
configuration.data = jobData;
}
-Label { text: i18n("Account:") }
+Label { text: i18nd("purpose_nextcloud", "Account:") }
RowLayout {
Layout.fillWidth: true
ComboBox {
@@ -67,7 +67,7 @@
onClicked: KQCA.KCMShell.open("kcm_kaccounts");
}
}
-Label { text: i18n("Upload to folder:") }
+Label { text: i18nd("purpose_nextcloud", "Upload to folder:") }
TextField {
id: folderField
Layout.fillWidth: true
diff -urN purpose-5.62.0/src/plugins/phabricator/phabricatorplugin_config.qml purpose-5.62.0-patched/src/plugins/phabricator/phabricatorplugin_config.qml
--- purpose-5.62.0/src/plugins/phabricator/phabricatorplugin_config.qml 2019-09-26 04:44:34.0 +0300
+++ purpose-5.62.0-patched/src/plugins/phabricator/phabricatorplugin_config.qml 2019-10-01 14:16:29.857621601 +0300
@@ -36,11 +36,11 @@
function labelText()
{
if (updateDRCombo.currentIndex>=0 && updateOld.checked) {
-return updateDR.length > 0 ? i18n("Update differential revision %1", updateDR) : i18n("Update differential revision")
+return updateDR.length > 0 ? i18nd("purpose_phabricator", "Update differential revision %1", updateDR) : i18nd("purpose_phabricator", "Update differential revision")
} else if (createNew.checked) {
-return i18n("Create new \"differential diff\"")
+return i18nd("purpose_phabricator", "Create new \"differential diff\"")
} else {
-return i18n("Create or update?")
+return i18nd("purpose_phabricator", "Create or update?")
}
}
Label {
@@ -63,7 +63,7 @@
root.updateDR = ""
root.drTitle = ""
} else {
-root.updateDR = i18n("unknown")
+root.updateDR = i18nd("purpose_phabricator", "unknown")
root.drTitle = ""
}
}
@@ -77,8 +77,8 @@
RadioButton {
id: createNew
exclusiveGroup: updateGroup
-text: i18n("New Diff")
-tooltip: i18n("tick this to create a new \"differential diff\" which can\nbe converted online to a new differential revision")
+text: i18nd("purpose_phabricator", "New Diff")
+tooltip: i18nd("purpose_phabricator", "tick this to create a new \"differential diff\" which can\nbe converted online to a new differential revision")
onCheckedChanged: {
root.refreshUpdateDR();
}
@@ -86,8 +86,8 @@
RadioButton {
id: updateOld
exclusiveGroup: updateGroup
-text: i18n("Update Diff")
-tooltip: i18n("tick this to update an exis