From ef3eb4120160acde2f8cf5c4071847e53f177e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D1=8F=D1=87=D0=B5=D1=81=D0=BB=D0=B0=D0=B2=20=D0=94?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Thu, 19 Mar 2020 00:30:56 +0300 Subject: [PATCH] Russian translation - Part 3 (open Russian help in the ru locale) This patch is needed to make use of the translated help-ru.html, when appropriate. --- qml/pages/HelpPage.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qml/pages/HelpPage.qml b/qml/pages/HelpPage.qml index e06c0fa..8fa263c 100644 --- a/qml/pages/HelpPage.qml +++ b/qml/pages/HelpPage.qml @@ -11,9 +11,21 @@ Page { "} " + "" + property string helpfile + + Component.onCompleted: { + switch (Qt.locale().name.substring(0,2)) { + case "ru": // show Russian help in Russian locale (we can add other languages too) + helpfile = "../help-ru.html"; + break; + default: + helpfile = "../help.html"; + } + } + FileReader { id: docReader - source: Qt.resolvedUrl("../help.html") + source: Qt.resolvedUrl(helpfile) } SilicaFlickable {