A system of translations into different languages has been implemented. Added translations into Russian. Various UI fixes for valid internationalization

This commit is contained in:
Yury Shuvakin
2022-08-28 11:33:56 +03:00
parent 2a960893d0
commit 4a0f78c247
39 changed files with 3365 additions and 357 deletions

View File

@@ -0,0 +1,57 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import Utils 1.0
BusyIndicator {
id: control
running: true
implicitWidth: 86
implicitHeight: 86
contentItem: Item {
id: item
width: parent.width
height: parent.height
opacity: control.running ? 1 : 0
Behavior on opacity {
OpacityAnimator {
duration: 250
}
}
RotationAnimator {
target: item
running: control.visible && control.running
from: 0
to: 360
loops: Animation.Infinite
duration: 5000
}
Repeater {
id: repeater
model: 6
Rectangle {
x: item.width / 2 - width / 2
y: item.height / 2 - height / 2
implicitWidth: 12
implicitHeight: 12
radius: 6
color: Palette.alternativeBackgroundColor
transform: [
Translate {
y: -Math.min(item.width, item.height) * 0.5 + 6
},
Rotation {
angle: index / repeater.count * 360
origin.x: 6
origin.y: 6
}
]
}
}
}
}

View File

@@ -15,6 +15,8 @@ Button {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
maximumLineCount: 2
wrapMode: Text.Wrap
}
background: Rectangle {

View File

@@ -1,5 +0,0 @@
import QtQuick 2.0
Item {
}

View File

@@ -5,13 +5,15 @@ import Utils 1.0
Shape {
id: shape
implicitWidth: 1
implicitHeight: 1
property bool horizontal: true
ShapePath {
strokeColor: Palette.borderColor
strokeStyle: ShapePath.SolidLine
startX: 0
startY: 0
PathLine { x: shape.width; y: 0 }
PathLine { x: horizontal ? shape.width : 0; y: horizontal ? 0 : shape.height }
}
}

View File

@@ -0,0 +1,59 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0
import Utils 1.0
ItemDelegate {
id: control
implicitHeight: 52
padding: 0
leftPadding: control.minimized ? 0 : 40
font.weight: Font.Bold
icon.color: "transparent"
icon.width: 24
icon.height: 24
property bool minimized: false
contentItem: RowLayout {
spacing: control.minimized ? 0 : 25
Item {
visible: control.minimized
Layout.fillWidth: true
}
Image {
source: control.icon.source
sourceSize.width: control.icon.width
sourceSize.height: control.icon.height
Layout.alignment: Qt.AlignCenter
ColorOverlay {
anchors.fill: parent
source: parent
color: icon.color
visible: icon.color !== "transparent"
}
}
Label {
text: control.text
font: control.font
color: Palette.alternativeTextColor
visible: !control.minimized
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
}
Item {
Layout.fillWidth: true
}
}
background: Rectangle {
color: control.pressed ? Palette.pressedButtonColor :
control.hovered ? Palette.hoveredButtonColor : Palette.buttonColor
}
}

View File

@@ -15,6 +15,8 @@ Button {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
maximumLineCount: 2
wrapMode: Text.Wrap
}
background: Rectangle {

View File

@@ -1,5 +0,0 @@
import QtQuick 2.0
Item {
}

View File

@@ -6,6 +6,6 @@ import Utils 1.0
TextArea {
color: Palette.textColor
selectByMouse: true
selectionColor: Palette.alternativeBackgroundColor
selectionColor: Palette.selectedTextBackgroundColor
font.pixelSize: 16
}

View File

@@ -7,7 +7,7 @@ TextField {
implicitHeight: 58
color: Palette.textColor
selectByMouse: true
selectionColor: Palette.alternativeBackgroundColor
selectionColor: Palette.selectedTextBackgroundColor
background: Rectangle {
color: enabled ? Palette.backgroundColor : Palette.hoveredBackgroundColor

View File

@@ -1,7 +1,5 @@
module Controls
Label 1.0 Label.qml
ComboBox 1.0 ComboBox.qml
PaneItem 1.0 PaneItem.qml
ScrollBar 1.0 ScrollBar.qml
Button 1.0 Button.qml
OutlineButton 1.0 OutlineButton.qml
@@ -22,3 +20,5 @@ ChartView 1.0 ChartView.qml
TextArea 1.0 TextArea.qml
DialogHeader 1.0 DialogHeader.qml
DialogBackground 1.0 DialogBackground.qml
BusyIndicator 1.0 BusyIndicator.qml
MenuItemDelegate 1.0 MenuItemDelegate.qml