mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
consider comments in python plugin translations
git-svn-id: http://svn.osgeo.org/qgis/trunk@10651 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
9f919cfda7
commit
0b1dfd0b8c
@ -27,7 +27,16 @@ foreach my $context ( @{ $xml->{context} } ) {
|
||||
$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
|
||||
|
Loading…
x
Reference in New Issue
Block a user