Re: CVS modules for translations

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
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):

                 ...                                  ...

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
2- Next check the suffix (in this case: "az") and remember this (this can
also be harcoded into the script)

  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
  e- Commit all (in this case 2 files)
  f- Give message that file_name (in this case module name) has been updated

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
more scenarios and thoughts but I urgently need some sleep :p


Metin Amiroff
Azerbaijani Team

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