/srv/irclogs.ubuntu.com/2012/09/12/#ubuntu-translators.txt

roadmrdpm: hello! sorry to pester you again, do you think https://bugs.launchpad.net/ubuntu/+source/checkbox/+bug/1044035 is ready for a veredict? or do you want to wait until I figure out how to add a comment as requested by Redmar?15:00
ubottuLaunchpad bug 1044035 in checkbox (Ubuntu) "UIFe: Checkbox header graphic is wrong" [High,Triaged]15:00
roadmrdpm: skaet has me on a deadline, hence why I'm bugging you so much :)15:00
dpmroadmr, don't worry, I'm used to bugging people, so I can truly understand it :-)15:01
dpmlet me have a look15:01
dpmroadmr, if it's not too much work, I'd recommend adding the comment. it is just a matter of adding a comment line just above the translatable string in the code, and gettext will do the rest (i.e. it will extract it and put it in the .pot template, so that it is visible for translators in Launchpad)15:03
dpmE.g.15:03
dpm# TRANSLATORS: you're awesome!15:03
dpmprint(_("This is a translatable string"))15:03
roadmrdpm: the code in question is a Qt .ui file :/ I'll do some research on how to achieve that15:04
* roadmr experiments with shuttling comments from the .ui file to the auto-generated .c file15:08
dpmroadmr. I think you should be able to add comments in Qt Creator for the given string. As per putting the translatable strings from the .ui file to the .pot file, intltool should handle it, but you're using something else, I seem to recall15:11
dpmso unfortunately, I'm not sure I can help much :(15:11
dpmif it proves difficult and you're on a deadline, it's a lower priority item, I'd say, and you can leave it out15:12
roadmrdpm: no, we're using intltool, we managed to integrate with it :) and actually the Qt build process generates a .h file from which the strings are extracted, but I'd hate to have to maintain the .h file by hand15:15
roadmrdpm: I'll give QT Creator a quick try15:16
dpmroadmr, ok. I need to go now, but I'll be back online in 1 h or 2. Also feel free to e-mail me if I can help in anything, and I'll try to reply as soon as I can15:29
roadmrdpm: ok thanks! I'll wrestle with this for a bit, if I have no progress when you get back I'll let you know so we can maybe let this go through even without the comments15:30
roadmrdpm: thanks for your help :)15:30
dpmroadmr, sounds good15:30
=== dpm is now known as dpm-afk
=== dpm-afk is now known as dpm
roadmrdpm: hello :) ok, so I went looking and I found no way to add the comment from within the .ui file :/ it works if I add it to the auto-generated .h file but any change in the .ui will clobber that so it's not a sustainable approach :/16:33
roadmrdpm: I wonder if you'd agree to OK the exception, I'll continue to research on adding the comment anyway16:40
dpmroadmr, it sounds fine to me if it's difficult to implement or not doable in qt designer16:41
roadmrdpm: yep, it's not easy to do anyway :/16:42
dpmroadmr, actually, wait a sec, I see that in Qt Designer there is a field to add a comment, so we might be able to do it. Let me send you a screenshot16:42
roadmrdpm: yay! well I can add a comment directly in the xml file, it just doesn't get translated to something that intltool understands (i.e. an actual comment in the .h file that uic generates)16:43
dpmroadmr, looking at this screencap, the 'comment' will be added to the .ui file. Does it get ignored by whatever creates the intermediate .h file? http://ubuntuone.com/0o4PE2bqH3w7JncFDiStX416:48
roadmrdpm: oh ok! I'll give it a try, but yes, I think that just gets added as disambiguation to the translate method call16:49
roadmrdpm: need to go for lunch (grumble), back in a bit!16:49
dpmroadmr, enjoy! ;) - you can also give a go at the 'disambiguation' field. I think one of them should generate a comment. Let me see if I can try it16:50
dpmroadmr, ok, it seems that only the 'disambiguation' field goes through to the generated .h file, but you're right, in a way intltool cannot parse:17:01
dpmlabel_2->setText(QApplication::translate("CalculatorForm", "Input 2", "This is a disambiguation", QApplication::UnicodeUTF8));17:01
dpmbtw, out of interest, how do you feed the generated .h file to intltool to understand the Qt strings? Does it understand them without further processing?17:02
=== dpm is now known as dpm-afk
roadmrdpm-afk: in our build script we just ensure that uic-qt4 runs before intltool, intltool picks up the .h file and correctly extracts the strings17:40
trijntje_hi roadmr, did you see my request on the bug report to add a comment specifying the maximum length of translations?17:49
roadmrtrijntje_: ah, you must be Redmar. Yes, I replied to it in the bug report. Short version: it's not easy to do :/ https://bugs.launchpad.net/ubuntu/+source/checkbox/+bug/1044035/comments/717:49
ubottuLaunchpad bug 1044035 in checkbox (Ubuntu) "UIFe: Checkbox header graphic is wrong" [High,Triaged]17:49
trijntje_roadmr: ah, missed it, I'm sorry. No problem, don't spend too much time on it if it's difficult to do17:51
roadmrtrijntje_: yes, apologies :/ Qt claims to have "great translation support", it's just not so easy to integrate with gettext toolchain, which is what the rest of checkbox uses :/17:51
trijntje_dont get me started on translating qt applications, I'm not a fan ;) But thanks for looking into it anyways17:54
roadmrno problem, thanks for your suggestions :)17:54
dpm-afkroadmr, to wrap this up, and unless you've already tested it, I'd suggest trying whether intltool picks up the 'disambiguation' comments as generated by qt designer and then put in the .h file by uic. If it does and they end up in the .pot file, then great, otherwise we can just leave it18:52
=== dpm-afk is now known as dpm
roadmrdpm: it doesn't, :(18:53
roadmrdpm: sorry :( I actually tested this by editing the xml by hand and adding a "comment" attribute to the qlabel, the disambiguation thing goes in, but intltool ignores it :(18:53
dpmroadmr, ah, bummer :( thanks for trying anyway18:57
roadmrdpm: yep :/ we'll try to fix this in a better way at some point18:57
dpmnp18:59
roadmrdpm: don't forget to comment on the bug so skaet is happy when the merge request hits :018:59
dpmroadmr, done19:02
roadmrdpm: thanks, much appreciated :) apologies for all the pestering19:03
dpmroadmr, that wasn't pestering, always glad to talk about how to better localize the desktop :)19:03
roadmrdpm: well we still have work to do on checkbox, some is Qt-related and we have an outstanding task to improve how our rfc822 files are handled, luckily I always get great help here :019:04
roadmrer, :)19:04

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!