Re: PO files headers and DL





2011/12/12 Matej Urban <matej urban gmail com>
Well,

looking at other projects there are at least three logical solutions that some project use and do not complicate the system.
- first is creating different po-folders for extra translations, like /po, /po-lalala, /po-help with xx.po files
- second is keeping the current path of /po, but renaming the files like xx.po, xx.properties.po, xx.help.po ...
- third is creating language folder (twoletter code) like /po/xx/files like properties.po, ui.po, help.po whatever.po

The path should be "guessable".
I case of "locator" I already feel, there will be problems, because the commiter is not in control.

The problem is that DL renames po files, and I have to analyze and «change»  them to know where I have to copy the file. Changing folders names or its structure doesn't solve the problem.

This script is very useful when you have to commit a lot of files you've translated, so you are the commiter. If there are several translators, but just one commiter, script doesn't works, but my idea is, if this script is useful for many translation temas/corrdinators, port it to GTK, adding some features, and this could be a great one.

I still think that changing all modules structure is being near impossible... I like Jorge's idea, since it wolud be easy to parse, and it may be easy to maintain

M!


2011/12/11 Daniel Mustieles García <daniel mustieles gmail com>
I agree with Matei: the bes solution would be if GUI files were always in PO filder, and documentation files were in HELP folder, but there are some incoveniences for it.
First of all, there isn't a written rule saying where PO files mus be. Each developer chooses their location, and especifies it in makefile or configure.in files, so It will be difficult to change all modules.
In the other hand, there are several modules with special cases: gtk has po and po-properties folders; gimp-help has several folders with po files with different names (appendix.po, render.po, etc).
Also, note that rules about po files in forlder can change (today, help folder is a good idea to keep documentation, but tomowwor it may change), but PO files are not expected to change their format.
Having an X-Location header in a po file, allows me doing a loop like this:

for file in $translations_to_commit
do
    PO_LOCATION=`grep X-Location $i ...` #Here I could use sed to get a clean path
    cp $file $PO_LOCATION
    ....
done

This is a very simple and safe loop (there is no possibility to copy a po file in a wrong location).
Since changing all existing modules is a hard task, I vote for my idea to help translators to commit files into git. I think that, on today, this is the best and less painful solution to automate some translator tasks.
Cheers!



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