[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[i18n][ French ] Trouble generating po files under win32

From: Julien Bidault <developper_at_jubijub.com>
Date: 2004-07-28 14:44:07 CEST

Hi,

As adviced in the previous mail from Ben Reser <ben@reser.org> , I did :
- read HACKING and TRANSLATING
- checked out subversion's trunk

--> If I got things propertly, I noticed that :
- svn is using GNU gettext for translation
- the build file at the project's root is supposed to build the relevant po file
itself

However, this only works if you are under a unix environment.

So I tryed, and here is what I got :
- a win32 port of gettext exists at : http://sourceforge.net/projects/gettext
- I tryed to isolate the command line used to build the PO file.
here it is :

locale-gnu-pot:
        (cd $(abs_srcdir)/subversion/ ; \
         find . \
          -name .svn -prune -or \
          -name tests -prune -or \
          -name bindings -prune -or \
          -name "*.c" -print -or \
          -name "svn_error_codes.h" -print | \
         $(XGETTEXT) --sort-by-file -k_ -kN_ -kSVN_ERRDEF:3 \
          --msgid-bugs-address=dev@subversion.tigris.org \
          --add-comments --files-from=- -o po/subversion.pot )

locale-gnu-po-update: locale-gnu-pot
        (cd $(abs_srcdir)/subversion/po ; \
         for i in *.po ; do \
           $(MSGMERGE) --sort-by-file --update $$i subversion.pot ; \
         done )

I'm not very familiar with unix env, but if I get it well, it says :
- switch to source_dir/subversion
- find in current directory : *.c files, and svn_error_codes.h file, and "pipe"
it to xgettext, with all its parameters.
---> I don't know what -prune is...I think it just defer matching files, but i'm
not sure at all.

hence I tryed to imitate that under win32, which was not easy.

I came with this command line :
dir /A:-D /b /s *.c svn_error_codes.h | xgettext --sort-b
y-file -k_ -kN_ -kSVN_ERRDEF:3 --msgid-bugs-address=dev@subversion.tigris.org --
add-comments --files-from=- -o po/subversion.pot

This actually creates the subversion.pot

After, a simple :
msginit --input subversion.pot

creates the fr.po file properly.

However, I think the file has a problem : (here's first page)

# French translations for PACKAGE package
# Traduction anglaise du package PACKAGE.
# Copyright (C) 2004 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# <EMAIL@ADDRESS>, 2004.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: dev@subversion.tigris.org\n"
"POT-Creation-Date: 2004-07-28 14:15+0200\n"
"PO-Revision-Date: 2004-07-28 14:18+0200\n"
"Last-Translator: <EMAIL@ADDRESS>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

# C:\checkout\subversion\clients\cmdline\blame-cmd.c:162
#, c-format
msgid "Skipping binary file: '%s'\n"
msgstr ""

# C:\checkout\subversion\clients\cmdline\checkout-cmd.c:126
#, c-format
msgid "'%s' does not appear to be a URL"
msgstr ""

# C:\checkout\subversion\clients\cmdline\delete-cmd.c:49
msgid "Use --force to override this restriction"
msgstr ""

# C:\checkout\subversion\clients\cmdline\diff-cmd.c:67
msgid "Can't open stdout"

------------> there are absolute path, and I think this is wrong...I don't know
how to get rid of them automatically,apart from a search c:\checkout\subversion
replace "" ...

Question : is this a side effect of the win port, or is there a command switch
to avoid that ? (path are \ instead of / too...)

Does this mean i'll have to reinstall linux ???

Julien

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 28 14:44:20 2004

This is an archived mail posted to the Subversion Dev mailing list.