assets folder + emoji drawer #254

Merged
dan merged 5 commits from assmoji into master 2020-01-10 21:02:36 +00:00
Owner

Assets folder is extremely simple; just write paths in QML as gcd.assetPath + "path/to/file.png". Per our discussion, our existing release bundling workflow shouldn't need to be changed. The makefile temporarily moves the assets folder from root into the appropriate build folder before building, and qtdeploy takes care of it from there.

I had to manually merge the Makefile and fear I may have munged it a bit so please pay extra attention to it.

The emoji drawer is a bit of a rough cut but it would be nice to dogfood it a bit before our next release.

Assets folder is extremely simple; just write paths in QML as `gcd.assetPath + "path/to/file.png"`. Per our discussion, our existing release bundling workflow shouldn't need to be changed. The makefile temporarily moves the `assets` folder from root into the appropriate build folder before building, and qtdeploy takes care of it from there. I had to manually merge the Makefile and fear I may have munged it a bit so please pay extra attention to it. The emoji drawer is a bit of a rough cut but it would be nice to dogfood it a bit before our next release.
dan was assigned by erinn 2020-01-08 22:49:51 +00:00
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/461

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/461
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/463

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/463
Owner

main.go

gcd.SetAssetPath(path.Join(dir, "assets") + "/") 

the '+ "/"' is not os agnostic, won't play well on windows, and just out side the os safe path.Join --- from further checking bewlow and seeing its only used in qml/js, i'm optimistically willing to hope this might actually work?

qml/main.qml

T.twemoji.base = gcd.assetPath + "twemoji/"

prolly need at least gcd.assetPath + "/twemoji/" but i'm concerned about windows compatibility. In my dreams QML does the slash/path transform for us correctly cus JS + web magic... but I'll need to test

qml/eidgets/EmojiDrawers.qml

 ToolTip.text: qsTr("Click to toggle category\n"+(gcd.os == "android" ? "Long-press" : "Right-click")+" to reset")

this will cause translation problems, we need two different string ids (like clock-toggle-andoid and click-toggle-dekstop) to be picked from. Then just run lupdate ui.proto update the human translateable files,linquistand load the .en one and enter the translations (and mark them done/aproved) and then runlrelease ui.pro` to update the translation files

x the above comment for each time in this file this is done

**main.go** ``` gcd.SetAssetPath(path.Join(dir, "assets") + "/") ``` the '+ "/"' is not os agnostic, won't play well on windows, and just out side the os safe path.Join --- from further checking bewlow and seeing its only used in qml/js, i'm optimistically willing to hope this might actually work? **qml/main.qml** ``` T.twemoji.base = gcd.assetPath + "twemoji/" ``` prolly need at least `gcd.assetPath + "/twemoji/"` but i'm concerned about windows compatibility. In my dreams QML does the slash/path transform for us correctly cus JS + web magic... but I'll need to test **qml/eidgets/EmojiDrawers.qml** ``` ToolTip.text: qsTr("Click to toggle category\n"+(gcd.os == "android" ? "Long-press" : "Right-click")+" to reset") ``` this will cause translation problems, we need two different string ids (like `clock-toggle-andoid and click-toggle-dekstop) to be picked from. Then just run `lupdate ui.pro` to update the human translateable files, `linquist` and load the .en one and enter the translations (and mark them done/aproved) and then run `lrelease ui.pro` to update the translation files x the above comment for each time in this file this is done
Owner

qrc.qml was deleted - should be restored

qrc.qml was deleted - should be restored
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/465

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/465
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/467

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/467
Owner

looks good

looks good
dan closed this pull request 2020-01-10 21:02:35 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.