Re: CVS modules for translations



Here is the script I use for this (I'm no bash master, but who cares ;-). It 
handles a single file only though :-(

Possibly interesting part is the generating the cvs info from the PO file name 
as downloaded from GTP stat page.

Hope it helps a bit.

Stanislav

BTW, Happy New Year :-)

Dňa Nedeľa 28 December 2003 11:43 Metin Amiroff napísal:
> Folks, I have another idea.
> What if instead of messing with CVS and changing the way it works we
> create a simple python script that does bulk committing?
> I just was thinking about this for 5-10 minutes and got this idea.
> Would be glad to hear your comments on this. Here I assume that we are
> translating HEAD, we are getting po files from the status pages where
> they are updated very frequently, and that we are NOT adding new
>
> translations-just updating them.
> Here is my scenarion:
>
> Say I want to translate some Desktop group apps so I go to
> http://developer.gnome.org/projects/gtp/status/gnome-2.6/az/desktop/index.h
>t ml
> and get all (or needed) files from there.
> Now I have a local directory such as /home/metin/translations/desktop
> with files named (will write only four of them to be short):
>
> /home/metin/translations/desktop/
>                     //                        acme.HEAD.az.po
>                    //                         bug-buddy.HEAD.az.po
>                    //                         eel.HEAD.az.po
>                   //                          eog.HEAD.az.po
>                  ...                                  ...
>
> Now I edit them and it's time to commit changes back.
> So I execute script with something like:
>
> commitcsript --path=/home/metin/translations/desktop
> --logmessage='ChangeLog message goes here'
>
> Our commitscript goes to provided directory, parses it, gets all filenames
> inside that dir and does this:
>
> ---------------------------------------------
>
> 1- Look for all files which end with .po (if there aren't any, give
> friendly error)
> 2- Next check the suffix (in this case: "az") and remember this (this can
> also be harcoded into the script)
>
>  BEGIN LOOP UNTIL ALL PO FILES ARE DONE
>   a- Read file name before first dot (actually module name)
>   b- Do cvs -z3 co file_name/po/remembered_earlier_suffix.po
>         cvs -z3 co file_name/po/ChangeLog
>   c- Get my modified version from provided dir, rename it on the fly to
> suffix.po and copy that over just checked out version
>   d- Modify ChangeLog with provided changelog entry (see execution line
> above)
>   e- Commit all (in this case 2 files)
>   f- Give message that file_name (in this case module name) has been
> updated successfully
>  END LOOP
>
> 3- Give some statistics about things
>
> ---------------------------------------------
>
> And we are done! Of course the script can do the syntax control stuff too
> but I just wrote down the most important aspects.
> I might forget something here, if so, please correct me. Actually I could
> write
> more scenarios and thoughts but I urgently need some sleep :p
>
> Cheers
>
> Metin Amiroff
> Azerbaijani Team
>
>
> _______________________________________________
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> http://lists.gnome.org/mailman/listinfo/gnome-i18n

commit-gnome



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]