On 2011-04-20 03:20, Christian Lohmaier wrote:
Nice. Could we put an HTML page based on your awk script up to complement the raw data? This certainly makes finding and fixing the errors easy.Hi *, On Wed, Apr 20, 2011 at 2:15 AM, Christian Lohmaier <lohmaier+ooofuture@googlemail.com> wrote:[broken translations that break the build] So please fix those "Expected Symbol: Close tag for<tagname>" ones as fast as possible, and have Andras upload them, otherwise chances are that your language will just be skipped.For your convenience, I wrote a awk one-liner to turn the error-log into clickable URLs that will take you to the translation unit in question:
all in one single line - example for the fr.err log:
awk -F'\t' '$10!="en-US" { n=split($2, fp, /\\/); up=""; for (i=3;
i<n; ++i)( up=up "/" fp[i] ); if ($6 == "") su = ""; else su = "."
$6; print "https://translations.documentfoundation.org/" $10
"/libo34x_" $4 up ".po/translate/?sfields=locations&search=" $5 su}'
< fr.err
would result in
https://translations.documentfoundation.org/fr/libo34x_help/schart/01.po/translate/?sfields=locations&search=par_id7272255
https://translations.documentfoundation.org/fr/libo34x_help/schart/01.po/translate/?sfields=locations&search=par_id2259225
https://translations.documentfoundation.org/fr/libo34x_help/shared/01.po/translate/?sfields=locations&search=par_id31323250502
https://translations.documentfoundation.org/fr/libo34x_help/shared/00.po/translate/?sfields=locations&search=par_id355152952
https://translations.documentfoundation.org/fr/libo34x_help/shared/00.po/translate/?sfields=locations&search=par_id993155271
https://translations.documentfoundation.org/fr/libo34x_help/shared/00.po/translate/?sfields=locations&search=par_id993159201.14
https://translations.documentfoundation.org/fr/libo34x_help/shared/00.po/translate/?sfields=locations&search=par_id3149902.25
https://translations.documentfoundation.org/fr/libo34x_help/scalc/guide.po/translate/?sfields=locations&search=par_id3148576.19
https://translations.documentfoundation.org/fr/libo34x_help/sbasic/shared.po/translate/?sfields=locations&search=par_id3159084.88
https://translations.documentfoundation.org/fr/libo34x_help/sbasic/shared.po/translate/?sfields=locations&search=par_id3146806.89
https://translations.documentfoundation.org/fr/libo34x_help/sbasic/shared.po/translate/?sfields=locations&search=par_id3146130.90
https://translations.documentfoundation.org/fr/libo34x_help/sbasic/shared.po/translate/?sfields=locations&search=par_id31455974
the one-liner explained:
awk -F'\t'
tab is field seperator (I used awk, but of course you could do the
same with perl, sed,....)
'$10!="en-US"
we're not interested in the english original strings when creating the
URL, as the original string is displayed in pootle anyway (and the
10th field in the error-log is the language tag)
{ n=split($2, fp, /\\/); up=""; for (i=3; i<n; ++i)( up=up "/" fp[i] );
assemble the path of the file, i.e. turn
"source\text\schart\01\04050100.xhp" into "/schart/01" (.po is appended later)
if ($6 == "") su = ""; else su = "." $6;
when there is a "sub-unit" (no idea how else you call it - i.e. when
there is par_id<whatever>.<subunit>, also use it.
print "https://translations.documentfoundation.org/" $10 "/libo34x_"
$4 up ".po/translate/?sfields=locations&search=" $5 su}'
assemble& print the URL
https://translations.documentfoundation.org/<languagecode>/<project>/<filepath>/translate/?sfields=location&search=<paragraph-id>[<subunit>]
< fr.err
read the file "fr.err" as input
ciao
Christian
-- regards Dwayne -- Unsubscribe instructions: E-mail to l10n+help@libreoffice.org Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/www/l10n/ All messages sent to this list will be publicly archived and cannot be deleted