Fix various warnings and add translation contexts
This commit is contained in:
@@ -56,7 +56,7 @@ QQC2.Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: currentRoom.mainCache
|
target: root.currentRoom.mainCache
|
||||||
|
|
||||||
function onMentionAdded(mention: string): void {
|
function onMentionAdded(mention: string): void {
|
||||||
// add mention text
|
// add mention text
|
||||||
@@ -83,7 +83,7 @@ QQC2.Control {
|
|||||||
// Matrix does not allow sending attachments in replies
|
// Matrix does not allow sending attachments in replies
|
||||||
visible: _private.chatBarCache.replyId.length === 0 && _private.chatBarCache.attachmentPath.length === 0
|
visible: _private.chatBarCache.replyId.length === 0 && _private.chatBarCache.attachmentPath.length === 0
|
||||||
icon.name: "mail-attachment"
|
icon.name: "mail-attachment"
|
||||||
text: i18n("Attach an image or file")
|
text: i18nc("@action:button", "Attach an image or file")
|
||||||
displayHint: Kirigami.DisplayHint.IconOnly
|
displayHint: Kirigami.DisplayHint.IconOnly
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
@@ -101,7 +101,7 @@ QQC2.Control {
|
|||||||
|
|
||||||
visible: !Kirigami.Settings.isMobile
|
visible: !Kirigami.Settings.isMobile
|
||||||
icon.name: "smiley"
|
icon.name: "smiley"
|
||||||
text: i18n("Emojis & Stickers")
|
text: i18nc("@action:button", "Emojis & Stickers")
|
||||||
displayHint: Kirigami.DisplayHint.IconOnly
|
displayHint: Kirigami.DisplayHint.IconOnly
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ QQC2.Control {
|
|||||||
id: mapButton
|
id: mapButton
|
||||||
icon.name: "mark-location-symbolic"
|
icon.name: "mark-location-symbolic"
|
||||||
property bool isBusy: false
|
property bool isBusy: false
|
||||||
text: i18n("Send a Location")
|
text: i18nc("@action:button", "Send a Location")
|
||||||
displayHint: QQC2.AbstractButton.IconOnly
|
displayHint: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
@@ -148,7 +148,7 @@ QQC2.Control {
|
|||||||
property bool isBusy: false
|
property bool isBusy: false
|
||||||
|
|
||||||
icon.name: "document-send"
|
icon.name: "document-send"
|
||||||
text: i18n("Send message")
|
text: i18nc("@action:button", "Send message")
|
||||||
displayHint: Kirigami.DisplayHint.IconOnly
|
displayHint: Kirigami.DisplayHint.IconOnly
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ QQC2.Control {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.largeSpacing
|
Layout.margins: Kirigami.Units.largeSpacing
|
||||||
Layout.preferredHeight: active ? item.implicitHeight : 0
|
Layout.preferredHeight: active ? (item as Item).implicitHeight : 0
|
||||||
|
|
||||||
active: visible
|
active: visible
|
||||||
visible: root.currentRoom.mainCache.replyId.length > 0
|
visible: root.currentRoom.mainCache.replyId.length > 0
|
||||||
@@ -218,7 +218,7 @@ QQC2.Control {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.largeSpacing
|
Layout.margins: Kirigami.Units.largeSpacing
|
||||||
Layout.preferredHeight: active ? item.implicitHeight : 0
|
Layout.preferredHeight: active ? (item as Item).implicitHeight : 0
|
||||||
|
|
||||||
active: visible
|
active: visible
|
||||||
visible: root.currentRoom.mainCache.attachmentPath.length > 0
|
visible: root.currentRoom.mainCache.attachmentPath.length > 0
|
||||||
@@ -250,7 +250,7 @@ QQC2.Control {
|
|||||||
QQC2.TextArea {
|
QQC2.TextArea {
|
||||||
id: textField
|
id: textField
|
||||||
|
|
||||||
placeholderText: root.currentRoom.usesEncryption ? i18n("Send an encrypted message…") : root.currentRoom.mainCache.attachmentPath.length > 0 ? i18n("Set an attachment caption…") : i18n("Send a message…")
|
placeholderText: root.currentRoom.usesEncryption ? i18nc("@placeholder", "Send an encrypted message…") : root.currentRoom.mainCache.attachmentPath.length > 0 ? i18nc("@placeholder", "Set an attachment caption…") : i18nc("@placeholder", "Send a message…")
|
||||||
verticalAlignment: TextEdit.AlignVCenter
|
verticalAlignment: TextEdit.AlignVCenter
|
||||||
wrapMode: TextEdit.Wrap
|
wrapMode: TextEdit.Wrap
|
||||||
textFormat: TextEdit.MarkdownText
|
textFormat: TextEdit.MarkdownText
|
||||||
@@ -285,7 +285,7 @@ QQC2.Control {
|
|||||||
x: textField.cursorRectangle.x
|
x: textField.cursorRectangle.x
|
||||||
y: textField.cursorRectangle.y - height
|
y: textField.cursorRectangle.y - height
|
||||||
|
|
||||||
onFormattingSelected: _private.formatText(format, selectionStart, selectionEnd)
|
onFormattingSelected: (format, selectionStart, selectionEnd) => _private.formatText(format, selectionStart, selectionEnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onEnterPressed: event => {
|
Keys.onEnterPressed: event => {
|
||||||
@@ -560,7 +560,7 @@ QQC2.Control {
|
|||||||
|
|
||||||
currentRoom: root.currentRoom
|
currentRoom: root.currentRoom
|
||||||
|
|
||||||
onChosen: emoji => insertText(emoji)
|
onChosen: emoji => root.insertText(emoji)
|
||||||
onClosed: if (emojiAction.checked) {
|
onClosed: if (emojiAction.checked) {
|
||||||
emojiAction.checked = false;
|
emojiAction.checked = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user