Hello, thanks for long answer, but - Lazarus generate only .po file ( and .lrs in output directory). There is no .pot file.
T.E. úterý 19. června 2018, 13:37:14, napsal jste: > On 2018-06-19 13:09, Tomáš Emresz via Lazarus wrote: >> Hello, >> >> i have done generating .po files, could translate it through PoEdit, >> but - when i add some RS or component, Lazarus update only main .po >> file, not .cs.po etc. So could Lazarus update these files too, or is >> there any merge tool for this ? Of course, I understand, that I must >> translate this string after, but this time, I sync this files >> manually, which is bad. >> >> Any idea ? > I'll answer as translator, I do not yet know how Lazarus handles this. > The programmer should only change the .pot files. > There are other tools that propagate the changes in the .pot to the > .po files, which can be used by the programmer (in the Makefile) or > the translators, using "msgmerge". > For example, a translator could do: > msgmerge --previous --no-wrap --force-po \ > -U $POFILE -C ../memory.es.po $POTFILE > msgfmt --check --stat $POFILE > rm messages.mo > The translator has access to previous translations and memory files > to do fuzzy automatic translations which you probably as programmer can't. > The programmer could do: > msgmerge --previous --no-wrap --force-po -U $POFILE $POTFILE > msgfmt --check --stat $POFILE > rm messages.mo > Notice the missing memory file > (and repeat for each language) > A sample script as programmer, for all languages: > #!/bin/bash > for FILES in `ls *.po` ; > do > echo > echo $FILES > "-------------------------------------------------------------" > echo > F=`basename $FILES .po` > FF=`basename $F .es` > POFILE=$FF.es.po > POTFILE=../../00-pot/$FF.pot > if test -f $POFILE -a -f $POTFILE; then > echo Applying msgmerge to $POFILE > msgmerge --previous --no-wrap --force-po -U $POFILE $POTFILE > msgfmt --check --stat $POFILE > rm messages.mo > else > echo "Not found: " $POFILE or $POTFILE > fi || { echo "msgmerge --no-wrap --force-po for \"$POTFILE\" failed" ; } > done > Of course, you'd have to adapt paths to your situation. -- S pozdravem, Tomáš Emresz mailto:tomas.emr...@strankysnadno.cz -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus