Skip to content
Permalink
Browse files

consider comments in python plugin translations

git-svn-id: http://svn.osgeo.org/qgis/trunk@10651 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Apr 24, 2009
1 parent 9f919cf commit 0b1dfd0b8cd81ea7998524e84a7de3528578b77a
Showing with 11 additions and 3 deletions.
  1. +10 −1 scripts/ts2cpp.pl
  2. +1 −2 scripts/update_ts_files.sh
@@ -27,7 +27,16 @@
$message->{source}->[0] =~ s/"/\\"/g;
$message->{source}->[0] =~ s/\n/\\n/g;

print F "translate( \"$context->{name}->[0]\", \"$message->{source}->[0]\");\n";
print F "translate( \"$context->{name}->[0]\", \"$message->{source}->[0]\"";

if( exists $message->{comment} && $message->{comment}->[0] ne "") {
$message->{comment}->[0] =~ s/"/\\"/g;
$message->{comment}->[0] =~ s/\n/\\n/g;

print F ",\"$context->{comment}->[0]\"";
}

print F ");\n";
}
}

@@ -15,11 +15,10 @@ echo Creating qt_ts.tar
tar -cvf i18n/qt_ts.tar i18n/qt_*.ts
rm i18n/qt_*.ts
echo Updating python plugin translations
P=$PWD
for i in python/plugins/*/.; do
cd $i
pylupdate4 $(find . -name "*.py") -ts i18n.ts
perl $P/scripts/ts2cpp.pl i18n.ts i18n.cpp
perl ../../../scripts/ts2cpp.pl i18n.ts i18n.cpp
rm i18n.ts
cd ../../..
done

0 comments on commit 0b1dfd0

Please sign in to comment.
You can’t perform that action at this time.