Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Translators

Re: Empty translations/plurals...

 

 

MythTV translators RSS feed   Index | Next | Previous | View Threaded


ikke at iki

Apr 11, 2012, 10:14 PM

Post #1 of 5 (1432 views)
Permalink
Re: Empty translations/plurals...

On Thu, Apr 12, 2012 at 3:38 AM, Nicolas Riendeau <nriendeau [at] mythtv> wrote:
> grep -C3 'translation></translation' *_fi.ts
> grep -C3 '<numerusform></numerusform>' *_fi.ts

Thanks. O'h, I used grep to do it. I used similar than that, but you
need to escape '/' sign.

I was thinking I could anyway share some useful commands on the wiki
page for translation. I used some of these heavily while doing
translations, I'll CC the translation list in case it would be useful
for someone else too:


#to start the job:
git branch finnish
find . -name '*_fi.ts' | while read name ; do pushd `dirname $name` ;
lupdate absolute translate.pro; popd; done

# I open all files just to get all strings into suggestion box
find . -name '*_fi.ts' | xargs linguist

# do updates, and to fix things you mentioned
# those files can be edited rather fast with vim keybindings
find . -name '*_fi.ts' | xargs grep 'numerusform><\/numerusform>'
find . -name '*_fi.ts' | xargs grep 'translation><\/translation>'

# Update stuff which was committed to master in between
# probably could have done with less commands, I don't use git that much...
git checkout master
git pull
git checkokut finnish
git merge master

# Update again the translations
find . -name '*_fi.ts' | while read name ; do pushd `dirname $name` ;
lupdate absolute translate.pro; popd; done

# after done editing, release the stuff into .qm files
find . -name '*_fi.ts' | while read name ; do pushd `dirname $name` ;
lrelease translate.pro; popd; done

# and clean up the codeline references to keep patch clean
# IMO this should be required, it easens finding the real changes in diffs
# and in case there would be someone reviewing the changes, it is better to
# do this way...
find . -name '*_fi.ts' | while read name ; do pushd `dirname $name` ;
lupdate none translate.pro; popd; done

# and for the patch I merge stuff back to master, not really needed
find . -name '*_fi.ts' | xargs git commit -m "Finnish translations"
git checkout master
git pull finnish

# and finally do the patch
find . -name '*_fi.ts' | xargs git diff origin/master >finnish-25.patch

I rewrote the commands into mail, there might be something I missed or
typoed, but hopefully not too much :)

BR,

ikke
_______________________________________________
Mythtv-translators mailing list
Mythtv-translators [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-translators


knight at teksavvy

Apr 11, 2012, 11:39 PM

Post #2 of 5 (1354 views)
Permalink
Re: Empty translations/plurals... [In reply to]

Hi,

On 4/12/2012 1:14 AM, ikke wrote:
>> grep -C3 'translation></translation' *_fi.ts
>> grep -C3 '<numerusform></numerusform>' *_fi.ts
>
> Thanks. O'h, I used grep to do it. I used similar than that, but you
> need to escape '/' sign.

No you don't, those commands work as-is...

>
> I was thinking I could anyway share some useful commands on the wiki
> page for translation. I used some of these heavily while doing
> translations, I'll CC the translation list in case it would be useful
> for someone else too:

It might have been nice to ask me before doing so, if I had wanted to
have a reply to one of my emails sent to the list I would have sent it
to the list myself... I didn't consider those greps to be ready for
public consumption yet (especially the second one which is mine, the
first is from Kenni).

Bah, what's done is done..

> #to start the job:
> git branch finnish

<snip>

> # Update stuff which was committed to master in between
> # probably could have done with less commands, I don't use git that much...

But you create yourself local branches? (-;

> git checkout master
> git pull
> git checkokut finnish

checkout...

> # and clean up the codeline references to keep patch clean
> # IMO this should be required, it easens finding the real changes in diffs
> # and in case there would be someone reviewing the changes, it is better to
> # do this way...

We (Kenni and I) actually prefer to keep those in (even if means a lot
of line where the only chage are line number changes)...

This point will, eventually, become moot but what's in the wiki right
now as far as lupdate argument is what we want people to use...

> I rewrote the commands into mail, there might be something I missed or
> typoed, but hopefully not too much :)

Thanks, your script had a lot of interesting ideas in it... I wouldn't
recommend everybody to do as you did but it was quite an interesting read...

Have a nice day,

Nicolas
_______________________________________________
Mythtv-translators mailing list
Mythtv-translators [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-translators


knight at teksavvy

Apr 12, 2012, 12:14 AM

Post #3 of 5 (1357 views)
Permalink
Re: Empty translations/plurals... [In reply to]

By the way, I am working on a program to dig those up (among other things).

Have a nice day!

Nicolas
_______________________________________________
Mythtv-translators mailing list
Mythtv-translators [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-translators


ikke at iki

Apr 12, 2012, 1:02 AM

Post #4 of 5 (1360 views)
Permalink
Re: Empty translations/plurals... [In reply to]

On Thu, Apr 12, 2012 at 9:39 AM, Nicolas Riendeau <knight [at] teksavvy> wrote:
> No you don't, those commands work as-is...

ok, my bad, I had originally problems when I didn't escape them in my
greps, I didn't try yours since I had already done the job. Perhaps
different grep version.

> It might have been nice to ask me before doing so, if I had wanted to have a
> reply to one of my emails sent to the list I would have sent it to the list
> myself... I didn't consider those greps to be ready for public consumption
> yet (especially the second one which is mine, the first is from Kenni).

Sorry about that. I started replying to you only but after writing all
the commands there in the hurry I just thought to CC the list at the
end. I forgot to be polite there, I apologise. I should have also
changed the topic to something like "command examples while doing the
translations" so someone would find it while looking for help, but
well, too late.

> We (Kenni and I) actually prefer to keep those in (even if means a lot of
> line where the only chage are line number changes)...
>
> This point will, eventually, become moot but what's in the wiki right now as
> far as lupdate argument is what we want people to use...

Ok, matter of taste, either way works. It is a personal preference,
I'll not argue. Good that you pointed it out, so people will not get
misguided by me.

> Thanks, your script had a lot of interesting ideas in it... I wouldn't
> recommend everybody to do as you did but it was quite an interesting read...

I agree, everyone works the way they are most productive, and I wanted
to share my method in hopes that someone starting translations could
find any piece of it useful.

BR,

-i
_______________________________________________
Mythtv-translators mailing list
Mythtv-translators [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-translators


ikke at iki

Apr 12, 2012, 1:42 AM

Post #5 of 5 (1355 views)
Permalink
Re: Empty translations/plurals... [In reply to]

On Thu, Apr 12, 2012 at 8:14 AM, ikke <ikke [at] iki> wrote:
> # Update stuff which was committed to master in between
> # probably could have done with less commands, I don't use git that much...
> git checkout master
> git pull
> git checkokut finnish
> git merge master


For the sake of completeness, the above one should've been done using
only git rebase instead, it seems...
_______________________________________________
Mythtv-translators mailing list
Mythtv-translators [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-translators

MythTV translators RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.