feat(client): add RU/EN localization and native capture preview

This commit is contained in:
Loki 2026-10-24 15:04:50 +02:00
parent 8e5ab56611
commit 8460fb28fd
Signed by: boba
GPG key ID: 253067914055423B
43 changed files with 4103 additions and 275 deletions

View file

@ -37,10 +37,10 @@ export component AvatarCropper inherits Rectangle {
VerticalLayout {
padding: 18px; spacing: 8px; alignment: start;
HorizontalLayout {
Text { text: "Выбрать область фото"; color: Theme.text-primary; font-size: Theme.font-size + 5px; font-weight: 600; horizontal-stretch: 1; vertical-alignment: center; }
Text { text: @tr("Crop photo"); color: Theme.text-primary; font-size: Theme.font-size + 5px; font-weight: 600; horizontal-stretch: 1; vertical-alignment: center; }
ActionButton { text: "×"; width: 30px; quiet: true; clicked => { root.cancel(); } }
}
Text { text: "Перетащи фото и выбери масштаб."; color: Theme.text-muted; font-size: Math.max(Theme.font-size - 3px, 11px); }
Text { text: @tr("Drag the photo and adjust the zoom."); color: Theme.text-muted; font-size: Math.max(Theme.font-size - 3px, 11px); }
Rectangle { height: 4px; }
HorizontalLayout {
Rectangle { horizontal-stretch: 1; }
@ -48,7 +48,7 @@ export component AvatarCropper inherits Rectangle {
width: root.frame-size; height: root.frame-size;
clip: true; background: Theme.bg-surface;
accessible-role: image;
accessible-label: "Область фото. Перетаскивай изображение, чтобы изменить кадрирование.";
accessible-label: @tr("Photo crop area. Drag the image to adjust the crop.");
Image {
source: root.avatar-source;
width: root.source-width * root.cover-scale * 1px;
@ -100,16 +100,16 @@ export component AvatarCropper inherits Rectangle {
ActionButton { text: "+"; width: 32px; clicked => { root.set-zoom(root.zoom + 0.1); } }
}
HorizontalLayout {
Text { text: "Масштаб " + Math.round(root.zoom * 100) + "%"; color: Theme.text-muted; font-size: Math.max(Theme.font-size - 4px, 11px); vertical-alignment: center; horizontal-stretch: 1; }
ActionButton { text: "Сбросить кадр"; quiet: true; clicked => { root.crop-moved(0,0); root.set-zoom(1); } }
Text { text: @tr("Zoom {}%", Math.round(root.zoom * 100)); color: Theme.text-muted; font-size: Math.max(Theme.font-size - 4px, 11px); vertical-alignment: center; horizontal-stretch: 1; }
ActionButton { text: @tr("Reset crop"); quiet: true; clicked => { root.crop-moved(0,0); root.set-zoom(1); } }
}
if root.error != "" : Text { text: root.error; color: Theme.danger; font-size: Math.max(Theme.font-size - 3px, 11px); wrap: word-wrap; }
Rectangle { vertical-stretch: 1; }
HorizontalLayout {
spacing: 9px;
ActionButton { text: "Отмена"; quiet: true; clicked => { root.cancel(); } }
ActionButton { text: @tr("Cancel"); quiet: true; clicked => { root.cancel(); } }
Rectangle { horizontal-stretch: 1; }
ActionButton { text: "Использовать фото"; active: true; clicked => { root.confirm(); } }
ActionButton { text: @tr("Use photo"); active: true; clicked => { root.confirm(); } }
}
}
}