/srv/irclogs.ubuntu.com/2012/03/08/#ubuntu-translators.txt

dpmgood morning all08:22
TLEgood morning08:31
TLEdpm: while reworking the images site, I stubled in the problem of wanting to index a dictionary with a value that is placed in a variable. I did figure out how to do it, by defining a new tag, but I think it is a little wierd that they decided that it should not be a builtin08:37
TLEhttp://stackoverflow.com/a/466141508:38
dpmmorning TLE08:39
dpmlooking...08:39
TLEahh sorry context missing: in a django template08:39
dpmTLE, are you having the same problem as that guy? I.e. outputing the columns in ordr?08:41
TLEno, just more general, I loop over a list of keys, and I need to acces data in dictionaries (or rather classes that act like dictionaries) using the value of that key08:42
dpmah, I see08:42
TLEin any case, just thought I would share, as it seems like something you might need everyonce in a while08:42
dpmTLE, yeah, good to know. This might also work for you: you can override the __getitem__() method of your dictionary-like class to accept that variable and return you the right value08:46
dpme.g. http://pastebin.ubuntu.com/874218/08:46
dpm(a snippet I used a while ago in a class that contains a dict with other classes)08:47
TLEI don't think that's applicable, the problem is that if you in template say: for key in listofkey then key will contain a value that you could print, but if you try access a dictionary item with: dict.key it will acces dict['key'] and not dict[key]08:49
TLEdo the problem is that whatever I call my getitem method with will never change08:50
TLEerr: so the pro...08:50
dpmah, ok, I hadn't understood the issue, I get it now08:50
TLEin any case, the custom filter solution should work, I was just surprised it wasn't builtin (and will not be)08:51
dpmgotcha08:52
TLEdpm: on another note, on this talk of combining apps08:52
dpmyeah08:52
TLEhow do you develop your stats app, i.e. get a dbase to work with08:52
TLElocally08:53
dpmAs I'm using postgresql on the server, I'm also now using a postgresql database in my local machine, it's quite easy to set up, and I keep all the details of the connection on a local_settings.py file that I keep outside of revision control.08:54
dpmand I load from settings.py08:54
dpmI've also refined a bit more the "ifdefs" to detect the django version08:54
dpmas on the server it's still 1.108:55
dpmhttp://bazaar.launchpad.net/~dpm/+junk/ubuntu-translations-stats/view/head:/settings.py#L3508:55
dpmfor the ifdefs08:55
dpmand08:55
dpmhttp://bazaar.launchpad.net/~dpm/+junk/ubuntu-translations-stats/view/head:/settings.py#L21208:56
dpmfor the local_settings.py module08:56
dpmthat's where I keep the db connection variables (host, password, database) and the SECRET_KEY08:56
head_victimdpm & TLE I know you're both looking at translations websites. I just thought I'd share a drupal module (as opposed to your django work) that one of our awesome team members wrote in (I hope he doesn't mind!) http://is.gd/ltbgNL08:56
TLEdpm: ahh nice, how do you get data in the local dbase, run a script a few time manually or something?08:59
dpmhead_victim, oh, that's really cool, I wished I would have known about this earlier, we could have shared some code! :) I see he's using the same diagram library that I'm using too :)08:59
head_victimdpm: I know a lot of canonical hosted sites for projects and locos use Drupal is all so thought it was worth a mention09:00
head_victimI don't think he's happy with the code yet enough to share it but he is planning on putting it up as a module for people to use when it's ready.09:00
dpmhead_victim, yeah, the reason I'm using django is because the data manipulation requires a bit of coding, and it would be a bit difficult to do with Drupal + PHP, apart from the fact that for these kind of things Canonical IS strongly favours django over PHP09:01
head_victimdpm: I know how to admin a drupal install (barely), writing code is far from my forte so I'll trust you :)09:02
dpm:-)09:02
dpmhead_victim, I'd also be interested in what TLE is asking: how does he get the data and store it?09:02
TLE+109:02
head_victimI think it's a local cron.09:02
dpmand do you know if he gets the data from http://people.canonical.com/~dpm/data/ubuntu-l10n/ and processes it?09:04
head_victimI believe he scrapes LP09:04
TLEdpm: in any case, how do YOU get data in your local dbase for development?09:05
head_victimHe's not currently online but when he was you two weren't so thought I'd just grab this opportunity to show it :)09:05
head_victimI can definitely ask him though.09:06
dpmhead_victim, definitely, that's really cool :)09:06
head_victimI'll try to get him to post details to the ML because that doesn't matter what tz people are on then.09:07
dpmTLE, I used pg_dump to get the database data from the server at some point, and then imported it into my local database. Then I was good to go. I've also got the same cronjob that calls 'python manage.py importdata' to create a timestamp with the daily translation data, in the same way the server runs it, but in fact I do not need it. For development I just need the DB to be populated with some sample data09:08
TLEdpm: ahh ok, that sounds easy enough, then I think we should definitely look more at combining at some point, into a more general translation related site09:09
dpmTLE, yeah, what about something like a 'ubuntu-translations-webapps' project in LP?09:10
dpmI can create that during the course of the day, and set ubuntu-translations-coordinators as the driver, so that everyone in the team has got commit access09:11
dpmanother nice thing about this is that we could share the CSS styles and the base.html template09:11
TLEyes, that sounds good, then you can also do your initial code dump of the stuff from your +junk branch09:11
TLEyes09:11
TLEexactly09:11
TLEuh btw, do you have 5 minutes for ... ahh crap my new desk NOW, I'll have to log off for a while09:14
TLEawesome, new desk that can be raised :D10:48
dpmah, cool10:52
dpmI need to do something with my desk too. It's a proper office desk I got from my previous job when the company was replacing the old ones, but it's too low for me to work with the computer comfortably10:54
dpmI probably need a new shiny one with lots of things to tweak, but I wouldn't mind doing some DIY on the current one if I knew the best way to raise it :)10:55
TLEyeah10:56
TLEwe have been slowly replacing the ones at my work with some that can be (motorizerd) raised and lowered, so you can spend a part of the day standing, to avoid those lower back office problems10:57
dpmTLE, If you are happy with them, I might ask you for the make of those desks at some point. I like the idea of having the possibility of having both a regular and a standing desk in one :)11:10
TLEdpm: Mine was ordered from a Danish manufacturer, so that'll probably not help you much11:57
dpmoh, but we live in a global world :)11:57
TLEalso, they are kind of expensive, but if you do all you work a the computer it is probaly worth it11:58
TLEhttp://www.efgbondo.dk/products/products.asp?PageID=1954&ArticleNo=A32C07&ArticleID=35947&GroupString=11:58
TLEI don't think they deliver outside of country borders ;)11:58
dpmthanks :)12:00
dpmat least it will serve as reference to see if there is anything similar here12:00
TLEdpm: I sent you that long overdue email about the AliasMatching for the image app12:05
TLEjust ping me if you have questions12:05
dpmTLE, yeah, I saw it, thanks. I'll be moving the docs webapp to the Canonistack cloud instead of my own amazon AWS account soon. I'll either put it on a dedicated server or in the same one the stats webapp is running, so when I do the move I'll review the regexps.12:07
TLEyeah ok, maybe we should see about combining them pretty soon then12:08
TLEthe last stuff I wrote about just using a Alias gets a little more complicated if we have more than one app in a django instance12:08
TLEbut not to much12:08
TLEwe can just symlink the static directory over to the other app and share it12:09
TLEtell you what, if you can help me get a test instance of you app running, then I might be able to work on moving mine over12:15
TLEnot necessarily right now off course12:16
dpmTLE, sure. For my own sanity I've written instructions on how to deploy an instance of ul10nstats on a server. I can definitely help you setting up a test instance, you just have to tell me where (in the cloud, on a local virtual server...)12:21
TLElocal virtual probably12:36
TLEthe problem is that'll have to push this to off work hours, so maybe if you show me instructions then I can see how far I can get on my own12:38
TLEand probably also a dbase dump, where you have set up a admin account for me beforehand, so I can add the images information when I get it up and running and instructions for how to import it12:39
=== greyback is now known as greyback|lunch
TLEdpm: have you been talking to someone today about the lang packs?13:07
dpmTLE, hm, I haven't, and from what I see, the natty full langpack export failed :/ https://translations.launchpad.net/ubuntu/natty/+language-packs13:08
TLEok, will you follow up on that?13:10
dpmyeah, I'm already on it13:10
TLEthen I'll contact pitti about having the oneiric ons copied over to proposed13:10
TLEerr: ones13:10
TLEyou didn't have priviliges for that right?13:11
dpmno, only archive admins have privileges to upload to the archive13:12
TLEright13:21
=== greyback|lunch is now known as greyback
greybackdpm: ping13:42
=== bulldog98_ is now known as bulldog98
dpmhi greyback14:28
greybackdpm: hi, need your advice on setting up translations for unity2d. You were talking with tsdgeos yesterday. You recommended a precise-only branch to link with Precise translation, which makes sense. But is there a way to point Precise translations to a series (which then points to a branch)14:46
dpmgreyback, yeah, I think Launchpad only lets you link to series, not to branches anyway, but let me double-check...14:47
greybackWhen Precise is released, we immediately branch it into a "precise" branch, which is used only for updates. All work will continue on a trunk14:47
greybackthat precise branch will be our 5.0 series = Precise, so translations will stay Precise-only14:48
dpmgreyback, right, so you can do the switch afterwards, but for now I think enabling translations for the 5.0 series on https://translations.launchpad.net/unity-2d/5.0 would work, right?14:49
greybackdpm: Yes I think so. Just wanting to check with someone who understands this :)14:49
dpmgreyback, yeah, so the first thing you'll need to do will be:14:50
dpm1. Set translations policy for the whole unity-2d project.14:50
dpm- You do this here: https://translations.launchpad.net/unity-2d/+configure-translations14:50
dpm- Choose: Launchpad, unity-2d 5.0, Ubuntu Translators, Restricted on the options14:51
dpm2. Set up translations (automatic imports and exports) for the 5.0 series14:51
dpm- You do this here: https://translations.launchpad.net/ubuntu/hardy/+source/unity-2d/+sharing-details14:52
dpm(not too sure why the /hardy/ part appears in the url, though)14:53
* dpm investigates14:53
greybackdpm: We have some translated files in the branch, so we import templates & translation files I guess14:53
kelemengabordpm: hi, why ubuntu-translators? last week (or so), I told m4n1sh the same for activity-log-manager, but couldn't reason why it is the best - they have launchpad-translators, that's good too, or not good enough?14:54
m4n1shI am still not sure what to do14:54
kelemengaborgreyback: while we are at it, you want to fix https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/933468 too, right? :)14:54
m4n1shbut in our case the application is no ubuntu specific14:55
m4n1shit has some ubuntu specific code, but those are optional and can be configured via build system14:55
kelemengaborm4n1sh: AFAIK, in theory, unity-* isn't either ;)14:55
m4n1shyes, but still right now it is mostly present in ubuntu14:56
m4n1shbut alm can be made to run on other distros anytime14:56
m4n1shand unity depends on downstreams patches (AFAIK)14:56
greybackkelemengabor: that's the plan :)14:56
dpmkelemengabor, both would work. In theory, as upstream projects they should be assigned to launchpad-translators, but Unity is so coupled to Ubuntu that I just suggested ubuntu-translators as it's still the biggest translation group.14:56
dpmand to make things easier.14:57
kelemengaborgreyback: cool :)14:57
greybackkelemengabor: thank you for reporting it, we'd not noticed14:57
dpmgreyback, as an additional note on 2. - you can set the import to "import templates only" and the export branch to either the same branch as the imports or a separate one. The import branch is where the .pot files will be fed to Launchpad, and the exports branch where the .po files with the translations will be automatically committed14:59
dpmgreyback, I hope that makes it clearer, if I can help in any way, just let me know14:59
greybackdpm: that helps hugely, thank you15:00
dpmcool :)15:00

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