[08:22] good morning all [08:31] good morning [08:37] dpm: 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 builtin [08:38] http://stackoverflow.com/a/4661415 [08:39] morning TLE [08:39] looking... [08:39] ahh sorry context missing: in a django template [08:41] TLE, are you having the same problem as that guy? I.e. outputing the columns in ordr? [08:42] no, 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 key [08:42] ah, I see [08:42] in any case, just thought I would share, as it seems like something you might need everyonce in a while [08:46] TLE, 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 value [08:46] e.g. http://pastebin.ubuntu.com/874218/ [08:47] (a snippet I used a while ago in a class that contains a dict with other classes) [08:49] I 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:50] do the problem is that whatever I call my getitem method with will never change [08:50] err: so the pro... [08:50] ah, ok, I hadn't understood the issue, I get it now [08:51] in any case, the custom filter solution should work, I was just surprised it wasn't builtin (and will not be) [08:52] gotcha [08:52] dpm: on another note, on this talk of combining apps [08:52] yeah [08:52] how do you develop your stats app, i.e. get a dbase to work with [08:53] locally [08:54] As 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] and I load from settings.py [08:54] I've also refined a bit more the "ifdefs" to detect the django version [08:55] as on the server it's still 1.1 [08:55] http://bazaar.launchpad.net/~dpm/+junk/ubuntu-translations-stats/view/head:/settings.py#L35 [08:55] for the ifdefs [08:55] and [08:56] http://bazaar.launchpad.net/~dpm/+junk/ubuntu-translations-stats/view/head:/settings.py#L212 [08:56] for the local_settings.py module [08:56] that's where I keep the db connection variables (host, password, database) and the SECRET_KEY [08:56] dpm & 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/ltbgNL [08:59] dpm: ahh nice, how do you get data in the local dbase, run a script a few time manually or something? [08:59] head_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 :) [09:00] dpm: I know a lot of canonical hosted sites for projects and locos use Drupal is all so thought it was worth a mention [09:00] I 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:01] head_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 PHP [09:02] dpm: I know how to admin a drupal install (barely), writing code is far from my forte so I'll trust you :) [09:02] :-) [09:02] head_victim, I'd also be interested in what TLE is asking: how does he get the data and store it? [09:02] +1 [09:02] I think it's a local cron. [09:04] and do you know if he gets the data from http://people.canonical.com/~dpm/data/ubuntu-l10n/ and processes it? [09:04] I believe he scrapes LP [09:05] dpm: in any case, how do YOU get data in your local dbase for development? [09:05] He's not currently online but when he was you two weren't so thought I'd just grab this opportunity to show it :) [09:06] I can definitely ask him though. [09:06] head_victim, definitely, that's really cool :) [09:07] I'll try to get him to post details to the ML because that doesn't matter what tz people are on then. [09:08] TLE, 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 data [09:09] dpm: 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 site [09:10] TLE, yeah, what about something like a 'ubuntu-translations-webapps' project in LP? [09:11] I 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 access [09:11] another nice thing about this is that we could share the CSS styles and the base.html template [09:11] yes, that sounds good, then you can also do your initial code dump of the stuff from your +junk branch [09:11] yes [09:11] exactly [09:14] uh btw, do you have 5 minutes for ... ahh crap my new desk NOW, I'll have to log off for a while [10:48] awesome, new desk that can be raised :D [10:52] ah, cool [10:54] I 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 comfortably [10:55] I 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:56] yeah [10:57] we 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 problems [11:10] TLE, 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:57] dpm: Mine was ordered from a Danish manufacturer, so that'll probably not help you much [11:57] oh, but we live in a global world :) [11:58] also, they are kind of expensive, but if you do all you work a the computer it is probaly worth it [11:58] http://www.efgbondo.dk/products/products.asp?PageID=1954&ArticleNo=A32C07&ArticleID=35947&GroupString= [11:58] I don't think they deliver outside of country borders ;) [12:00] thanks :) [12:00] at least it will serve as reference to see if there is anything similar here [12:05] dpm: I sent you that long overdue email about the AliasMatching for the image app [12:05] just ping me if you have questions [12:07] TLE, 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:08] yeah ok, maybe we should see about combining them pretty soon then [12:08] the last stuff I wrote about just using a Alias gets a little more complicated if we have more than one app in a django instance [12:08] but not to much [12:09] we can just symlink the static directory over to the other app and share it [12:15] tell 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 over [12:16] not necessarily right now off course [12:21] TLE, 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:36] local virtual probably [12:38] the 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 own [12:39] and 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 it === greyback is now known as greyback|lunch [13:07] dpm: have you been talking to someone today about the lang packs? [13:08] TLE, hm, I haven't, and from what I see, the natty full langpack export failed :/ https://translations.launchpad.net/ubuntu/natty/+language-packs [13:10] ok, will you follow up on that? [13:10] yeah, I'm already on it [13:10] then I'll contact pitti about having the oneiric ons copied over to proposed [13:10] err: ones [13:11] you didn't have priviliges for that right? [13:12] no, only archive admins have privileges to upload to the archive [13:21] right === greyback|lunch is now known as greyback [13:42] dpm: ping === bulldog98_ is now known as bulldog98 [14:28] hi greyback [14:46] dpm: 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:47] greyback, yeah, I think Launchpad only lets you link to series, not to branches anyway, but let me double-check... [14:47] When Precise is released, we immediately branch it into a "precise" branch, which is used only for updates. All work will continue on a trunk [14:48] that precise branch will be our 5.0 series = Precise, so translations will stay Precise-only [14:49] greyback, 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] dpm: Yes I think so. Just wanting to check with someone who understands this :) [14:50] greyback, yeah, so the first thing you'll need to do will be: [14:50] 1. Set translations policy for the whole unity-2d project. [14:50] - You do this here: https://translations.launchpad.net/unity-2d/+configure-translations [14:51] - Choose: Launchpad, unity-2d 5.0, Ubuntu Translators, Restricted on the options [14:51] 2. Set up translations (automatic imports and exports) for the 5.0 series [14:52] - You do this here: https://translations.launchpad.net/ubuntu/hardy/+source/unity-2d/+sharing-details [14:53] (not too sure why the /hardy/ part appears in the url, though) [14:53] * dpm investigates [14:53] dpm: We have some translated files in the branch, so we import templates & translation files I guess [14:54] dpm: 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] I am still not sure what to do [14:54] greyback: while we are at it, you want to fix https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/933468 too, right? :) [14:55] but in our case the application is no ubuntu specific [14:55] it has some ubuntu specific code, but those are optional and can be configured via build system [14:55] m4n1sh: AFAIK, in theory, unity-* isn't either ;) [14:56] yes, but still right now it is mostly present in ubuntu [14:56] but alm can be made to run on other distros anytime [14:56] and unity depends on downstreams patches (AFAIK) [14:56] kelemengabor: that's the plan :) [14:56] kelemengabor, 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:57] and to make things easier. [14:57] greyback: cool :) [14:57] kelemengabor: thank you for reporting it, we'd not noticed [14:59] greyback, 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 committed [14:59] greyback, I hope that makes it clearer, if I can help in any way, just let me know [15:00] dpm: that helps hugely, thank you [15:00] cool :)