Re: PO files headers and DL



Op So, 2011-12-11 om 10:57 +0100 skryf Daniel Mustieles García:
> 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).

This sounds like an interesting idea.

We need to realise that tools can wrap the lines in the path, and that a
simple grep might not work correctly. Something like this is possible:

msgstr ""
"..."
"X-Location: gnome-control-center/"
"help/\n"

So the script might need a bit more intelligence than simple grep.

Keep up the good work!
Friedel

-- 
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/firefox-maybe-now-most-popular-africa



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