[11:33] <phanimahesh> dpm: I have a problem with launchpad translations.
[11:33] <phanimahesh> have a few minutes to spare?
[11:33] <dpm> hi phanimahesh, sure
[11:34] <phanimahesh> It all started with our grand rename.
[11:34] <phanimahesh> mechanig was renamed to unity-tweak-tool
[11:34] <phanimahesh> and so in the next update, launchpad picked up the renamed translation template and added as a new one.
[11:35] <phanimahesh> the problem is, i essentially lost existing ones.
[11:35] <phanimahesh> and lp people say it is too late to correct it on launchpad.
[11:35] <phanimahesh> https://answers.launchpad.net/launchpad/+question/218839
[11:35] <phanimahesh> any ideas?
[11:36] <dpm> yes, but let me have a look first
[11:43] <dpm> phanimahesh, ok, so I think we'll go with what jtv is suggesting on his answer. The first step is to export those translations from Launchpad into your branch. Let me set that up in a minute.
[11:46] <phanimahesh> dpm: the files have to be moved anyway, so I got a tarball of the old template Now renaming the files and editing them to use the new domain, placing them in proper folders, pushing, allowing lp to update, then pushing updated pot.. will this sequence work?
[11:49] <dpm> Yeah, that'd work too. Note that you won't have to rename any files. The names of the PO files should stay the same. Just commit the PO files you've got in the template, push them and make sure that the POT template in the po/ folder you push.
[11:49] <dpm> is the correct one
[11:49] <dpm> i.e. unitytweak.pot
[11:50] <dpm> phanimahesh, ^
[11:50] <phanimahesh> so all po files stay the same, except that they are moved?
[11:50] <phanimahesh> and should the pot be the old one or can it be the new version?
[11:51] <phanimahesh> dpm, ^
[11:52] <dpm> phanimahesh, just make sure:
[11:52] <dpm> - All the po files are under the po/ folder, and that the POT file is in there too
[11:53] <dpm> - All the PO files are named according to $ISOCODE.po (or in some cases $ISOCODE_COUNTRY.po), e.g. en_GB.po, it.po, ca.po, de.po, etc
[11:54] <phanimahesh> okay. they are currently mechanig_ISOCODE.po
[11:54] <phanimahesh> so that means I'll have to rename.
[11:54] <phanimahesh> stripping out mechanig
[11:54] <dpm> ah, yeah, in that case you'll need to rename them, exactly
[11:54] <dpm> And finally,
[11:55] <phanimahesh> and the pot can be the updated unitytweak.pot
[11:55] <dpm> - It does not matter which version of the POT file you've got in there. You can update it any time and Launchpad will pick up the changes. Simply update the POT file with 'python setup.py build_i18n', commit and push
[11:56] <phanimahesh> sure. thanks. btw, the distutilsextra branch is waiting to be merged. thanks for reminding me.
[13:05] <phanimahesh> dpm Thanks, that worked, except that lp needs me to set language code and template for each imported po file. Thats much much easier than manual merging. :D
[13:06] <dpm> phanimahesh, that might have been because LP still got confused by the 2 templates. You shouldn't have to do this anymore (i.e. manually setting the code)
[13:08] <phanimahesh> yup. you saved me. thanks.
[13:29] <dpm> phanimahesh, when Launchpad has finished importing all translations into the unitytweak template, I'd recommend the following:
[13:29] <dpm> 1. Go to https://translations.launchpad.net/unity-tweak-tool/trunk/+translations-settings
[13:30] <dpm> 2. Set the import settings to "Import template files"
[13:31] <phanimahesh> Thanks. I'll change it once lp is done importing.
[13:31] <dpm> 3. Set up translation exports: On the "Export translations to branch" section, click on the "Choose a target branch" link and set the export branch to be the same as the import branch
[13:32] <dpm> this way you'll have translations fully automated, and the only thing you'll have to worry about is to update and commit the POT file from time to time
[13:32] <dpm> that is, whenever you think new strings are ready to translate
[13:32] <phanimahesh> dpm: won't the translations be overwritten every update?
[13:33] <phanimahesh> lp updates from the git repo every 5 hours.
[13:33] <dpm> phanimahesh, ah, I thought the branch you used for translations was a different one from the one auto-imported from git?
[13:34] <phanimahesh> nope. so I'll set up a different branch to push the translations to.
[13:34] <dpm> in that case, I'd recommend simply setting the auto-export to a different bzr branch, and then manually merge the bzr branch with the fresh translations to github
[13:35] <dpm> you can leave the import branch as it is in the export settings
[13:35] <dpm> sorry, mistake: you can leave the import branch as it is in the *import* settings
[13:37] <phanimahesh> okay. will make the changes now.
[13:42] <dpm> super
[13:45] <phanimahesh> just figured out why lp got confused. I spelled it wrong in my loop. all files have wrong name. thankfully suffixes (lang codes) are preserved. result : automated work became manual.
[13:46] <phanimahesh> I feel like an idiot now. :/
[15:48] <dpm> phanimahesh, argh, sorry to hear that. Is everything sorted now?
[16:10] <phanimahesh> dpm: Yup. everything is sorted. I dont have port 22 open from here, so will have to create the export branch tomorrow when I go to the institute area. except that, everything is sorted.
[22:34] <aky> anyone?