From db305895e70fbb599d2600a7e1f2245a56380217 Mon Sep 17 00:00:00 2001 From: erinn Date: Wed, 20 May 2020 11:50:45 -0700 Subject: [PATCH] add translations for EmojiDrawer and move Statusbar back to cwtchui --- .gitignore | 1 + Statusbar.qml | 186 ----------------------------------------- i18n/translation_de.qm | Bin 0 -> 23 bytes i18n/translation_de.ts | 103 +++++++++++++++++++++++ i18n/translation_en.qm | Bin 0 -> 1944 bytes i18n/translation_en.ts | 109 ++++++++++++++++++++++++ i18n/translation_fr.qm | Bin 0 -> 23 bytes i18n/translation_fr.ts | 103 +++++++++++++++++++++++ i18n/translation_pt.qm | Bin 0 -> 23 bytes i18n/translation_pt.ts | 103 +++++++++++++++++++++++ opaque.pro | 35 ++++++++ qml.qrc | 35 ++++++++ 12 files changed, 489 insertions(+), 186 deletions(-) delete mode 100644 Statusbar.qml create mode 100644 i18n/translation_de.qm create mode 100644 i18n/translation_de.ts create mode 100644 i18n/translation_en.qm create mode 100644 i18n/translation_en.ts create mode 100644 i18n/translation_fr.qm create mode 100644 i18n/translation_fr.ts create mode 100644 i18n/translation_pt.qm create mode 100644 i18n/translation_pt.ts create mode 100644 opaque.pro create mode 100644 qml.qrc diff --git a/.gitignore b/.gitignore index 86950b3..ba07c01 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +\.idea *.qmlc diff --git a/Statusbar.qml b/Statusbar.qml deleted file mode 100644 index a72d959..0000000 --- a/Statusbar.qml +++ /dev/null @@ -1,186 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Controls 2.4 - -import "." as Widgets -import "theme" - -// Statusbar is a app wide 10-25 tall bar that should be place at the bottom of the app that gives network health information -// it changes color and text/icon message based on network health. when netowrk is not healthy it is always in fullsized mode -// when network is health it reduces to a minimal color strip unless mouse overed / clicked to reveal the text/icons -Rectangle { - id: statusbar - - property int status: statusDisconnectedInternet - - readonly property int statusDisconnectedInternet: 0 - readonly property int statusDisconnectedTor: 1 - readonly property int statusConnecting: 2 - readonly property int statusOnline: 3 - - readonly property int openHeight: 25 - readonly property int hideHeight: 10 - - property bool isHover: false - - height: openHeight - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - - Text { - id: statusMessage - opacity: 0 - anchors.right: networkStatus.left - anchors.verticalCenter: parent.verticalCenter - anchors.rightMargin: 5 * gcd.themeScale - - font.pixelSize: Theme.statusTextSize * gcd.themeScale - } - - Icon { - id: networkStatus - opacity: 0 - anchors.right: connectionStatus.left - anchors.verticalCenter: parent.verticalCenter - anchors.rightMargin: 5 * gcd.themeScale - height: 18 - width: 18 - - } - - Icon { - id: connectionStatus - opacity: 0 - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - anchors.rightMargin: 10 * gcd.themeScale - height: 18 * gcd.themeScale - width: 18 * gcd.themeScale - } - - function changeStatus() { - if (status == statusDisconnectedInternet) { - statusbar.color = Theme.statusbarDisconnectedInternetColor - statusMessage.color = Theme.statusbarDisconnectedInternetFontColor - networkStatus.iconColor = Theme.statusbarDisconnectedInternetFontColor - networkStatus.source = gcd.assetPath + "core/signal_cellular_off-24px.svg" - connectionStatus.iconColor = Theme.statusbarDisconnectedInternetFontColor - connectionStatus.source = gcd.assetPath + "core/syncing-03.svg" - //: Disconnected from the internet, check your connection - statusMessage.text = qsTr("network-status-disconnected") - show() - } else if (status == statusDisconnectedTor) { - statusbar.color = Theme.statusbarDisconnectedTorColor - statusMessage.color = Theme.statusbarDisconnectedTorFontColor - networkStatus.iconColor = Theme.statusbarDisconnectedTorFontColor - networkStatus.source = gcd.assetPath + "core/signal_cellular_connected_no_internet_4_bar-24px.svg" - connectionStatus.iconColor = Theme.statusbarDisconnectedTorFontColor - connectionStatus.source = gcd.assetPath + "core/syncing-03.svg" - //: Attempting to connect to Tor network - statusMessage.text = qsTr("network-status-attempting-tor") - show() - } else if (status == statusConnecting) { - statusbar.color = Theme.statusbarConnectingColor - statusMessage.color = Theme.statusbarConnectingFontColor - networkStatus.iconColor = Theme.statusbarConnectingFontColor - networkStatus.source = gcd.assetPath + "core/signal_cellular_connected_no_internet_4_bar-24px.svg" - connectionStatus.iconColor = Theme.statusbarConnectingFontColor - connectionStatus.source = gcd.assetPath + "core/syncing-02.svg" - //: Connecting... - statusMessage.text = qsTr("network-status-connecting") - show() - } else { - statusbar.color = Theme.statusbarOnlineColor - statusMessage.color = Theme.statusbarOnlineFontColor - networkStatus.iconColor = Theme.statusbarOnlineFontColor - networkStatus.source = gcd.assetPath + "core/signal_cellular_4_bar-24px.svg" - connectionStatus.iconColor = Theme.statusbarOnlineFontColor - connectionStatus.source = gcd.assetPath + "core/syncing-01.svg" - //: Online - statusMessage.text = qsTr("network-status-online") - hide() - } - } - - MouseArea { - id: ma - anchors.fill: parent - hoverEnabled: true - - SequentialAnimation { - id: showAnim - PropertyAnimation { id: openStatus; target: statusbar; property: "height"; to: openHeight} - ParallelAnimation { - PropertyAnimation { id: showStatus; target: statusMessage; property: "opacity"; to: 1} - PropertyAnimation { id: showNetIcon; target: networkStatus; property: "opacity"; to: 1} - PropertyAnimation { id: showConnIcon; target: connectionStatus; property: "opacity"; to: 1} - } - } - - SequentialAnimation { - id: hideAnim - ParallelAnimation { - PropertyAnimation { id: hideStatus; target: statusMessage; property: "opacity"; to: 0} - PropertyAnimation { id: hideNetIcon; target: networkStatus; property: "opacity"; to: 0} - PropertyAnimation { id: hideConnIcon; target: connectionStatus; property: "opacity"; to: 0} - } - PropertyAnimation { id: closeStatus; target: statusbar; property: "height"; to: hideHeight; duration: 200 } - } - - onEntered: { - isHover = true - show() - } - - - onExited: { - isHover = false - hide() - } - - onPressed: { - isHover = true - show() - } - - onReleased: { - isHover = false - hide() - } - } - - function resetHeight() { - if (isHover || status != statusOnline) { - height = openHeight - } else { - height = hideHeight - } - } - - function show() { - if (isHover || status != statusOnline) { - hideAnim.stop() - showAnim.start() - } - } - - function hide() { - if (!isHover && status == statusOnline) { - showAnim.stop() - hideAnim.start() - } - } - - onStatusChanged: { changeStatus() } - - Component.onCompleted: { resetHeight() } - - Connections { - target: gcd - - onTorStatus: function(code) { - status = code - } - } - -} diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm new file mode 100644 index 0000000000000000000000000000000000000000..9dad8dffceb9623e88f8b96d9cd0caf25574c6fa GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ literal 0 HcmV?d00001 diff --git a/i18n/translation_de.ts b/i18n/translation_de.ts new file mode 100644 index 0000000..e238358 --- /dev/null +++ b/i18n/translation_de.ts @@ -0,0 +1,103 @@ + + + + + EmojiDrawer + + + search + Search... + + + + + emojicat-expressions + Expressions + + + + + emojicat-activities + Activities + + + + + emojicat-food + Food, drink & herbs + + + + + emojicat-gender + Gender, relationships & sexuality + + + + + emojicat-nature + Nature and effects + + + + + emojicat-objects + Objects + + + + + emojicat-people + People and animals + + + + + emojicat-symbols + Symbols + + + + + emojicat-travel + Travel & places + + + + + emojicat-misc + Miscellaneous + + + + + cycle-cats-android + + + + + cycle-cats-desktop + + + + + cycle-morphs-android + + + + + cycle-morphs-desktop + + + + + cycle-colours-android + + + + + cycle-colours-desktop + + + + diff --git a/i18n/translation_en.qm b/i18n/translation_en.qm new file mode 100644 index 0000000000000000000000000000000000000000..15cf72323fe247e2fe9c5b3aed4142cfc8670c09 GIT binary patch literal 1944 zcmb_dO=uHA82vVXm5SZcrXo^Aq4d<`QuH8tu(q}bwPFR2y4js1lkV;;yPKGR2ah?3 z3Pljwi|A30QZMRV5CoB;B6#&wQ4qYSZ#M02W7jN&Fid9W=X>+!eLp$%+&J`lbM5|{ zW8<%`KYa0dhKSlJwlYSP{g7I3-X_Y`(l?*ZVx7`=zJ4K6HqyVZeZy=xbNtg|qRi>c ziA5dfm2CFoBdkBk-u?9s^VRJ8m*25}FE_vN4D*G7)%FA6tq+cGjAEQp)vG@6PO7&Q zgDBNde-5p{{)hT!`Yo38+=uHZhd!dWbdwcy&G!nLZMcFP16bZaXNel0b+sGJ zRU|jF58N)}Z568G{zCAk?w2O9GnlvR3n!LcHIbdb3k21niPsn1#Fi7B0!FNzC>xTQ|2}s^#enV%SGSH_+vX zTnn>ml*#l#QWZ4a=MC<2=EVl?L7JoHj#TAA`bI$c5QsG$mw6r+c0AG~orA3)gQk%1 z1_GU<5XeF@iCzUgmr6S*9te@kLd56%49&yL2ADLKurfzYl2vGnD1bTW%NirE@vz@S zmT5R8RcVEasNr=LW*f|nRpT&SfSCtj!yS; zFfuBmvA}N;V8qPU{JP6xA%|!Y>eY4`4~NeZr5e-yc;8IWC0Ggw)hXoLgyhJ{3gn6- z + + + + EmojiDrawer + + + cycle-cats-android + Click to cycle category. + Long-press to reset. + + + + cycle-cats-desktop + Click to cycle category. + Right-click to reset. + + + + cycle-morphs-android + Click to cycle morphs. + Long-press to reset. + + + + cycle-morphs-desktop + Click to cycle morphs. + Right-click to reset. + + + + cycle-colours-android + Click to cycle colours. + Long-press to reset. + + + + cycle-colours-desktop + Click to cycle colours. + Right-click to reset. + + + + search + Search... + Search... + + + + emojicat-expressions + Expressions + Expressions + + + + emojicat-activities + Activities + Activities + + + + emojicat-food + Food, drink & herbs + Food, drink & herbs + + + + emojicat-gender + Gender, relationships & sexuality + Gender, relationships & sexuality + + + + emojicat-nature + Nature and effects + Nature and effects + + + + emojicat-objects + Objects + Objects + + + + emojicat-people + People and animals + People and animals + + + + emojicat-symbols + Symbols + Symbols + + + + emojicat-travel + Travel & places + Travel & places + + + + emojicat-misc + Miscellaneous + Miscellaneous + + + diff --git a/i18n/translation_fr.qm b/i18n/translation_fr.qm new file mode 100644 index 0000000000000000000000000000000000000000..c02994cafb69a42d7f77c4004edd5eae08bb0f3b GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iJ1`qhQtX? literal 0 HcmV?d00001 diff --git a/i18n/translation_fr.ts b/i18n/translation_fr.ts new file mode 100644 index 0000000..a0a5109 --- /dev/null +++ b/i18n/translation_fr.ts @@ -0,0 +1,103 @@ + + + + + EmojiDrawer + + + search + Search... + + + + + emojicat-expressions + Expressions + + + + + emojicat-activities + Activities + + + + + emojicat-food + Food, drink & herbs + + + + + emojicat-gender + Gender, relationships & sexuality + + + + + emojicat-nature + Nature and effects + + + + + emojicat-objects + Objects + + + + + emojicat-people + People and animals + + + + + emojicat-symbols + Symbols + + + + + emojicat-travel + Travel & places + + + + + emojicat-misc + Miscellaneous + + + + + cycle-cats-android + + + + + cycle-cats-desktop + + + + + cycle-morphs-android + + + + + cycle-morphs-desktop + + + + + cycle-colours-android + + + + + cycle-colours-desktop + + + + diff --git a/i18n/translation_pt.qm b/i18n/translation_pt.qm new file mode 100644 index 0000000000000000000000000000000000000000..c02994cafb69a42d7f77c4004edd5eae08bb0f3b GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iJ1`qhQtX? literal 0 HcmV?d00001 diff --git a/i18n/translation_pt.ts b/i18n/translation_pt.ts new file mode 100644 index 0000000..f9df3e3 --- /dev/null +++ b/i18n/translation_pt.ts @@ -0,0 +1,103 @@ + + + + + EmojiDrawer + + + search + Search... + + + + + emojicat-expressions + Expressions + + + + + emojicat-activities + Activities + + + + + emojicat-food + Food, drink & herbs + + + + + emojicat-gender + Gender, relationships & sexuality + + + + + emojicat-nature + Nature and effects + + + + + emojicat-objects + Objects + + + + + emojicat-people + People and animals + + + + + emojicat-symbols + Symbols + + + + + emojicat-travel + Travel & places + + + + + emojicat-misc + Miscellaneous + + + + + cycle-cats-android + + + + + cycle-cats-desktop + + + + + cycle-morphs-android + + + + + cycle-morphs-desktop + + + + + cycle-colours-android + + + + + cycle-colours-desktop + + + + diff --git a/opaque.pro b/opaque.pro new file mode 100644 index 0000000..b9bd10a --- /dev/null +++ b/opaque.pro @@ -0,0 +1,35 @@ +QT += quick + +#CONFIG += largefile + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which as been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +#SOURCES += \ +# main.go + +RESOURCES += qml.qrc + +TRANSLATIONS = i18n/translation_en.ts \ + i18n/translation_de.ts \ + i18n/translation_pt.ts \ + i18n/translation_fr.ts + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = + +# Additional import path used to resolve QML modules just for Qt Quick Designer +QML_DESIGNER_IMPORT_PATH = + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/qml.qrc b/qml.qrc new file mode 100644 index 0000000..b4cde22 --- /dev/null +++ b/qml.qrc @@ -0,0 +1,35 @@ + + +./HLine.qml +./styles/CwtchTextFieldStyle.qml +./styles/CwtchComboBoxStyle.qml +./styles/CwtchTextAreaStyle.qml +./styles/CwtchExpandingButton.qml +./styles/CwtchProgress.qml +./ButtonTextField.qml +./IconTextField.qml +./EllipsisLabel.qml +./Badge.qml +./controls/Loader.qml +./controls/ImageButton.qml +./controls/FlagButton.qml +./controls/Variables.qml +./FontAwesome.qml +./Icon.qml +./TextField.qml +./PortraitRow.qml +./ScalingLabel.qml +./UnderlineTextField.qml +./EmojiDrawer.qml +./ToggleSwitch.qml +./Button.qml +./theme/ThemeType.qml +./theme/Theme.qml +./theme/CwtchDark.qml +./theme/CwtchLight.qml +./Portrait.qml +./Toolbar.qml +./fonts/Fonts.qml +./RadioButton.qml + +