Closed GoogleCodeExporter closed 9 years ago
I think that this can be fixed in AbstractGettextTask.getParentPath().
Currently, it
won't generate paths starting with ../, because it only checks the case where
location is a subdirectory of parent. I may prepare a patch for this, as the
project
where I'd like to use gettext-ant-tasks does have most sources under
../some_dir.
Original comment by msmak...@gmail.com
on 28 Jan 2009 at 10:27
The attached patch fixes this problem for me.
Original comment by msmak...@gmail.com
on 28 Jan 2009 at 11:41
Attachments:
I would like to replace some ugly exec magic with gettext-ant-tasks in a
project, but
I consider this issue as a showstopper (a privacy violation of developers who
commit
changes to *.po files, because the *.po files would contain full pathnames of
their
file system). Can you please consider applying my patch and building a new
release?
Original comment by msmak...@gmail.com
on 16 Feb 2009 at 8:23
Yes, I was planning on fixing that, but didn't get to it yet. I hope I'll be
able to commit a fix next week. Would
you also need the repository to be updated or can you build from the sources?
Original comment by berge...@gmail.com
on 16 Feb 2009 at 9:31
msmakela, I just saw, you're mentioning the gettext-ant-tasks in your comment.
In that library, relative paths
are already handled correctly. The issue here is for the maven plugins.
Original comment by berge...@gmail.com
on 16 Feb 2009 at 10:07
Sorry bergerfx, but I assumed that maven is based on the same code as
gettext-ant-tasks. I am hitting this problem with gettext-ant-tasks-0.9.4.jar,
and
issue9.patch of comment 2 fixes it for me. The symptom is that the *.po files
will
contain absolute paths in the lines starting with "#: ". With the patch, they
will
contain proper relative paths starting with "../".
Maybe you have only tested the case when gettext-ant-tasks is invoked on a
subdirectory of the master source tree. Then you can form a relative path by
just
discarding the common prefix of the absolute pathname, like 0.9.4 does. In the
project where I would like to use gettext-ant-tasks, the i18n directory is a
sibling
of the main source tree, and the relative path should start with "../".
Marko
Original comment by msmak...@gmail.com
on 16 Feb 2009 at 10:38
A fix for the gettext-ant-tasks with test cases has been committed to svn, to
implement relative paths in different folders.
Original comment by berge...@gmail.com
on 2 Mar 2009 at 4:00
Thanks, the fix works for me. I am looking forward to
gettext-ant-tasks-0.9.6.jar
being released.
Original comment by msmak...@gmail.com
on 3 Mar 2009 at 10:51
Version 0.9.6 of gettext-ant-tasks has just been released.
Original comment by berge...@gmail.com
on 3 Mar 2009 at 3:30
The patch has a bug. If you have a root dir ./abc-abc and a file list directory
like
../abc-def it cuts the location of ../abc-def in the temporary file list to
../def,
because it dosen't care if the part is a complete directory name or just a part
of
it.
I'm working on a patch.
Original comment by s.daurer@googlemail.com
on 19 Mar 2009 at 9:42
This patch seems to work for me..
Original comment by s.daurer@googlemail.com
on 19 Mar 2009 at 10:03
Attachments:
I'm sorry, I uploaded the wrong file.
Here is the working one
Original comment by s.daurer@googlemail.com
on 19 Mar 2009 at 10:26
Attachments:
Hi, s.daurer,
thanks for your contribution!
if you want, you can run the patch against the test cases in:
http://code.google.com/p/gettext-commons/source/browse/gettext-ant-tasks/trunk/s
rc/test/java/org/xnap/commons/ant/gettext/GettextUtilsTest.java
I'll look at it, at this point it might also make sense to share code between
these
the ant tasks and the maven plugin. I will look into this as soon as I find
time.
Original comment by berge...@gmail.com
on 20 Mar 2009 at 1:33
s.daurer, I mistook your patch to be for the maven plugin since the title of
this
issue is still about that.
I committed a fix based on your patch and added test cases for it, one of which
is
still failing. Once that test case is covered too, I can put out another
release.
Original comment by berge...@gmail.com
on 23 Mar 2009 at 2:16
This is fixed now, the fix will be in the next release of gettext-ant-tasks.
Original comment by berge...@gmail.com
on 18 Dec 2009 at 4:53
Original issue reported on code.google.com by
steffen....@googlemail.com
on 22 Aug 2007 at 8:41