UbuntuIRC / 2015 /09 /18 /#ubuntu-app-devel.txt
niansa
Initial commit
4aa5fce
=== chriadam|away is now known as chriadam
[07:28] <davidcalle> Morning o/
=== chriadam is now known as chriadam|away
=== DanChapman_ is now known as DanChapman
=== JamesTait is now known as JamesTait_
=== JamesTait_ is now known as JamesTait
=== diddledan_ is now known as diddledan
[12:16] <dholbach> davidcalle, mhall119: how's the deployment?
[12:19] <davidcalle> dholbach, imminent, but delayed to monday to avoid doing it on a friday afternoon
[12:26] <dholbach> ok
[12:35] <karni> dpm: from https://developer.ubuntu.com/api/devel/ubuntu-13.04/qml/ui-toolkit/qml-ubuntu-components0-i18n.html it seems I can't easily disambiguate strings that may possibly have different translation in different context, if I'm using the same word in QML, would you agree? http://paste.ubuntu.com/12448243/
[12:37] <dpm> karni, you're using documentation for a very old framework
[12:37] <karni> dpm: Have you ever seen an instance, where some message ids (strnig based) would be passed to i18n.tr calls instead of English text, and English text translation was provided for those. Say, i18n.tr("login_button_label") and English translation: "Log in"?
[12:38] <karni> dpm: lol.. just noticed. that's what google returned, my bad.
[12:38] <dpm> karni, that's what you need: https://developer.ubuntu.com/api/apps/qml/sdk-15.04/Ubuntu.Components.i18n
[12:39] <karni> yes, I'm there now, thank you
[12:39] <dpm> karni, i18n.ctr()
[12:39] <karni> dpm: great. can you address my second question regardless? I wonder if anyone's done that before.
[12:40] <karni> dpm: which is also how Android apps are translated (sort of, the text id's are actually consts with numerical value pointing to the string translation)
[12:50] <dpm> karni, ah, sorry, I hadn't noticed it was another question. No, I've not seen that before. What I've seen is non-human messages e.g. "login_button_label" being used and then the translations being returned. That's... a less than stellar way of doing translations
[12:50] <dpm> as it's a pain for translators to figure out what the original English string is
[12:51] <karni> dpm: right, because they're working with what is within the tr call, not the English translation
[12:52] <karni> dpm: naturally :) thanks.
[12:57] <karni> dpm: it seems strings wrapped with ctr don't appear in the pot file, could you care to try reproduce that? such as: i18n.ctr("AccountSettings", "Info")
[12:59] <dpm> karni, you'll probably need to add --keyword ctr to the xgettext call (or some similar syntax, I'm talking off the top of my head)
[12:59] <karni> dpm: ok, that's part of the SDK qmake project setup, so I'll file a bug
[12:59] <dpm> ok, cool
[13:02] <mardy> DanChapman: hi! Are you (or someone else) working on adding support to Dekko for Yahoo Mail, via oauth?
[13:08] <DanChapman> mardy, hey! I did plan to look at yahoo at some point, as well as for outlook.com as they both support oauth2 (i think possibly icloud as well?).
[13:13] <DanChapman> mardy dekko currently only works using oauth if the server has the SASL-IR capability. Sending the initial client response in the challenge/response exchange still needs to be implemented
[13:23] <mardy> DanChapman: I'm not very familiar with the terms you are mentioning :-) Is that the same thing as XOAUTH2?
[13:30] <DanChapman> mardy :-) yes so XOAUTH2 is the auth mechanism that is used, SASL-IR provides a way to send the initial client repsonse with the AUTHENTICATE command see https://tools.ietf.org/html/rfc4959 but not all IMAP servers support it so instead you would have to wait for the continuation request before sending the client response containing your token etc
[13:37] <mardy> DanChapman: ok. I guess I'll just have to try, yahoo mail is completely undocumented
[13:37] <DanChapman> mardy, seems yahoo doesn't support SASL-IR http://paste.ubuntu.com/12448737/. If someone can make the UOA provider for it though I could definately find time soon to get it working ;-)
[13:38] <karni> zbenjamin: what project should I file a bug if the qmake project setup only has xgettext extract tr() calls, but not ctr() for instance? this should be re-aligned with https://developer.ubuntu.com/api/apps/qml/sdk-15.04/Ubuntu.Components.i18n/
[13:38] <karni> zbenjamin: basically, if you want to provide a context to translation (with i18n.ctr), it won't even show up in the .pot file
[13:39] <mardy> DanChapman: no problem, that I can do it :-)
[13:39] <zbenjamin> karni: hm qtcreator-plugin-ubuntu
[13:39] <karni> zbenjamin: thanks
[13:51] <DanChapman> mardy, awesome, that would be great. Thanks! I created https://bugs.launchpad.net/dekko/+bug/1497292 to track it
[13:51] <ubot5> Ubuntu bug 1497292 in Dekko "Yahoo online accounts integration." [High,Triaged]
[13:56] <zbenjamin> karni: do those work in cmake projects?
[13:57] <karni> zbenjamin: I don't know, working with a qmake project. Since it's in the docs, I gather it should work in both, but I did not have time to repro with a cmake one. I think it should be easy to nail where you do the xgettext calls, no?
[13:59] <zbenjamin> karni: yeah I was just wondering , because then i'd need to fix the cmake too
[13:59] <zbenjamin> karni: can read that up in the cmake files i guess
[13:59] <karni> zbenjamin: don't know Benjamin, it's the frist time I needed .ctr() and just noticed this
[13:59] <karni> zbenjamin: never used it with cmake though
[14:00] <karni> zbenjamin: I was hoping it'd be as easy for you as grep -r xgettext and ensure the project setup's are correct :)
[14:00] <zbenjamin> karni: should be
[14:00] <karni> :)
[14:01] <balloons> popey, how's the test writing going?
[14:01] <popey> not done yet
[14:41] <mardy> DanChapman: thanks! I added the provider file to the bug, it was easy :-)
[15:43] <rschroll> Some questions on drag-and-drop with the new ListItem
[15:44] <rschroll> First, is there any way to learn when a drag has ended using a live drag setup? You never get a ListItemDrag.Dropped signal, since all of the ListItemDrag.Moving signals were accepted.
[15:46] <sverzegnassi_> popey: that's really strange. just tested on BQ E5, OTA-6: downloaded a file with browser and imported in docviewer. The document has been imported, loaded and shown on display
[15:46] <popey> odd
[15:46] * popey reboots
[15:52] <popey> sverzegnassi_: rebooted phone and now it works!
[15:52] <popey> So lets forget about that for now :)
[15:56] <sverzegnassi_> popey: great! tomorrow I'll do the MPs for the three branches then
[15:56] <popey> \o/ thanks!
[15:56] <popey> sverzegnassi_: what's the easiest way to send lots of PDFs to docviewer?
[15:57] <popey> you said it gives a popup for multiple documents
[15:59] <DanChapman> mardy: awesome, thanks! i'll have a play with that over the weekend :-)
[16:02] <ts__> Hello , guidance needed for click packages , to run in unconfined mode ( to get dbus and db access).
[16:03] <beuno> ts__, this is just for development purposes? you won't ever be able to submit an uncofined app to the store
[16:05] <ts__> had to give it a go here just in case someone might just know that. and as fas as I know there is no other way to access dbus( registering interface) other than unconfined mode.
[16:05] <ts__> far*
[16:07] <beuno> ts__, jdstrand might be able to give you hints on how to use dbus
[16:08] <ts__> thanks beuno :)
[16:15] <jdstrand> ts__: it sounds like you want to ship a dbus service?
[16:16] <ts__> yes
[16:17] <jdstrand> that isn't permitted by the system
[16:17] <jdstrand> that would require a background service and registering the service in some way
[16:17] <ts__> unconfined mode can be used?
[16:17] <jdstrand> no
[16:17] <jdstrand> I mean, you could start it manully
[16:17] <jdstrand> manually
[16:17] <jdstrand> but, no autostart
[16:18] <ts__> autostart is not needed , want it through application
[16:19] <jdstrand> it is beyond the security policy. if you are using unconfined, it would allow you to do whatever with dbus
[16:19] <jdstrand> but bus policy won't let you start on system bus
[16:20] <jdstrand> you could start something on the session bus
[16:20] <jdstrand> it is likely not going to function properly with application lifecycle
[16:20] <ts__> need it on session bus , is it possible without unconfined mode? unconfined mode doesnt seems feasible either though.
[16:21] <jdstrand> basically, you are trying to do something that is in direct contrast to what is permitted in the design-- you might be able to get something to sorta work, but it's unsupported
[16:21] <ts__> i see , so only option is unconfined mode
[16:21] <jdstrand> security policy will block you from binding a service
[16:21] <jdstrand> unconfined would let you do that, but then the system will likely cause you trouble
[16:22] <ts__> i tried to set mode to unconfined in manifest file as "template":"unconfined" , this fiels isnt supported anymore
[16:23] <ts__> field*
[16:25] <ts__> so , how to run it as unconfined..?
[16:25] <popey> it should be supported
[16:25] <popey> we use it for terminal and file manager
[16:26] <popey> oh, it says "not allowed"
[16:26] <popey> [M#V[ (MANUAL REVIEW) 'unconfined' not allowed
[16:26] <popey> which is different from not supported :)
[16:26] <ts__> Lol , i meant not supported by click packaging :)
[16:27] <ts__> not allowed alright :)
[16:27] <popey> right.
[16:27] <popey> you could give your customers an unconfined click, or put it in the "open store", but unconfined apps won't go in the default store which is available on our customer devices
[16:28] <ts__> problem is i cant generate the click package with mode set to unconfined ( hope im not missing something there)
[16:29] <popey> odd, I am able to
[16:29] <popey> but it runs click-review afterwards, which gives the error message
[16:29] <popey> (I dont use qtcreator, I'm using click tools on the command line)
[16:29] <popey> but it does create a click.
[16:30] <popey> maybe manually edit the apparmor file outside of qtcreator (I don't know if we're being 'helpful' here in qtc?) and then open in qtc and build it?
[16:30] <ts__> i used terminal command as well , got the same error , something like " template field not supported"
[16:31] <popey> can you pastebin the full output so I can see pls?
[16:31] <ts__> sure ,gimme a min
[16:32] <ts__> ERROR: manifest malformed: unsupported field 'template'
[16:35] <popey> not seen that, guess it's a qtc specific error
[16:35] <popey> sorry
[16:37] <ts__> oh , its ok , i m stuck bad for this issue , thanks very much :)
[16:38] <rschroll> ts__: Just converted a project of mine to unconfined in Qt Creator, and it worked ok.
[16:38] <rschroll> Can you paste the contents of your apparmor file somewhere for us to see
[16:38] <ts__> apparmor does support unconfined mode
[16:39] <ts__> it is only this error I get when creating click package
[16:41] <ts__> going by documents , i should be apple to use "template":"unconfined" in manifest file, but error message i get states 'template field not supported' , although it does creates the click package
[16:41] <ts__> *able
[16:41] <rschroll> No, set template: unconfined in the apparmor file.
[16:42] <ts__> oh ok
[16:42] <rschroll> (The one referenced in the appamor hook in the manifest)
[16:42] <ts__> i see
[16:46] <ts__> compiling now ..
[16:51] <ts__> this is the error i get: :-1: error: security_template_valid (myapp.apparmor): (MANUAL REVIEW) 'unconfined' not allowed
[16:52] <jdstrand> that is write, but you should have a click
[16:52] <jdstrand> right*
[16:52] <ts__> yea , and this package will be able to work as unconfined..?
[16:53] <rschroll> It should. Give it a try and let us know
[16:54] <ts__> ohk
=== dpm is now known as dpm-afk
[17:28] <ts__> rschroll, it worked!
[17:40] <rschroll> Yay!
[17:40] <ts__> Thanks rschroll!!!
[17:42] <rschroll> np. Glad we could figure it out
[17:43] <ts__> :)
[17:46] <nemo> mcphail: oh. you're back. um... could I have the contents of that ppas.sh linking script plz?
[17:48] <ts__> that was brilliant of you , working on it to see if everything else is working as expected
[17:53] <ts__> thanks to popey and jdstrand too.
[18:18] <BlackJohnny> hi
[18:21] <BlackJohnny> i want to write a cmake section to "detect" ubuntu-touch as target for a cross-platform build
[18:21] <BlackJohnny> any hints on what is the right way to do it?
[18:21] <BlackJohnny> want to support desktop and mobile
[18:22] <BlackJohnny> i could just configure the desktop kit with a variable DESKTOP=1 ... but I wonder if there is no other more elegant way directly in CMakeLists.txt
[18:23] <BlackJohnny> thanks
[19:02] <rschroll> BlackJohnny: You could condition on the build architecture, I suppose
[19:03] <BlackJohnny> isn't that the same as for Android?
[19:04] <rschroll> Assume armhf is touch and x86 is desktop. But that assumes x86 tablets and armhf computers don't exist.
[19:04] <rschroll> Probably not a good idea
[19:04] <BlackJohnny> thanks
[19:05] <rschroll> I'm not sure how
[19:05] <rschroll> Android enters your thinking
[19:05] <BlackJohnny> for the moment I will use a cmake argument
[19:05] <rschroll> probably the safest path
[19:05] <BlackJohnny> i am working on adding support to cocos2d ... if that is even possible :)
[19:05] <BlackJohnny> testing ...
[19:08] <popey> "But that assumes x86 tablets and armhf computers don't exist."
[19:08] <popey> i own one of each of those :)
[19:22] <rschroll> I can reliably crash Mir. Should I be proud?
[19:52] <popey> rschroll: welcome to the club
[19:52] <popey> you're one of us now
[20:10] <rschroll> popey: This is on a stable image. Is it worth submitting a bug, or is mir moving fast enough that this is outdated?
[20:11] <popey> if it was a crash then apport should have caught it, and you should have something in /var/crash around the date/time involved?
[20:11] <popey> if so, then it gets uploaded and in general you shouldn't have to worry about it
[20:11] <rschroll> Let me check...
[20:13] <rschroll> Doesn't look like it...
[20:15] <popey> :(
[20:16] <popey> not sure there's much they can go on
[20:16] <rschroll> I can post the app that causes the crash
[20:17] <rschroll> (Also, don't know if it's Mir or Unity 8 or what that's dieing)
[20:32] <popey> rschroll: I'll happily test it on a bleeding edge device if that helps?
[20:33] <popey> rschroll: nothing in "sudo dmesg"? specifically nothing in "sudo dmesg | grep DEN"?
[20:35] <rschroll> Nothing obvious.
[20:36] <rschroll> Here's the guilty code: http://paste.ubuntu.com/12455686/
[20:36] <rschroll> I was wondering if a single app could have two winds
[20:36] <rschroll> windows
[20:36] <rschroll> I expect not, but wasn't expecting a crash
[20:36] <rschroll> I can zip up the full project if that would help
[20:38] <popey> ahh
[20:38] <popey> yes, i think thats known broken
[20:38] <rschroll> cool
[20:38] <rschroll> I didn't a quick glance through the bug list and didn't see anything
[20:40] <rschroll> popey: While I have you, who should I bug with questions about drag-and-drop with the new ListItem?
[20:41] <popey> t1mp or zsombi I think.
[20:43] <rschroll> Thanks.
[20:44] <rschroll> t1mp, zsombi: If you feel like fielding questions on drag and drop, please let me know.
[22:36] <karni> zbenjamin: qmake project also won't pick up "old style" _( ) for translations within C++, whereas tr() can't be used, because that's the built-in QObject method.
[22:37] <karni> zbenjamin: I mean, I thought I'd trick the qmake project to pick up strings for translations with #define tr(value) gettext(value), but that conflicted in a class that actually inherits from QObject
[22:37] <karni> zbenjamin: so the trick only worked for non QObjects :'(
[22:38] <karni> zbenjamin: would you have any advice for picking up translations from C++? (I only saw something about UbuntuI18n::tr, have not used that yet. most probably undocumented as well.)