Bug#599179: po4a: --rm-translations also updates PO/POT files

2017-04-03 Thread Martin Quinson
tag 599179 fixed-upstream
tag 599179 pending
thanks

Hello,

I just added a flag --no-update to the upstream version (not released
yet). I think that this fixes the issue.

I fully agree with Denis that this option is rather dangerous and that
it will probably be misused by some people. But at the same time,
that's not a reason to deprivate cleaver people from the right tool ;)

Bye, Mt.

-- 
Each language has its purpose, however humble.  
Each language expresses the Yin and Yang of Software.
Each language has its place within the Tao.
But do not program in PHP if you can avoid it.
-- The Tao of Programming


signature.asc
Description: PGP signature


Bug#599179: po4a: --rm-translations also updates PO/POT files

2010-11-04 Thread Colin Watson
On Wed, Nov 03, 2010 at 08:40:23PM +0100, Denis Barbier wrote:
 On 2010/11/3 Colin Watson wrote:
  The other thing that may help would be if I made sure to build anything
  that uses po4a out-of-tree, so that any translated files are only
  changed in the separate build directory which is then thrown away.
 
 Right, IMO this is the best option.  If it does not work, please file
 another bug report, I am definitely willing to support out-of-tree
 builds.

Done, #602387.

Thanks,

-- 
Colin Watson   [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#599179: po4a: --rm-translations also updates PO/POT files

2010-11-03 Thread Denis Barbier
On 2010/10/5 Colin Watson wrote:
 On Tue, Oct 05, 2010 at 11:39:20AM +0100, Colin Watson wrote:
 If a master document is more recent than the POT, calling 'po4a
 --rm-translations' will have the side-effect of updating it and the PO
 files based on it.  This is annoying because it makes it difficult to
 write a minimal patch for a Debian package that uses po4a upstream; the
 clean rule can end up changing source files, which is normally
 undesirable.

 Could you please either make --rm-translations do nothing except
 removing the translated files, or else add an option to inhibit updating
 the PO/POT files?

 In fact, ordinary calls to 'po4a' to generate translations (which I do
 during 'make') also involve updating the PO/POT files.  I've had to do
 this in the man-db packaging:

 override_dh_auto_build:
        set -e; for preserve in man/po4a/po/*.pot man/po4a/po/*.po; do \
                [ ! -e $$preserve.safe ] || continue; \
                cp -a $$preserve $$preserve.safe; \
        done
        dh_auto_build

 override_dh_auto_clean:
        dh_auto_clean
        set -e; for preserve in man/po4a/po/*.pot man/po4a/po/*.po; do \
                [ -e $$preserve.safe ] || continue; \
                mv $$preserve.safe $$preserve; \
        done

 This is really pretty ugly, though.  GNU gettext only updates these
 files on explicit request or when you say 'make dist', which I think is
 much better behaviour.

Hello Colin,

To be honest in our SVN trunk I already removed the
--no-backups/--rm-backups flags (backup files are no more generated)
and am inclined to also remove --rm-translations.
These options do more harm than good, and I would much prefer if
people do not run po4a to clean up generated files.  Also your
man/Rules.man file contains
  distclean-hook:
@if [ x$(PO4A_LINGUA) = xyes ]; then \
-rm -rf man1 man5 man8; \
fi
Thus I wonder why you need to remove files generated by po4a, aren't
they already removed by 'debian/rules clean'?

Denis



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#599179: po4a: --rm-translations also updates PO/POT files

2010-11-03 Thread Colin Watson
On Wed, Nov 03, 2010 at 05:33:42PM +0100, Denis Barbier wrote:
 To be honest in our SVN trunk I already removed the
 --no-backups/--rm-backups flags (backup files are no more generated)
 and am inclined to also remove --rm-translations.
 These options do more harm than good, and I would much prefer if
 people do not run po4a to clean up generated files.

I'm not sure I agree.  If I kept both the PO file and the generated
translation file in revision control, I suspect that I would get
confused translators sending me patches to the wrong files.  I have to
deal with confused translators quite enough already ...

I like the idea of the option, and was hoping that it could be made to
work cleanly.

 Also your man/Rules.man file contains
   distclean-hook:
 @if [ x$(PO4A_LINGUA) = xyes ]; then \
 -rm -rf man1 man5 man8; \
 fi
 Thus I wonder why you need to remove files generated by po4a, aren't
 they already removed by 'debian/rules clean'?

Good question.  I added both that and the 'po4a --rm-translations' bit
in the same commit, so it may just have been confusion on my part.
Thanks for spotting that.

The other thing that may help would be if I made sure to build anything
that uses po4a out-of-tree, so that any translated files are only
changed in the separate build directory which is then thrown away.

-- 
Colin Watson   [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#599179: po4a: --rm-translations also updates PO/POT files

2010-11-03 Thread Denis Barbier
On 2010/11/3 Colin Watson wrote:
[...]
 The other thing that may help would be if I made sure to build anything
 that uses po4a out-of-tree, so that any translated files are only
 changed in the separate build directory which is then thrown away.

Right, IMO this is the best option.  If it does not work, please file
another bug report, I am definitely willing to support out-of-tree
builds.

Denis



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#599179: po4a: --rm-translations also updates PO/POT files

2010-10-05 Thread Colin Watson
Package: po4a
Version: 0.40.1-1
Severity: normal

If a master document is more recent than the POT, calling 'po4a
--rm-translations' will have the side-effect of updating it and the PO
files based on it.  This is annoying because it makes it difficult to
write a minimal patch for a Debian package that uses po4a upstream; the
clean rule can end up changing source files, which is normally
undesirable.

Could you please either make --rm-translations do nothing except
removing the translated files, or else add an option to inhibit updating
the PO/POT files?

Thanks,

-- 
Colin Watson   [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#599179: po4a: --rm-translations also updates PO/POT files

2010-10-05 Thread Colin Watson
On Tue, Oct 05, 2010 at 11:39:20AM +0100, Colin Watson wrote:
 If a master document is more recent than the POT, calling 'po4a
 --rm-translations' will have the side-effect of updating it and the PO
 files based on it.  This is annoying because it makes it difficult to
 write a minimal patch for a Debian package that uses po4a upstream; the
 clean rule can end up changing source files, which is normally
 undesirable.
 
 Could you please either make --rm-translations do nothing except
 removing the translated files, or else add an option to inhibit updating
 the PO/POT files?

In fact, ordinary calls to 'po4a' to generate translations (which I do
during 'make') also involve updating the PO/POT files.  I've had to do
this in the man-db packaging:

override_dh_auto_build:
set -e; for preserve in man/po4a/po/*.pot man/po4a/po/*.po; do \
[ ! -e $$preserve.safe ] || continue; \
cp -a $$preserve $$preserve.safe; \
done
dh_auto_build

override_dh_auto_clean:
dh_auto_clean
set -e; for preserve in man/po4a/po/*.pot man/po4a/po/*.po; do \
[ -e $$preserve.safe ] || continue; \
mv $$preserve.safe $$preserve; \
done

This is really pretty ugly, though.  GNU gettext only updates these
files on explicit request or when you say 'make dist', which I think is
much better behaviour.

-- 
Colin Watson   [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org