Profile Manager user incokePopup for 0 profiles loaded error; fix lock image to icon in profileAddEdit #462

Merged
sarah merged 1 commits from dan/ui:oprofile-fix into master 9 months ago
  1. 2
      go/handlers/appHandler.go
  2. 1
      go/ui/gcd.go
  3. 36
      i18n/translation_de.ts
  4. BIN
      i18n/translation_en.qm
  5. 30
      i18n/translation_en.ts
  6. BIN
      i18n/translation_es.qm
  7. 9
      i18n/translation_es.ts
  8. 36
      i18n/translation_fr.ts
  9. BIN
      i18n/translation_it.qm
  10. 1282
      i18n/translation_it.ts
  11. 36
      i18n/translation_pt.ts
  12. 12
      qml/main.qml
  13. 9
      qml/panes/ProfileAddEditPane.qml
  14. 4
      qml/panes/ProfileManagerPane.qml

2
go/handlers/appHandler.go

@ -73,7 +73,7 @@ func App(gcd *ui.GrandCentralDispatcher, subscribed chan bool, reloadingAccounts
initialProfileLoad = false
gcd.Loaded()
} else {
gcd.ErrorLoaded0()
gcd.InvokePopup("0-profiles")
}
}

1
go/ui/gcd.go

@ -60,7 +60,6 @@ type GrandCentralDispatcher struct {
// profile management stuff
_ func() `signal:"Loaded"`
_ func(handle, displayname, image, tag string, unread int, online bool) `signal:"AddProfile"`
_ func() `signal:"ErrorLoaded0"`
_ func() `signal:"ResetProfile"`
_ func() `signal:"ResetProfileList"`
_ func(failed bool) `signal:"ChangePasswordResponse"`

36
i18n/translation_de.ts

@ -81,19 +81,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="152"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="150"/>
<source>server</source>
<extracomment>Server</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="161"/>
<source>invitation</source>
<extracomment>Invitation</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="183"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="177"/>
<source>group-addr</source>
<extracomment>Address</extracomment>
<translation type="unfinished"></translation>
@ -122,19 +116,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="69"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="71"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="73"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation type="unfinished"></translation>
@ -148,7 +142,7 @@
<translation type="obsolete">Adresse hier hinzufügen, um einen Kontakt aufzunehmen</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<location filename="../qml/widgets/ContactList.qml" line="252"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -561,7 +555,7 @@
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="114"/>
<location filename="../qml/widgets/ProfileList.qml" line="116"/>
<source>add-new-profile-btn</source>
<translation type="unfinished"></translation>
</message>
@ -580,19 +574,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="117"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="146"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
@ -752,5 +740,11 @@
<extracomment>New Connection</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/main.qml" line="398"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

BIN
i18n/translation_en.qm

30
i18n/translation_en.ts

@ -81,19 +81,18 @@
<translation>Group name</translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="152"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="150"/>
<source>server</source>
<extracomment>Server</extracomment>
<translation>Server</translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="161"/>
<source>invitation</source>
<extracomment>Invitation</extracomment>
<translation>Invitation</translation>
<translation type="vanished">Invitation</translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="183"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="177"/>
<source>group-addr</source>
<extracomment>Address</extracomment>
<translation>Address</translation>
@ -135,19 +134,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="69"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation>Your history with this peer is ephemeral and will not be saved. If you would like to save history, please go to settings and turn it on.</translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="71"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation>Message history is disabled.</translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="73"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation>Message history is enabled.</translation>
@ -161,7 +160,7 @@
<translation type="vanished">... paste an address here to add a contact...</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<location filename="../qml/widgets/ContactList.qml" line="252"/>
<source>blocked</source>
<translation>Blocked</translation>
</message>
@ -680,7 +679,7 @@ Right-click to reset.</translation>
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="114"/>
<location filename="../qml/widgets/ProfileList.qml" line="116"/>
<source>add-new-profile-btn</source>
<translation>Add new profile</translation>
</message>
@ -699,19 +698,18 @@ Right-click to reset.</translation>
<translation>Password</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation>0 profiles loaded with that password</translation>
<translation type="vanished">0 profiles loaded with that password</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="117"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation>Your Profiles</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="146"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation>Your Servers</translation>
@ -893,5 +891,11 @@ Right-click to reset.</translation>
<extracomment>New Connection</extracomment>
<translation>New Connection</translation>
</message>
<message>
<location filename="../qml/main.qml" line="398"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation>0 profiles loaded with that password</translation>
</message>
</context>
</TS>

BIN
i18n/translation_es.qm

9
i18n/translation_es.ts

@ -75,7 +75,7 @@
<message>
<source>invitation</source>
<extracomment>Invitation</extracomment>
<translation>Invitación</translation>
<translation type="vanished">Invitación</translation>
</message>
<message>
<source>group-addr</source>
@ -557,7 +557,7 @@
<message>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation>0 perfiles cargados con esa contraseña</translation>
<translation type="vanished">0 perfiles cargados con esa contraseña</translation>
</message>
<message>
<source>your-profiles</source>
@ -717,5 +717,10 @@
<extracomment>New Connection</extracomment>
<translation>Nueva conexión</translation>
</message>
<message>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation>0 perfiles cargados con esa contraseña</translation>
</message>
</context>
</TS>

36
i18n/translation_fr.ts

@ -81,19 +81,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="152"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="150"/>
<source>server</source>
<extracomment>Server</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="161"/>
<source>invitation</source>
<extracomment>Invitation</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="183"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="177"/>
<source>group-addr</source>
<extracomment>Address</extracomment>
<translation type="unfinished"></translation>
@ -122,19 +116,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="69"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="71"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="73"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation type="unfinished"></translation>
@ -148,7 +142,7 @@
<translation type="obsolete">... coller une adresse ici pour ajouter un contact...</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<location filename="../qml/widgets/ContactList.qml" line="252"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -561,7 +555,7 @@
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="114"/>
<location filename="../qml/widgets/ProfileList.qml" line="116"/>
<source>add-new-profile-btn</source>
<translation type="unfinished"></translation>
</message>
@ -580,19 +574,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="117"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="146"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
@ -752,5 +740,11 @@
<extracomment>New Connection</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/main.qml" line="398"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

BIN
i18n/translation_it.qm

1282
i18n/translation_it.ts
File diff suppressed because it is too large
View File

36
i18n/translation_pt.ts

@ -81,19 +81,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="152"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="150"/>
<source>server</source>
<extracomment>Server</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="161"/>
<source>invitation</source>
<extracomment>Invitation</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="183"/>
<location filename="../qml/panes/AddPeerGroupPane.qml" line="177"/>
<source>group-addr</source>
<extracomment>Address</extracomment>
<translation type="unfinished"></translation>
@ -122,19 +116,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="69"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="71"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="73"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation type="unfinished"></translation>
@ -148,7 +142,7 @@
<translation type="obsolete"> cole um endereço aqui para adicionar um contato</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<location filename="../qml/widgets/ContactList.qml" line="252"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -561,7 +555,7 @@
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="114"/>
<location filename="../qml/widgets/ProfileList.qml" line="116"/>
<source>add-new-profile-btn</source>
<translation type="unfinished"></translation>
</message>
@ -580,19 +574,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="117"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="146"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
@ -752,5 +740,11 @@
<extracomment>New Connection</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/main.qml" line="398"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

12
qml/main.qml

@ -391,6 +391,13 @@ ApplicationWindow {
radius: 15
visible: false
// We store error messages in QML referenced by an ID so they can be called from go
// and the qupdate / qml i18n system can easily find and translate them here
property var errorMessages: (new Map([
//: 0 profiles loaded with that password
["0-profiles", qsTr("error-0-profiles-loaded-for-password")],
]))
Label {
id: lblPopup
@ -401,12 +408,13 @@ ApplicationWindow {
}
}
Connections { // POPUPS ARE INVOKED BY GO FUNCS
target: gcd
onInvokePopup: function(str) {
if (popup.errorMessages.get(str) != undefined) {
str = popup.errorMessages.get(str)
}
lblPopup.text = str
popup.opacity = 0.5
popup.visible = true

9
qml/panes/ProfileAddEditPane.qml

@ -134,11 +134,16 @@ Opaque.Flickable {
performTransform: true
overlayColor: Theme.portraitProfileBadgeTextColor
badgeContent: Image {// Profle Type
badgeContent: Opaque.Icon {// Profle Type
id: profiletype
source: radioUsePassword.checked ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock-open-24px.webp"
source: radioUsePassword.checked ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock_open-24px.webp"
height: 40 * gcd.themeScale
width: height
iconColor: Theme.defaultButtonTextColor
backgroundColor: portrait.badgeColor
hilightBackgroundColor: portrait.badgeColor
}
}

4
qml/panes/ProfileManagerPane.qml

@ -65,7 +65,6 @@ ColumnLayout {
onClicked: {
gcd.unlockProfiles(txtPassword.text)
txtPassword.text = ""
error.visible = false
}
}
}
@ -74,8 +73,7 @@ ColumnLayout {
id: error
Layout.alignment: Qt.AlignHCenter
color: Theme.textfieldErrorColor
//: 0 profiles loaded with that password
text: qsTr("error-0-profiles-loaded-for-password")
visible: false
}