Make qml UI strings translatable

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
Dominique Fuchs 2020-01-14 07:59:28 +01:00
parent f748a4bb50
commit 65b47d4613
2 changed files with 7 additions and 15 deletions

View file

@ -118,7 +118,7 @@ MenuItem {
}
MenuItem {
text: isConnected ? "Log out" : "Log in"
text: isConnected ? qsTr("Log out") : qsTr("Log in")
onClicked: {
isConnected ? userModelBackend.logout(index) : userModelBackend.login(index)
accountMenu.close()
@ -126,7 +126,7 @@ MenuItem {
}
MenuItem {
text: "Remove Account"
text: qsTr("Remove Account")
onClicked: {
userModelBackend.removeAccount(index)
accountMenu.close()

View file

@ -109,7 +109,7 @@ Window {
hoverEnabled: true
onClicked:
{
syncPauseButton.text = systrayBackend.syncIsPaused() ? "Resume sync for all" : "Pause sync for all"
syncPauseButton.text = systrayBackend.syncIsPaused() ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
accountMenu.open()
}
@ -156,7 +156,7 @@ Window {
}
Label {
Layout.leftMargin: 10
text: "Add account"
text: qsTr("Add account")
color: "black"
font.pixelSize: 12
}
@ -176,27 +176,19 @@ Window {
}
MenuItem {
text: "Open settings"
text: qsTr("Open settings")
onClicked: systrayBackend.openSettings()
}
MenuItem {
text: "Help"
text: qsTr("Help")
onClicked: systrayBackend.openHelp()
}
MenuItem {
text: "Quit Nextcloud"
text: qsTr("Quit Nextcloud")
onClicked: systrayBackend.shutdown()
}
Component.onCompleted: {/*
if(userModelBackend.numUsers() === 1) {
accountMenuSeparator.height = 0
} else {
accountMenuSeparator.height = 13
}*/
}
}
}