/srv/irclogs.ubuntu.com/2012/04/04/#ubuntu-translators.txt

artnaydpm: I have the latest updates but theme names and (default) are in English. I only see revision 237 of 04_new_appearance_settings.patch - bug 96829005:53
ubottuLaunchpad bug 968290 in Ubuntu Translations "System settings -> Appearance -> Theme entries don't appear translated" [Medium,Fix released] https://launchpad.net/bugs/96829005:53
dpmhi artnay, good morning. Yeah, I was pinging you about it yesterday. Would you mind filing a separate bug as a follow-up? This way the desktop team can track it and clean it up05:55
artnaydpm: yes, I saw your highlight this morning. shouldn't I just reopen that bug and tell that theme names (originating from http://l10n.gnome.org/POT/gnome-themes-standard.gnome-3-4/gnome-themes-standard.gnome-3-4.pot ) were not marked for translation?05:58
dpmartnay, generally developers prefer not re-opening new bugs after they've been marked as fix released. That's why I would suggest filing a new one, and adding a reference to the old one in the description06:00
dpmas per (default) being in English, it was a recent change, which I'm not sure it has made it to the language packs yet06:01
dpmso the English (default) part might be a non-bug, but the English theme names definitely still applies06:01
artnaydpm: yeah, default was included in g-c-c template but not the theme names. I'll file a new one later.06:32
dpmgreat, thanks artnay!06:32
dpmhi TLE, morning. If you've got a minute, would you mind testing if http://91.189.93.101/ is working for you now?09:18
TLEdpm: it shows an index of files10:38
dpmah, we're not there yet, but getting better :)10:42
dpmargh, it was a cronjob that didn't create the localized files. Let me try again...10:46
dpmTLE, can you try again?11:15
TLEdpm: we have lift off11:17
dpm\o/11:17
TLE;)11:17
dpmawesome11:17
TLEgotta go for two min11:18
dpmthanks for testing11:18
TLEnp11:18
dpmok, leaving early to start Easter Holidays, see you all on Tuesday!11:46
gotwighey there12:45
gotwigkelemengabor: hey12:45
kelemengaborhi12:45
=== vibhav_ is now known as vibhav
gotwigkelemengabor: I sent you a mail just now, via launchpad12:55
kelemengaborgotwig: okay, I took a look at your code. what you currently need is a beginners guide to i18n, and we don't really have one except for this: https://wiki.ubuntu.com/MeetingLogs/OpWeek1003/Translate13:14
kelemengaborbased on this, I think you can start learning how to internationalize your program13:15
kelemengaborcurrently, I don't have time to do it for you, sorry :(13:15
gotwigkelemengabor: no problem. I am in my holidays :-) I try to apply some code from the video lens13:16
gotwigkelemengabor: ok ?13:17
kelemengaborbasically, you need to set up a little build system, I'd recommend python-distutils-extra, because its really simple13:17
kelemengaborthat would be great :)13:17
gotwigkelemengabor: looks tooo complex :/13:22
gotwigkelemengabor: is there a way to create the POT files automaticly?13:58
sagacigotwig: using gettext?13:59
kelemengaboryou can run intltool-update -p any time13:59
kelemengaborin the po directory, that is14:00
gotwigbut I dont know how to make a template for that...14:00
gotwigI inserted all the variables at the header of the files14:00
gotwig"in"14:00
gotwigwhere I want translations14:00
gotwigso, what now?14:00
kelemengaborcreate a po directory14:01
gotwigkelemengabor: have it already14:01
kelemengaborand a po/POTFILES.in file14:01
gotwigI applied that one from the other14:01
gotwigso, yeah have it14:01
kelemengaborlist all the files with translatable strings in it14:01
gotwigjust the pot files are missing...14:01
kelemengaborgood :)14:02
gotwigso what now :D14:02
kelemengaborthen you need to run intltool-update -p14:02
kelemengaborin the po directory14:02
kelemengaborthat will create the pot file14:02
gotwigI already have created directories14:03
gotwiglike launchpad wrote14:03
gotwigfor every file14:03
kelemengaborbut if you use python-distutils-extra, that will create one when you do ./setup.py build14:03
gotwigso I can remove these dir's?14:03
kelemengaborwhat dirs exactly?14:04
gotwig*with no content*14:04
gotwigfor every pot file14:04
gotwigI created a directory14:04
kelemengaborgeez, no!14:04
kelemengaborthere is only one pot file14:04
gotwigkelemengabor: launchpad said that14:04
kelemengaborno need for more for such a tiny program14:05
kelemengaborcd into the po directory, and issue intltool-update -p, this should create one pot file14:06
kelemengaborthat's enough14:06
gotwigvide.lens.in14:07
gotwig*video* , ehm I need also such a thing, right?14:07
kelemengaboryes, the .lens files are technically .desktop files14:08
kelemengaborso whatever is written about their localization, stands for .lens files too14:09
gotwigehm but I have .service file already14:09
gotwigisnt that enough?14:09
kelemengaborthat's a different thing14:09
kelemengabor.service files are for D-Bus, not users, so there is nothing to do with them14:10
kelemengabor.lens files contain user visible strings, so you need to deal with them14:11
gotwigkay14:12
gotwignow I have untitled.pot14:12
gotwigkelemengabor: so what now :-)14:14
kelemengabortranslate it :)14:15
kelemengaborbut first, check if it really has all the strings you want to translate14:15
gotwigkelemengabor: yes, it has. What you mean with translate it. I want to import it on my launchpad project14:18
kelemengaborthat too, but first it is better to test it, just to see if everything is in place14:19
gotwigkelemengabor: oh ok14:19
kelemengaborI'd bet that this isn't the case ;)14:19
gotwigkelemengabor: so directly in the POT file?14:19
kelemengaboryes14:20
* gotwig is lazy14:20
kelemengaborthen save it as de.po14:20
kelemengaborthen you can build the project, and see it in action14:22
gotwigkelemengabor: I think the pot file is wrong...14:24
gotwigkelemengabor: http://paste.ubuntu.com/914590/14:25
kelemengaborlooks good14:26
gotwigkelemengabor: but the " " " things14:26
gotwigkelemengabor: whats with them14:26
kelemengaborwhat do you mean by " " " things ?14:27
gotwigkelemengabor: msgid "" "Can't find gourmet recipe managers database in ~/.gourmet/recipes.db. Is it " "installed?" msgstr ""14:28
kelemengaborthose are just long lines broken into shorter ones, don't worry14:29
kelemengaborthere is one thing to worry about when testing, the "Content-Type: text/plain; charset=CHARSET\n" line - you need to replace CHARSET by UTF-8 in this. other default values can be left unchanged, but msgfmt will bail out on this one14:31
gotwigkelemengabor: ok, so I have now my de.po14:36
gotwigkelemengabor: what now14:36
kelemengabordid you set up your project with python-distutils-extra?14:37
gotwigkelemengabor: what you mean, no14:38
kelemengaborokay, then that's the next step14:38
kelemengaboryou need a minimalistic build system, to:14:38
gotwigkelemengabor: setup.py and such stuff14:39
kelemengabor* merge the translations into the lens file14:39
kelemengaboryup14:39
gotwigkelemengabor: ??14:39
kelemengabor* create .mo files from .po files and install them14:39
kelemengaboryou need to automate these things, and a build system does that14:40
gotwigkelemengabor: can I apply the one from the video lens?14:40
kelemengaboryes14:40
kelemengaborwith minor changes :)14:40
gotwigkelemengabor: so setup.cfg and setup.py?14:41
kelemengaboryes, nothing else!14:41
* gotwig is amazed14:42
gotwigkelemengabor: 'lib/unity-lens-video'14:45
gotwigkelemengabor: duno how to replace that, or with what14:45
gotwigkelemengabor: ok, finished somehow, how does that look?14:48
gotwigkelemengabor: http://paste.ubuntu.com/914623/14:49
kelemengaborwith the data_files, you should tell the build system where to install and what14:50
kelemengaborso probably the lib part should have been left unchanged14:50
kelemengaborbasically what you now do in the debian/unity-lens-cooking.install file should be abstracted out into setup.py14:52
gotwigkelemengabor: in the data_files section?14:53
kelemengaboryes14:54
gotwigkelemengabor: for each file?14:55
kelemengaborbut I'm not really a programmer myself to explain it in enough depth14:55
gotwigkelemengabor: you dont have to14:55
gotwigkelemengabor: so for each file?14:55
kelemengaborno, for each target directory14:55
kelemengaborso if you have more .service files that go into the same directory14:56
kelemengaborthey can go into the same entry14:56
gotwigkelemengabor: e.g?14:56
kelemengabor"no programmer"14:56
kelemengaborsorry :(14:56
gotwigkelemengabor: thats no programming stuff xD14:57
gotwig^^14:57
kelemengaborI saw something like this in language-selectors setup.py14:57
kelemengaborplease check that14:57
gotwigkelemengabor: language-selectors, what you mean?14:57
kelemengaborlp:language-selector14:57
gotwigkelemengabor: This branch is obsolete. Please use    bzr branch ubuntu:language-selector  from now on.14:59
gotwiglol14:59
kelemengaboryay :)14:59
gotwigkelemengabor: http://paste.ubuntu.com/914644/15:08
kelemengaborlooks good15:09
gotwigkelemengabor: so what now15:09
kelemengabornow you can run ./setup.py build_i18n15:10
kelemengaborand it will/should generate a pot file15:10
kelemengaborlike magic! :)15:10
kelemengaborand its name won't be untitled.pot, but unity-lens-cooking.pot15:10
kelemengabornow you can commit that into the branch and set it up for import into LP15:11
gotwigERROR15:11
kelemengabor?15:11
gotwigkelemengabor: NOTICE: po/de.po is not in UTF-8 but CHARSET, converting... Unknown encoding 'CHARSET' at /usr/bin/intltool-merge line 41915:11
kelemengaboryay...15:12
kelemengabortold you :)15:12
gotwigkelemengabor: so what xD15:12
kelemengabor(16.31.11) kelemengabor: there is one thing to worry about when testing, the "Content-Type: text/plain; charset=CHARSET\n" line - you need to replace CHARSET by UTF-8 in this. other default values can be left unchanged, but msgfmt will bail out on this one15:12
* gotwig ist wütend15:13
gotwigkelemengabor: intltool-merge -d po cooking.lens.in build/share/unity/lenses/cooking/cooking.lens Merging translations into build/share/unity/lenses/cooking/cooking.lens.15:13
gotwigkelemengabor: worked15:13
kelemengaborthe translations exported from LP won't suffer from this, but if you test manually, you have to take care of such silly details15:14
kelemengabornice!15:14
gotwigkelemengabor: so what now15:14
gotwig;)15:14
gotwigbuild a package with debuild for my own?15:14
kelemengaboryes15:14
gotwigkelemengabor: how old are you15:14
kelemengaborand see if that goes alright15:15
kelemengaborthat's irrelevant ;)15:15
gotwignot for me, Sir ^^15:16
gotwigkelemengabor: thanks for your help15:16
kelemengaboryou are welcome :)15:16
gotwigso now testing15:18
gotwigfinished15:18
gotwighave to restart my pc...15:18
gotwighey15:25
gotwigkelemengabor: dont worked, I think I have to import some libraries...15:26
gotwigkelemengabor: NameError: name 'APP_NAME' is not defined15:26
kelemengaborum, yes15:26
kelemengaborthere is a few lines to be inserted in the code15:27
gotwigkelemengabor: what is the error here ^15:27
kelemengaborhttp://docs.python.org/library/gettext.html15:27
gotwigkelemengabor: In the scopes : NameError: name '_' is not defined15:27
kelemengaborsee the example code under 22.1.1. GNU gettext API15:28
gotwigkelemengabor: whats up with APPNAME?15:29
gotwigAPP_NAME15:30
kelemengaborin many cases the gettext initialization needs to happen in many files, because there are multiple executables in the same project, and to make this more reliable, developers define these in a config.py file, which they import and use the variables15:31
kelemengaborthis is why you see this APP_NAME in the copied code15:32
gotwigconfig.py :/15:32
kelemengaborbut, for such simple projects, this is not necessary15:32
kelemengaborand you can simply replace it with the name of the pot file15:32
kelemengaborwhich is called here the translation domain15:32
kelemengaborand the path part in the bindtextdomain call can be /usr/shar/locale15:33
gotwigthe local_PATH ?15:33
kelemengaborso just hardwire it in the code, and hope that it won't get much more complicated in the future :)15:34
kelemengaboryes, that one15:34
gotwigand APP_NAME?15:34
gotwigkelemengabor: hm, I g2g in 1 min...15:35
kelemengaborthat would be the value of the name= key in setup.py15:36
andrejzhi!15:36
gotwigandrejz: jo15:36
andrejzdoes docs site work for anyone else http://91.189.93.101/ ?15:36
kelemengaborunity-lens-cooking15:36
kelemengaborandrejz: not for me15:37
gotwigkelemengabor: thanks15:37
andrejzkelemengabor what does unity-lens-cooking do?15:38
kelemengaborsearches recipes online15:38
kelemengaborgotwig was learning how to internationalize things :)15:38
andrejzthat sounds quite cool15:39
andrejzaltough i don't know how helpful is it to internationalize the lense if the source (recipies) are in english15:39
kelemengaboryeah... but it just became apparent that we don't really have good developer tutorials on this topic15:40
kelemengaborwell, that's a good question, but I think the helpful thing is that he learned a little about i18n in general :)15:42
andrejztoo bad web page doesn't work15:49
andrejzi was planning to review the documentation15:49
andrejzversion on HDD is outdated :(15:50
gotwighey16:08
gotwigkelemengabor1: jo16:08
gotwigkelemengabor1: the lens now somehow runs, but the scope give me : Traceback (most recent call last):   File "./unity-scope-recipefy", line 14, in <module>     RUNNING = _("Failed to own name %s. Bailing out. An other instance is already running!") NameError: name '_' is not defined16:08
kelemengabor1hi gotwig16:08
gotwigkelemengabor1: should I paste the file?16:09
kelemengabor1yes - you have to import gettext in every file16:09
kelemengabor1that contains translatable strings16:09
kelemengabor1also the _ = gettext.gettext line16:10
gotwigkelemengabor1: http://paste.ubuntu.com/914729/16:10
kelemengabor1and nothing else - so not the textdomain things16:11
gotwigkelemengabor1: is in the lenns file tooo much info?16:11
gotwig"lens"16:11
kelemengabor1no :)16:12
kelemengabor1but the _ = gettext.gettext is missing in most of these16:13
gotwigkelemengabor1: I need more than that16:13
gotwigkelemengabor1: LANG= etc. , roo16:13
gotwig"too"16:13
kelemengabor1in theory, not16:14
kelemengabor1the initialization stuff needs to be defined once per process16:14
gotwigkelemengabor1: so yes... ?16:14
kelemengabor1the meaning of the underscore is once per file16:14
gotwigkelemengabor1: per system process?16:14
gotwigkelemengabor1: I totaly dont understand what I have to do now :(16:15
kelemengabor1so...16:17
gotwigkelemengabor1: cant I just apply the specific header things from the lens file?16:17
kelemengabor1if it is a standalone process, it needs to know where it should look for translations16:17
kelemengabor1if it is an imported module, then this is not needed16:18
kelemengabor1this is why the textdomain needs to be set once per process16:18
kelemengabor1but the gettext module needs to be imported into each file that uses it16:19
kelemengabor1and because it is a little long to type gettext.gettext(), you need to define a convenience alias for it16:20
kelemengabor1also for each file that uses it16:20
kelemengabor1now on to the paste, I think the gettext initialization is overcomplicated for no specific reason, between lines 251 and 29016:21
kelemengabor1the environment variables are usually handled correctly by Python itself16:22
kelemengabor1so no need to fuss with them, IMHO16:22
gotwigkelemengabor1: the video lens has these lines (?)16:23
kelemengabor1ask its developer why :)16:23
kelemengabor1because usually it is not necessary...16:24
gotwigkelemengabor1: the developer said he had nothing to do with the translations16:24
gotwigkelemengabor1: so do  you know how I can replace it ?16:24
* gotwig wishes a 'golden' paste16:25
kelemengabor1yes, look at the example code on http://docs.python.org/library/gettext.html16:25
kelemengabor1those are the important things16:25
gotwigkelemengabor1: haha, my translated error message gets displayed16:28
kelemengabor1cool :)16:28
gotwigfor geeks maybe xD^^16:28
gotwigkelemengabor1: hm.. I got a few problems16:32
kelemengabor1still? :(16:33
gotwigkelemengabor1: I restart16:33
gotwigkelemengabor1: wait16:33
gotwighey16:40
gotwigkelemengabor1: jo16:40
gotwigkelemengabor1: does not work!! :X16:40
kelemengabor1:(16:41
kelemengabor1any error message?16:41
gotwigkelemengabor1: in the lens, yes16:42
gotwig(process:7915): libunity-WARNING **: unity-scope-factory.vala:78: Unable to search for scopes: No such file or directory16:42
gotwigkelemengabor1: hmm...16:43
kelemengabor1this is at least not an i18n error :)16:44
kelemengabor1rather packaging...16:44
Atlantic777Hi! Is there a way for my translation of vimtutor file be in the Precise repositories?16:47
gotwigkelemengabor1: ... any plan? should i paste ß16:48
gotwig?16:48
kelemengabor1re17:03
gotwigkelemengabor1: any idea, boss :D ?17:04
kelemengabor1well, without seeing the code...17:04
gotwigkelemengabor1: well, I could up it17:04
gotwigkelemengabor1: but that would break some stuff17:04
kelemengabor1please do17:05
gotwigkelemengabor1: I mean, its not that stable17:05
gotwigkelemengabor1: can I past it17:05
gotwig?17:05
gotwigor, wait I just up it in U117:05
kelemengabor1paste is fine17:05
gotwigkelemengabor1: which files?17:05
kelemengabor1hm, any/all of them :)17:06
gotwigkelemengabor1: ok, wait for U1 up :O17:06
gotwigkelemengabor1: you can edit the files, when I have your mail17:10
kelemengabor1okay, kelemeng at ubuntu dot com17:10
gotwiga ubuntu mail adress, cool :P17:11
kelemengabor1be an ubuntu member, and you can have one too :)17:11
gotwigI know, but its not that easy :X17:11
gotwigkelemengabor1: ok, I added you to the share list17:12
kelemengabor1got it17:12
gotwigkelemengabor1: goood17:15
gotwigkelemengabor1: hmm, do you know the IRC channel name of canonical?17:17
kelemengabor1no17:17
gotwigkelemengabor1: hm, do you see something strange in the code ... ?17:19
* gotwig is afk for 10 mins17:22
kelemengabor1nothing yet17:22
* gotwig is back17:31
gotwigkelemengabor1: :-)17:35
gotwigkelemengabor1: you haven't found anything wrong, right :X ?17:36
kelemengabor1gotwig: sorry, something is wrong with my U1 account, I see the folder on the web, but it does not sync locally17:37
kelemengabor1could you share it again, this time with kelemeng at gnome dot hu?17:37
gotwigkelemengabor1: ok17:37
kelemengabor1thanks17:38
gotwigkelemengabor1: I  thank you.17:38
gotwigkelemengabor1: got it?17:39
kelemengabor1yes17:39
gotwigkelemengabor1: :-) ?17:49
kelemengabor1still does not sync :(17:49
kelemengabor1please send a tarball :)17:49
gotwigkelemengabor1: hmmm17:55
gotwigkelemengabor1: you can simply download it over the webpage17:55
gotwig, cant you?17:56
kelemengabor1I don't see an option for that17:57
gotwigwget has all options, lol. :D17:57
gotwigkelemengabor1: to the gnome mail adress?17:58
kelemengabor1yes please :)17:58
gotwigkelemengabor1: sent18:00
gotwigkelemengabor1: got it?18:03
kelemengabor1yes18:03
gotwigkelemengabor1: good18:08
gotwigkelemengabor1: found anything (  third question :O ^^)18:16
kelemengabor1nothing outstanding, but the deb file is successfully built :)18:16
kelemengabor1logging out to test it18:16
gotwig_kelemengabor1: back..18:21
gotwig_kelemengabor1: somehow I had a timeout18:21
gotwig_henninge: hey18:22
henningeHi gotwig_ !18:26
gotwig_henninge: J0!18:27
kelemengabor1gotwig_: okay, one problem: the package does not contain the .mo files18:29
gotwig_kelemengabor1: ok18:30
gotwig_kelemengabor1: so do you have a solution18:30
kelemengabor1they are generated in build/mo, they should go to /usr/share/locale/18:31
kelemengabor1well... this is just one problem, there may be others too. not sure yet18:32
gotwig_kelemengabor1: can I manualy copy them there, and than retest?18:32
kelemengabor1yes, it is worth a try18:32
gotwig_kelemengabor1: it doesnt looks bad, IMHO...18:33
gotwig_kelemengabor1: the error message in console worked18:33
gotwig_for scope18:33
gotwig_kelemengabor1: in german18:33
kelemengabor1good, then we are close :)18:33
gotwig_kelemengabor1: but I g2g soon :(!18:34
gotwig_kelemengabor1: in which timezone are you?18:34
kelemengabor1CEST18:34
kelemengabor1but tomorrow I'll be traveling18:34
gotwig_damn18:34
gotwig_:-)18:34
gotwig_have fun18:35
kelemengabor1usually, you can find me here18:35
kelemengabor1I'll be offline only for one day, so you can find me on friday and after :)18:35
gotwig_kelemengabor1: I dont know why they dont run...18:36
gotwig_kelemengabor1: oh and I see no lenss18:36
gotwig_"lens"18:36
kelemengabor1I see it, but does not work18:36
kelemengabor1I mean after typing in something, I should see some results, right?18:37
gotwig_kelemengabor1: yes, and you should see the icon of the lens18:38
gotwig_kelemengabor1: in the dash18:38
gotwig_kelemengabor1: thats more importantt18:38
gotwig_"important"18:38
kelemengabor1the icon appears18:38
gotwig_kelemengabor1: do you know someone other that may help me?18:38
kelemengabor1not really, I'm not into lens development, but ask on #ubuntu18:39
gotwig_kelemengabor1: thanks, bye18:39
kelemengabor1bye18:39
gotwig_kelemengabor1: good night ;Ü18:39
kelemengabor1oh, one more thing!18:40
kelemengabor1you install the lens from the wrong dir18:40
kelemengabor1in debian/unity-lens-cooking.install18:41
kelemengabor1you should install the one from build/share18:41
kelemengabor1not the one from the project root18:41
kelemengabor1which, btw, should not exist anymore18:41
gotwigkelemengabor1: hey19:29
kelemengabor1re gotwig19:33
gotwigkelemengabor1: so, is there something wrong in packaging?19:58
kelemengabor1yes, the lens file19:59
kelemengabor1I don't think this is why it does not work, but nevertheless :)19:59
gotwigkelemengabor1: hm20:00
kelemengabor1these things: http://irclogs.ubuntu.com/2012/04/04/%23ubuntu-translators.html#t18:4020:00
gotwig??20:01
gotwigkelemengabor1: eh, so does your build work??20:02
kelemengabor1no, it doesn't, this is another problem20:02
gotwigkelemengabor1: which?20:02
gotwigduno :X?20:03
kelemengabor1the lens file20:03
kelemengabor1you do not install the translated one, but the old one20:03
gotwigkelemengabor1: so do you have a solution??20:03
gotwigI have to take the one from build, rightt?20:04
kelemengabor1I have no idea why the search itself does not work20:04
=== vibhav is now known as Guest6358
kelemengabor1yes20:04
gotwigkelemengabor1: maybe it has problems with communicating with the scopes... ? but I changed nothing there20:05
gotwigkelemengabor1: so what do I have to change now, to be on the same level as you?20:05
kelemengabor1um, I didn't changed anything, I'm just telling what to do :)20:07
kelemengabor1but this install problem is in the debian/*install file20:07
kelemengabor1cooking.lens /usr/share/unity/lenses/cooking20:09
kelemengabor1this line20:09
gotwigwhat with it20:10
kelemengabor1and of course you should be fixing the .mo files installation while you are there :)20:10
gotwigso  whats wrong in the install file20:11
kelemengabor1build/share/unity/lenses/cooking/cooking.lens /usr/share/unity/lenses/cooking20:11
kelemengabor1I think this should do it20:11
kelemengabor1and similarly with mo files20:12
kelemengabor1build/mo/* /usr/share/locale20:12
kelemengabor1gotta go, bye all!20:17
gotwighey21:42
gotwigPlease help me in translating my cooking lens & scopes in your native lanuage :-) https://translations.launchpad.net/lens-cooking/trunk21:42

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