diff -Nru deepin-gettext-tools-1.0.6/debian/changelog deepin-gettext-tools-1.0.6/debian/changelog --- deepin-gettext-tools-1.0.6/debian/changelog 2017-08-01 00:02:02.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/changelog 2017-09-10 23:31:58.000000000 +0000 @@ -1,23 +1,5 @@ -deepin-gettext-tools (1.0.6) zesty; urgency=low +deepin-gettext-tools (1.0.6-1) artful; urgency=medium - * Autobuild Tag 1.0.6 + * Non-maintainer upload. - -- lilongyu Tue, 01 Aug 2017 08:01:46 +0800 - -deepin-gettext-tools (1.0.1-1) stable; urgency=low - - * Autobuild Tag 1.0.1 - - -- TagBuilder Fri, 14 Aug 2015 09:53:56 +0000 - -deepin-gettext-tools (1.0.0-1) stable; urgency=low - - * Autobuild Tag 1.0.0-1 - - -- TagBuilder Wed, 01 Jul 2015 08:11:33 +0000 - -deepin-gettext-tools (0.0.0) unstable; urgency=low - - * Unstable release. - - -- 宋文武 Thu, 18 Sep 2014 11:28:07 +0800 + -- lilongyu Mon, 11 Sep 2017 07:31:36 +0800 diff -Nru deepin-gettext-tools-1.0.6/debian/control deepin-gettext-tools-1.0.6/debian/control --- deepin-gettext-tools-1.0.6/debian/control 2017-08-01 00:01:05.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/control 2017-08-28 05:40:52.000000000 +0000 @@ -1,15 +1,25 @@ Source: deepin-gettext-tools Section: devel -Priority: extra -Build-Depends: debhelper (>= 9), - qt5-default, qt5-qmake, - libdouble-conversion-dev, - qtbase5-private-dev, - qtdeclarative5-private-dev -Standards-Version: 3.9.5 +Priority: optional +Build-Depends: + debhelper (>= 9), +Standards-Version: 4.0.0 Maintainer: Deepin Sysdev +Homepage: https://github.com/linuxdeepin/deepin-gettext-tools Package: deepin-gettext-tools -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python, python3, perl, perl-modules, libxml-libxml-perl, libxml-libxml-prettyprint-perl, libconfig-tiny-perl +Architecture: all +Depends: + gettext, + libconfig-tiny-perl, + libxml-libxml-perl, + perl, + python, + python3, + ${misc:Depends}, Description: Deepin Internationalization utilities + This package provides various tools used by Deepin software to extract + translatable string and manage i18n works as a supplement to regular gettext + tools. + . + This package is part of DDE (Deepin Desktop Environment). diff -Nru deepin-gettext-tools-1.0.6/debian/copyright deepin-gettext-tools-1.0.6/debian/copyright --- deepin-gettext-tools-1.0.6/debian/copyright 2017-08-01 00:01:05.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/copyright 2017-08-28 05:40:52.000000000 +0000 @@ -1,8 +1,35 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: deepin-gettext-tools Files: * -Copyright: 2015 Deepin Technology Co., Ltd. +Copyright: 2010-2017 Deepin Technology Co., Ltd. +License: GPL-3+ + +Files: debian/* +Copyright: 2010-2017 Deepin Technology Co., Ltd. + 2017, Boyuan Yang <073plan@gmail.com> +License: GPL-3+ + +Files: src/desktop_ts_convert.pl +Copyright: 2010-2017 Deepin Technology Co., Ltd. +License: GPL-3 + +License: GPL-3 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 3 as + published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + License: GPL-3+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru deepin-gettext-tools-1.0.6/debian/deepin-desktop-ts-convert.1 deepin-gettext-tools-1.0.6/debian/deepin-desktop-ts-convert.1 --- deepin-gettext-tools-1.0.6/debian/deepin-desktop-ts-convert.1 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/deepin-desktop-ts-convert.1 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1,103 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2017 Boyuan Yang <073plan@gmail.com>, +.\" +.TH "DEEPIN-DESKTOP-TS-CONVERT" "1" "2017-08-11" "Deepin Gettext Tools" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +deepin-desktop-ts-convert \- convert between .desktop file and .ts file to ease translation +.SH SYNOPSIS +.B deepin-desktop-ts-convert init +\fIdesktopFile outputTsDir\fR +.br +.B deepin-desktop-ts-convert desktop2ts +\fIdesktopFile outputTsDir\fR +.br +.B deepin-desktop-ts-convert ts2desktop +\fIdesktopFile tsDir outputDesktopFile\fR +.SH DESCRIPTION +This manual page documents briefly the +.B deepin-desktop-ts-convert +command as provided by +.B deepin-gettext-tools +package. +.PP +\fBdeepin-desktop-ts-convert\fP is a utility that helps developers convert +translatable strings in desktop files into ts files to ease translation +work. Translated strings in ts files can be merged back to original +desktop file too with the help of this utility. +.PP +Such workflow is adopted by most Deepin software. +.SH USAGE +.PP +To initialise conversion, use \fIdeepin-desktop-ts-convert init\fR subcommand. +In which case source ts file will be put into \fIoutputTsDir/desktop.ts\fR +and translation ts files should be named as \fIoutputTsDir/desktop_\.ts\fR. +.sp +.if n \{\ +.RS 4 +.\} +.nf +deepin-desktop-ts-convert init desktopFile outputTsDir +.fi +.if n \{\ +.RE +.\} +.PP +To update ts files from a new version of desktop file, use +\fIdeepin-desktop-ts-convert desktop2ts\fR subcommand. +The updated ts file given as outputTsDir/desktop.ts file. +.sp +.if n \{\ +.RS 4 +.\} +.nf +deepin-desktop-ts-convert desktop2ts desktopFile outputTsDir +.fi +.if n \{\ +.RE +.\} +.PP +To generate translated desktop files, use +\fIdeepin-desktop-ts-convert ts2desktop\fR subcommand. +.sp +.if n \{\ +.RS 4 +.\} +.nf +deepin-desktop-ts-convert ts2desktop desktopFile tsDir outputDesktopFile +.fi +.if n \{\ +.RE +.\} +.SH SEE ALSO +.PP +.BR deepin-update-pot (1), +.BR deepin-generate-mo (1), +.BR deepin-policy-ts-convert (1). +.PP +The programs are further documented in the +.IR README.md +as provided with this debian package under +.IR /usr/share/doc/deepin-gettext-tools/ +directory. +.SH AUTHOR +.PP +.B deepin-gettext-tools +is written by Deepin Technology Co., Ltd. +.PP +This manual page was written by +.MT 073plan@\:gmail.com +Boyuan Yang +.ME +for the Debian Project (but may be used by others). diff -Nru deepin-gettext-tools-1.0.6/debian/deepin-generate-mo.1 deepin-gettext-tools-1.0.6/debian/deepin-generate-mo.1 --- deepin-gettext-tools-1.0.6/debian/deepin-generate-mo.1 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/deepin-generate-mo.1 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1,65 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2017 Boyuan Yang <073plan@gmail.com>, +.\" +.TH "DEEPIN-GENERATE-MO" "1" "2017-08-11" "Deepin Gettext Tools" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +deepin-generate-mo \- generate mo file from po file using deepin ini config file +.SH SYNOPSIS +.B deepin-generate-mo +.RI [ \-h\ \-\-copy ] " inifile" +.SH DESCRIPTION +This manual page documents briefly the +.B deepin-generate-mo +command as provided by +.B deepin-gettext-tools +package. +.PP +\fBdeepin-generate-mo\fP is a utility that generate gettext MO files +from gettext PO files using instructions from certain ini config file. +.PP +Such workflow is adopted by most Deepin software. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For latest descriptions as provided by the tool, invoke the tool +with \fI\-h\fR option. +.TP +.B \-h, \-\-help +Show help messages and exit. +.TP +.B \-\-copy +Also execute commands similar to "sudo cp *.mo /usr/share/locale". +.SH SEE ALSO +.PP +.BR deepin-update-pot (1), +.BR deepin-desktop-ts-convert (1), +.BR deepin-policy-ts-convert (1). +.PP +The programs are further documented in the +.IR README.md +as provided with this debian package under +.IR /usr/share/doc/deepin-gettext-tools/ +directory. +.SH AUTHOR +.PP +.B deepin-gettext-tools +is written by Deepin Technology Co., Ltd. +.PP +This manual page was written by +.MT 073plan@\:gmail.com +Boyuan Yang +.ME +for the Debian Project (but may be used by others). diff -Nru deepin-gettext-tools-1.0.6/debian/deepin-gettext-tools.examples deepin-gettext-tools-1.0.6/debian/deepin-gettext-tools.examples --- deepin-gettext-tools-1.0.6/debian/deepin-gettext-tools.examples 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/deepin-gettext-tools.examples 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1 @@ +src/example_config.ini diff -Nru deepin-gettext-tools-1.0.6/debian/deepin-policy-ts-convert.1 deepin-gettext-tools-1.0.6/debian/deepin-policy-ts-convert.1 --- deepin-gettext-tools-1.0.6/debian/deepin-policy-ts-convert.1 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/deepin-policy-ts-convert.1 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1,64 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2017 Boyuan Yang <073plan@gmail.com>, +.\" +.TH "DEEPIN-POLICY-TS-CONVERT" "1" "2017-08-11" "Deepin Gettext Tools" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +deepin-policy-ts-convert \- convert between policykit XML file and ts file to ease translation +.SH SYNOPSIS +.B deepin-policy-ts-convert init +\fIpolicyFile outputTsDir\fR +.br +.B deepin-policy-ts-convert policy2ts +\fIpolicyFile outputTsDir\fR +.br +.B deepin-policy-ts-convert ts2policy +\fIpolicyFile tsDir outputPolicyFile\fR +.SH DESCRIPTION +This manual page documents briefly the +.B deepin-policy-ts-convert +command as provided by +.B deepin-gettext-tools +package. +.PP +\fBdeepin-policy-ts-convert\fP is a utility that helps developers convert +translatable strings in PolicyKit XML files into ts files to ease translation +work. Translated ts files can be merged back to original file too with the +help of this utility. +.PP +Such workflow is adopted by most Deepin software. +.SH USAGE +Using this tool is similar to using \fBdeepin-desktop-ts-convert\fR(1) as shown +in the SYNOPSIS section. +.SH SEE ALSO +.PP +.BR deepin-update-pot (1), +.BR deepin-generate-mo (1), +.BR deepin-desktop-ts-convert (1), +.PP +The programs are further documented in the +.IR README.md +as provided with this debian package under +.IR /usr/share/doc/deepin-gettext-tools/ +directory. +.SH AUTHOR +.PP +.B deepin-gettext-tools +is written by Deepin Technology Co., Ltd. +.PP +This manual page was written by +.MT 073plan@\:gmail.com +Boyuan Yang +.ME +for the Debian Project (but may be used by others). diff -Nru deepin-gettext-tools-1.0.6/debian/deepin-update-pot.1 deepin-gettext-tools-1.0.6/debian/deepin-update-pot.1 --- deepin-gettext-tools-1.0.6/debian/deepin-update-pot.1 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/deepin-update-pot.1 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1,62 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2017 Boyuan Yang <073plan@gmail.com>, +.\" +.TH "DEEPIN-UPDATE-POT" "1" "2017-08-11" "Deepin Gettext Tools" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +deepin-update-pot \- generate pot file according to given ini config file +.SH SYNOPSIS +.B deepin-update-pot +.RI [ \-h ] " inifile" +.SH DESCRIPTION +This manual page documents briefly the +.B deepin-update-pot +command as provided by +.B deepin-gettext-tools +package. +.PP +\fBdeepin-update-pot\fP is a utility that generate gettext POT template file +from source code files using instructions from certain ini config file. +.PP +Such workflow is adopted by most Deepin software. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For latest descriptions as provided by the tool, invoke the tool +with \fI\-h\fR option. +.TP +.B \-h, \-\-help +Show help messages and exit. +.SH SEE ALSO +.PP +.BR deepin-generate-mo (1), +.BR deepin-desktop-ts-convert (1), +.BR deepin-policy-ts-convert (1). +.PP +The programs are further documented in the +.IR README.md +as provided with this debian package under +.IR /usr/share/doc/deepin-gettext-tools/ +directory. +.SH AUTHOR +.PP +.B deepin-gettext-tools +is written by Deepin Technology Co., Ltd. +.PP +This manual page was written by +.MT 073plan@\:gmail.com +Boyuan Yang +.ME +for the Debian Project (but may be used by others). diff -Nru deepin-gettext-tools-1.0.6/debian/docs deepin-gettext-tools-1.0.6/debian/docs --- deepin-gettext-tools-1.0.6/debian/docs 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/docs 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1 @@ +README.md diff -Nru deepin-gettext-tools-1.0.6/debian/manpages deepin-gettext-tools-1.0.6/debian/manpages --- deepin-gettext-tools-1.0.6/debian/manpages 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/manpages 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1,4 @@ +debian/deepin-generate-mo.1 +debian/deepin-update-pot.1 +debian/deepin-desktop-ts-convert.1 +debian/deepin-policy-ts-convert.1 diff -Nru deepin-gettext-tools-1.0.6/debian/source/format deepin-gettext-tools-1.0.6/debian/source/format --- deepin-gettext-tools-1.0.6/debian/source/format 2017-08-01 00:01:05.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/source/format 2017-09-10 23:31:20.000000000 +0000 @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff -Nru deepin-gettext-tools-1.0.6/debian/watch deepin-gettext-tools-1.0.6/debian/watch --- deepin-gettext-tools-1.0.6/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ deepin-gettext-tools-1.0.6/debian/watch 2017-08-28 05:40:52.000000000 +0000 @@ -0,0 +1,4 @@ +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%deepin-gettext-tools-$1.tar.gz%" \ + https://github.com/linuxdeepin/deepin-gettext-tools/tags \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate diff -Nru deepin-gettext-tools-1.0.6/Makefile deepin-gettext-tools-1.0.6/Makefile --- deepin-gettext-tools-1.0.6/Makefile 2017-08-01 00:01:38.000000000 +0000 +++ deepin-gettext-tools-1.0.6/Makefile 2017-08-28 05:40:52.000000000 +0000 @@ -7,7 +7,6 @@ mkdir -pv ${DESTDIR}${PREFIX}/bin install -m755 src/generate_mo.py ${DESTDIR}${PREFIX}/lib/deepin-gettext-tools/ install -m755 src/update_pot.py ${DESTDIR}${PREFIX}/lib/deepin-gettext-tools/ - install -m644 src/blank.py ${DESTDIR}${PREFIX}/lib/deepin-gettext-tools/ ln -sf ${PREFIX}/lib/deepin-gettext-tools/generate_mo.py ${DESTDIR}${PREFIX}/bin/deepin-generate-mo ln -sf ${PREFIX}/lib/deepin-gettext-tools/update_pot.py ${DESTDIR}${PREFIX}/bin/deepin-update-pot install -m755 src/desktop_ts_convert.pl ${DESTDIR}${PREFIX}/bin/deepin-desktop-ts-convert diff -Nru deepin-gettext-tools-1.0.6/src/desktop_ts_convert.pl deepin-gettext-tools-1.0.6/src/desktop_ts_convert.pl --- deepin-gettext-tools-1.0.6/src/desktop_ts_convert.pl 2017-08-01 00:01:38.000000000 +0000 +++ deepin-gettext-tools-1.0.6/src/desktop_ts_convert.pl 2017-08-28 05:40:52.000000000 +0000 @@ -1,21 +1,24 @@ #!/usr/bin/env perl +# +# The desktop-ts-convert tool +# +# Copyright (C) 2017 Deepin.Inc +# +# desktop-ts-convert is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# version 3 published by the Free Software Foundation. +# + use warnings; use strict; use 5.018; use XML::LibXML; -use XML::LibXML::PrettyPrint; use Config::Tiny; use File::Basename qw(basename); use File::Path qw(make_path); my @localeKeys = qw(Name GenericName Comment Keywords); -my $xmlPP = XML::LibXML::PrettyPrint->new( - indent_string => ' 'x4, - element => { - preserves_whitespace => [qw(name source translation)], - }, -); MAIN: { my $cmd = shift @ARGV // ''; @@ -171,9 +174,6 @@ sub saveDocument { my ($dom, $file, $pretty) = @_; - if ( $pretty ) { - $xmlPP->pretty_print($dom); - } open FH, '>', $file or die "failed to open file $file for write: $!"; print FH $dom->toString; diff -Nru deepin-gettext-tools-1.0.6/src/policy_ts_convert.py deepin-gettext-tools-1.0.6/src/policy_ts_convert.py --- deepin-gettext-tools-1.0.6/src/policy_ts_convert.py 2017-08-01 00:01:38.000000000 +0000 +++ deepin-gettext-tools-1.0.6/src/policy_ts_convert.py 2017-08-28 05:40:52.000000000 +0000 @@ -1,4 +1,12 @@ #!/usr/bin/env python3 + +# Copyright (C) 2017 Deepin Technology Co., Ltd. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + import xml.etree.ElementTree as ET import sys import os