Git usage: rebase master on custom tag from upstream branch

2013-10-01 Thread Anton Balashov
Hello, mentors.

The issue:
I have created a git repo with master and upstream branches and use
git-buiuldpackage for build. And I like it, but...
How to switch my master on custom tag from upstream branch? I want to
start work under a new (or custom)  version. How to sync master
workspace with commit from upstream? And left the debian dir.
Of-course, I can backup debian dir and make a hard reset on the commit
from upstream, but it's a crooked nail.

There must be a normal solution and a documentation about that, but I
didn't find.

Thanks
Anton.



signature.asc
Description: OpenPGP digital signature


Re: Bug#722450: RFS: osmctools/0.1-1 [ITP] -- Some tools to manipulate OpenStreetMap files

2013-10-01 Thread Pierre Blanc
Hello,

I'm stuck.
How can I improve my packaging ?

Regards.

-- 
Cordialement,
Blanc Pierre


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOGTLeKUrgN7q-h=tMbQck+xfEZ+m9po5t04683si4dRk8O=9...@mail.gmail.com



Fw: Re: Bug#722450: RFS: osmctools/0.1-1 [ITP] -- Some tools to manipulate OpenStreetMap files

2013-10-01 Thread Wookey
This fellow is stuck, and I couldn't find the answer to his question
(at least not without checking out a git repo and furtling round
inside. The docs on the URL given are out of data point to svn.)

I _think_ he doesn't need to do anything to his own package, only
change stuff in the gis blend metapackage, but I'm not sure.

As you set him off on this I think you need to answer his question :-)

- Forwarded message from Pierre Blanc  -

Date: Fri, 13 Sep 2013 16:16:18 +0200
From: Pierre Blanc 
To: Andreas Tille 
Cc: debian-mentors@lists.debian.org, 722...@bugs.debian.org
Subject: Re: Bug#722450: RFS: osmctools/0.1-1 [ITP] -- Some tools to
manipulate OpenStreetMap files
List-Id: 
X-Spam-Status: No, score=-6.9 required=4.5 tests=BAYES_00,RCVD_IN_DNSWL_HI
autolearn=ham version=3.3.1

> Where these scripts are stored ? ^^

http://blends.alioth.debian.org/blends/ch-sentinel.en.html
Sorry for the noise

-- 
Cordialement,
Blanc Pierre


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caogtlek0dcmosakt1jeutk9k8hsov3ng33pya2+jack5b42...@mail.gmail.com


- End forwarded message -
Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131001122749.gj32...@stoneboat.aleph1.co.uk



Re: Git usage: rebase master on custom tag from upstream branch

2013-10-01 Thread Joachim Wiedorn
Anton Balashov wrote on 2013-10-01 12:49:

> How to switch my master on custom tag from upstream branch? I want to
> start work under a new (or custom)  version. How to sync master
> workspace with commit from upstream? And left the debian dir.
> Of-course, I can backup debian dir and make a hard reset on the commit
> from upstream, but it's a crooked nail.

I think you search for this command:

git-import-orig --upstream-version=1.3 --filter=debian/* package_upstream.tar.gz


---
Have a nice day.

Joachim (Germany)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131001195421.30020...@jupiter.home



Bug#725121: RFS: thuban/1.2.2-4

2013-10-01 Thread Bas Couwenberg
Package: sponsorship-requests
Severity: normal

Dear mentors,

I am looking for a sponsor for my package "thuban"

 Package name: thuban
 Version : 1.2.2-4
 Upstream Author : Thuban Project Team 
 URL : http://thuban.intevation.org/
 License : GPL-2.0+
 Section : graphics

It builds those binary packages:

 thuban - Interactive geographic data viewer
 thuban-doc - Interactive geographic data viewer - documentation

To access further information about this package, please visit the following 
URL:

http://mentors.debian.net/package/thuban


Alternatively, one can download the package with dget using this command:

  dget -x http://mentors.debian.net/debian/pool/main/t/thuban/thuban_1.2.2-4.dsc

More information about Thuban can be obtained from 
http://thuban.intevation.org/.

Changes since the last upload:

* Add myself to Uploaders.
* Bump dephelper compatibility to 9.
* Use canonical URLs for Vcs-* fields.
* Refresh patch and add headers for:
  - locale.patch
  - setup.patch
  - bitmappath.patch
  - wxpython.patch
  - gdal.patch
* Improve short description to not start with article.
* Use minimal dh rules with python2.
* Move documentation into its own thuban-doc package.
* List missing files after install.
* Update watch file, handle common mistakes.
* Update python build dependencies: remove python-support, replace python-dev
  with python-all-dev (>= 2.6.6-3~).
* Update files to install for thuban package.
* Update copyright file using copyright-format 1.0.
* Build depend on python-psycopg2 instead of its virtual package.
* Bump Standards-Version to 3.9.4, changes: minimal dh rules, Vcs-* fields,
  copyright.
* Convert thuban man page to Docbook XML.
* Add man page for create_epsg.


Regards,
 Sebastiaan Couwenberg


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20131001183729.18272.89197.report...@osiris.linuxminded.xs4all.nl



Re: Translate printf("Hallo")

2013-10-01 Thread Beco
On 29 September 2013 23:41, Beco  wrote:
> On 29 September 2013 23:35, Martin Eberhard Schauer wrote:
>>> Please, what would be the correct way to translate printf messages (in
>>> a C program) into some other languages?
>>
>> You will have to learn about gettext and prepare your program for it.


Hi guys,

Do gettext assume the original program is written in english?

I'm testing this example here:

http://oriya.sarovar.org/docs/gettext_single.html


What if my program source has messages in other language?

Example, I create this program:

> hallowelt.c <

#include 
#include 
#include 
#include 
int main(void)
{
  setlocale( LC_ALL, "" );
  bindtextdomain( "hallo", "~/tmp/locale" );
  textdomain( "hallo" );
  printf( gettext( "Hallo, welt!\n" ) );
  exit(0);
}

$gcc hallowelt.c -o hallowelt
and I got my binary:
> hallowelt <

$xgettext -d hallo -s -o hallowelt.pot hallowelt.c
and I got my template
> hallowelt.pot <

I created a "po" and edited it to have my translation TO ENGLISH.

$msginit -l en_US -o en_US-hallowelt.po -i hallowelt.pot

> en_US-hallowelt.po <

Compiled it
$msgfmt -c -v -o hallo.mo en_US-hallowelt.po
and got
> hallo.mo <

Now I moved it to the correct location.

$mv hallo.mo ~/tmp/locale/en/LC_MESSAGES

The problem now is that I can only run it in english!

How can I see it in the original form?


Thanks,
Beco.





-- 
Dr Beco
A.I. researcher

"Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CALuYw2yAx9CG6g=egqub8_9robe7cttlyt+ungw-nboj0kk...@mail.gmail.com



Bug#724924: marked as done (RFS: mapcache/1.2.0-1 [ITP])

2013-10-01 Thread Debian Bug Tracking System
Your message dated Tue, 01 Oct 2013 22:03:15 +0200
with message-id <524b2a83.7070...@xs4all.nl>
and subject line Re: RFS: mapcache/1.2.0-1 [ITP]
has caused the Debian Bug report #724924,
regarding RFS: mapcache/1.2.0-1 [ITP]
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
724924: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724924
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: sponsorship-requests
Severity: normal

Dear mentors,

I am looking for a sponsor for my package "mapcache"

 Package name: mapcache
 Version : 1.2.0-1
 Upstream Author : Thomas Bonfort and the MapServer team.
 URL : http://www.mapserver.org/en/mapcache/
 License : MIT/X11
 Section : devel

It builds those binary packages:

 libapache2-mod-mapcache - tile caching server - Apache module
 libmapcache1 - tile caching server - shared library
 libmapcache1-dev - tile caching server - shared library development files
 mapcache-cgi - tile caching server - CGI binary
 mapcache-tools - tile caching server - tools

To access further information about this package, please visit the following 
URL:

http://mentors.debian.net/package/mapcache


Alternatively, one can download the package with dget using this command:

  dget -x 
http://mentors.debian.net/debian/pool/main/m/mapcache/mapcache_1.2.0-1.dsc

More information about MapCache can be obtained from
http://www.mapserver.org/en/mapcache/.

Changes since the last upload:

  * New upstream release 1.2.0. (closes: #712377)
  * Update watch file for github releases.
  * Build system changed from autotools to cmake.
  * Drop patches:
- includepath.patch (no longer required)
- fixwithmapserv.patch (libtool no longer used)
- libmapcache_hardening.patch (libtool no longer used)
- demo_service_js_typos.patch (applied upstream)
- demo_service_valid_js_var.patch (applied upstream)
- demo_service_html5_doctype.patch (applied upstream)
- demo_service_html_charset.patch (applied upstream)
- demo_service_list_newlines.patch (applied upstream)
- demo_service_page_height.patch (applied upstream)
- demo_service_indenting.patch (applied upstream)
- mapcache_seed_non_zero_exit.patch (applied upstream)
- mapcache_seed_delete_mode.patch (applied upstream)
- mapcache_seed_typo.patch (applied upstream)
  * Use pkgkde-gensymbols & pkgkde-symbolshelper to handle symbols.
  * Add patch to use a versioned SONAME.
  * SONAME of libmapcache changed from libmapcache.so.0 to
libmapcache.so.1.
  * Update libmapcache symbols for 1.2.0 on amd64.
  * Enable verbose make output.
  * Call ldconfig in libmapcache postinst and postrm.
  * Update libmapserver dependency for MapServer 6.4.0.
  * Add patch to include mapserver cmake package.
  * Build-Depend on libtiff-dev for libtiff5 transition.

It also includes the changes for mapcache 1.0.0-3:

  * Strip RPATH from module and CGI binary.
  * Empty dependency_libs in la file.
  * Update copyright file to DEP-5 format.
  * Use set -e in postinst & postrm.
  * Additional cleanup of auto-generated files.
  * Multi-Arch libmapcache with debhelper 9.
  * Rename libmapcache to libmapcache0 to match SONAME.
  * Add libmapcache0-dev package.
  * Bump Standards-Version to 3.9.4.
  * Create /var/cache/mapcache in postinst.
  * Build-Depend on libproj-dev instead of the proj source package.
  * Drop explicit dependency on libmapcache0, already set by shlibs:Depends.
  * Enable hardening build flags.
  * Add man page for mapcache_seed utility.
  * Add patch to fix typos in demo service javascript.
  * Add patch to use a valid variable name for the WMSGetFeatureInfo control.
  * Add patch to set the HTML5 DOCTYPE in the demo service.
  * Add patch to set the Content-Type and charset in the HTML documents.
  * Add patch to add newlines after each list item.
  * Add patch to set the page height to 100% for the demo service.
  * Add patch to use 4 space indenting in the generated HTML.
  * Add patch to return non-zero exit status if errors occured in mapcache_seed.
  * Add patch to fix deletion of map tiles in seeder's delete mode.
  * Add patch to fix typos in mapcache_seed.
  * Add watch file.
  * Add maintainer scripts for libmapcache0 to call ldconfig.
  * Add mapcache.xml examples to libapache2-mod-mapcache.
  * Update for apache 2.4.


Regards,
 Sebastiaan Couwenberg
--- End Message ---
--- Begin Message ---
The upload of mapcache/1.2.0-1 was sponsored by Francesco Paolo
Lovergine. Many thanks!

Kind Regards,

Bas

-- 
GnuPG: 0xE88D4AF1 (new) / 0x77A975AD (old)-

Bug#721080: RFS: vpcs/0.5b0-1 [ITP]

2013-10-01 Thread Daniel Lintott
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Juhani,

I honestly wasn't aware that version of Debian exited, till you told
me! I have setup a virtual machine to test the software under
kFreeBSD, to ensure there are no obvious bugs...

At the moment I have found a bug and have contacted the upstream
author for advice, but thought I'd ask here as well in case you know
the answer.

At line 163 [1] hv.c calls openpty. This works fine on my main
computer, but under the kFreeBSD VM it fails with the following error:

Create pseudo-terminal: No child processes

Any ideas what the problem may be?

Regards,

Daniel Lintott

[1] https://github.com/dlintott/vpcs/blob/master/src/hv.c#L163

On 28/09/13 09:40, Juhani Numminen wrote:
> Fri, 27 Sep 2013 12:52:38 +0100 Daniel Lintott
>  kirjoitti:
> 
>> I managed to my own question in the end regarding DESTDIR, thanks
>> to the following post on the list 
>> http://lists.debian.org/debian-mentors/2011/03/msg00127.html
> 
> That’s good. I still see problems with the assumptions the build
> system has about the operating system. The source itself also needs
> patching if that platform is wanted to be supported.
> 
> Here are my changes to build on kfreebsd: * In d/rules, detect
> GNU/kFreeBSD and define macros GNUkFreeBSD and FreeBSD. * Add a
> patch to adjust a few lines if GNUkFreeBSD is defined.
> 
> I’ll attach a patch that can be applied to the git repository, so
> you can see the actual modifications.
> 
> Cheers, Juhani Numminen
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJSS0LXAAoJEMw/9yOWzAkJu5wH/3mdN6RPjMKG1SN2L/4ci727
wLyoea6nBTuZl2HsX/qexy+/6Cl8bjOIHDrGPBv44aITo1JCMR7taI0UkjN+ByRJ
Ci8h3jKYcrmGiU+KfOeVuwdVKRoXKzwHD4K35vKRUNqknbPzHZEuBOrZUxmP2RJ/
ly8zsuH/DOVqzO87y2xSVmbPLkWRjSCz5oTLYyHCTuQWKvosaThH6CDS+07i7XdK
vtEBjhKyQO4JV9zEMbWJzyWgYFgOfyKyp9Vkn9HCYAP33gTVXPZNLLhNPTWJeagc
uHyu1RNQ59JZWAgIMn0/taRTKeeLK2krgvRWoXbUisfh8ZjX9/LQb9/lmtuxSao=
=SNWC
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/524b42d7.6050...@serverb.co.uk



Re: Translate printf("Hallo")

2013-10-01 Thread Boris Pek
Hi,

> Now I moved it to the correct location.
>
> $mv hallo.mo ~/tmp/locale/en/LC_MESSAGES
>
> The problem now is that I can only run it in english!

$ env | grep LANG
$ env | grep LC_

And search in google (or etc.) these environmental variables.

> How can I see it in the original form?

Try something like this:
$ LC_ALL=C hallowelt
or this:
$ export LC_ALL=C
$ hallowelt

Best wishes,
Boris


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/151831380665...@web25m.yandex.ru



Re: dh_make and $DEBEMAIL

2013-10-01 Thread Craig Small
On Sat, Sep 28, 2013 at 12:42:02AM -0300, Beco wrote:
>  Its said in the man page that dh_make would use my $DEBEMAIL, but the
>  email I see is another one (I suppose composed of login @ host-name ).
dh_make tries lots of things to get the right email address which is
why you are seeing that email. As you know now, setting the wrong
environment variable means it ignores it.

>PS. Also, hijacking my own thread, I think there is a bug with the short
>opt "-c" to set license. Is that so? Just the long option is working for
It was bug #684258 and was fixed in dh-make 0.62 in February.

Glad it seems, or almost seems, to be working for you now.

 - Craig (dh-make author)

-- 
Craig Small VK2XLZ   http://enc.com.au/  csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/  csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131002021520.ga2...@enc.com.au



Re: dh_make and $DEBEMAIL

2013-10-01 Thread Beco
On 1 October 2013 23:15, Craig Small  wrote:
> On Sat, Sep 28, 2013 at 12:42:02AM -0300, Beco wrote:
[snip]
>>PS. Also, hijacking my own thread, I think there is a bug with the short
>>opt "-c" to set license. Is that so? Just the long option is working for
> It was bug #684258 and was fixed in dh-make 0.62 in February.
>
> Glad it seems, or almost seems, to be working for you now.
>
>  - Craig (dh-make author)
>

Thanks Craig. Nice program. Well done.

I'll come back to it later. Now I'm finishing my little "example" to
make my first deb.

Cheers,
Beco.

PS. BTW, nice name for a C++ programmer. ;)



-- 
Dr Beco
A.I. researcher

"Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CALuYw2zGKwwfARwmu5bjA-a1T-C0btmxnpa=t5xoqujw61_...@mail.gmail.com



Re: Translate printf("Hallo")

2013-10-01 Thread Beco
On 1 October 2013 19:03, Boris Pek  wrote:
> Hi,
>
[snip]
>
> $ env | grep LANG
> $ env | grep LC_
>
> And search in google (or etc.) these environmental variables.
>
>> How can I see it in the original form?
>


> Try something like this:
> $ LC_ALL=C hallowelt
> or this:
> $ export LC_ALL=C
> $ hallowelt
>
> Best wishes,
> Boris




Hi Boris, hi guys,

Thanks for the tip. Its looking very professional. :)

Now, I've made some modifications and I'm having trouble in adding a
third language.

For the record, look this HOW-TO I'm doing. (I'll state the problem in the end)

/* --- BEGIN OF FILE hallowelt.c - */

/*
 *  MINI-HOWTO to translate printf messages using gettext
 *  By Dr. Beco, (C) 2013, GNU/GPL License.
 */

#include 
#include 
#include 
#include 

int main(int argc, char **argv) /* changed in ver.2 from: int main(void) */
{
  setlocale( LC_ALL, "" );
  bindtextdomain( "hallo", "/home/beco/Documents/fontes/cpp/teste/ctranslate" );
  textdomain( "hallo" );

/* added to ver.2 */  if(argc!=2)
/* added to ver.2 */  {
/* added to ver.2 */if(argc==3)
/* added to ver.2 */  setenv ("LANGUAGE", argv[1], 1);
/* added to ver.2 */printf(gettext("verwenden: %s LA [-h]\nwo LA =
pt, en oder C\n"), argv[0]);
/* added to ver.2 */exit(1);
/* added to ver.2 */  }
/* added to ver.2 */  setenv ("LANGUAGE", argv[1], 1);

  printf(gettext("Hallo, welt!\n"));
  exit(0);
}

/*

Create the directory:
$mkdir -p en/LC_MESSAGES

Type program above (just ver.1), then get a binary with
$gcc -o hallowelt hallowelt.c
> hallowelt <

and I get a template with
$xgettext -d hallo -s -o hallowelt.pot hallowelt.c
> hallowelt.pot <

Create a "po" to have a translation to some language
$msginit -l en_US -o en_US-hallowelt.po -i hallowelt.pot
> en_US-hallowelt.po <

Edit the "po" file! Then, compile the po to a mo file
$msgfmt -c -v -o hallo.mo en_US-hallowelt.po
> hallo.mo <

Copy it to the correct location
$cp hallo.mo ./en/LC_MESSAGES
And its ready. Run it!
> $ LANG=C ; ./hallowelt <
Hallo, welt!
> $ LANG=en_US.UTF8 ; ./hallowet <
Hello, world!

-

Have you upgraded the program to ver.2, then get a binary with
$gcc -o hallowelt hallowelt.c
> hallowelt <

First, extract the new template
$xgettext -d hallo -s -o hallowelt-neue.pot hallowelt.c
> hallowelt-neue.pot <

Update the "po" file merging it with the new template
$msgmerge -s -U en_US-hallowelt.po hallowelt-neue.pot
> en_US-hallowelt.po <

Edit the "po" file! Then, compile the po to a mo file
$msgfmt -c -v -o hallo.mo en_US-hallowelt.po
> hallo.mo <

Copy it to the correct location
$cp hallo.mo en/LC_MESSAGES
And its ready. Run it! (suppose your LANG=en_US.UTF8)
> $ ./hallowet C -h <
verwenden: ./hallowelt LA [-h]
wo LA = pt, en oder C
> $ ./hallowelt en -h <
usage: ./hallowelt LA [-h]
where LA = pt, en or C
> $ ./hallowelt <
usage: ./hallowelt LA [-h]
where LA = pt, en or C
> $ ./hallowelt en <
Hello, world!
> $ ./hallowelt C <
Hallo, welt!

-
Want a third language?
Create the directory:
$mkdir -p pt/LC_MESSAGES

Then first create a new po with:
$msginit -l pt_BR -o pt_BR-hallowelt.po -i hallowelt-neue.pot
> pt_BR-hallowelt.po <

Edit the "po" file! Then, compile all po's to a mo file
$msgfmt -c -v -o hallo.mo en_US-hallowelt.po pt_BR-hallowelt.po
> hallo.mo <

Copy it to the correct location
$cp hallo.mo ./pt/LC_MESSAGES
And its ready. Run it!
> $ ./hallowelt pt <
Ola, mundo!
> $ ./hallowelt pt -h <
uso: ./hallowelt LA [-h]
onde LA = pt, en ou C

-

*/

/* --- END OF FILE hallowelt.c - */


Now, after I run the command:

$ msgfmt -c -v -o hallo.mo en_US-hallowelt.po pt_BR-hallowelt.po

I get this fatal errors:

pt_BR-hallowelt.po:6: duplicate message definition...
en_US-hallowelt.po:7: ...this is the location of the first definition
pt_BR-hallowelt.po:22: duplicate message definition...
en_US-hallowelt.po:23: ...this is the location of the first definition
pt_BR-hallowelt.po:27: duplicate message definition...
en_US-hallowelt.po:30: ...this is the location of the first definition
msgfmt: pt_BR-hallowelt.po: warning: PO file header missing or invalid
warning

Re: Translate printf("Hallo")

2013-10-01 Thread Beco
On 2 October 2013 00:44, Beco  wrote:
> On 1 October 2013 19:03, Boris Pek  wrote:

[big snip]
>

> $ msgfmt -c -v -o hallo.mo en_US-hallowelt.po pt_BR-hallowelt.po
>
> I get this fatal errors:
>
> pt_BR-hallowelt.po:6: duplicate message definition...
> en_US-hallowelt.po:7: ...this is the location of the first definition
> pt_BR-hallowelt.po:22: duplicate message definition...
> en_US-hallowelt.po:23: ...this is the location of the first definition
> pt_BR-hallowelt.po:27: duplicate message definition...
> en_US-hallowelt.po:30: ...this is the location of the first definition
> msgfmt: pt_BR-hallowelt.po: warning: PO file header missing or invalid
> warning: charset conversion will not work
> msgfmt: found 4 fatal errors
>


Ah! Forget it! :) Its just plain usage:

-
Want a third language?
Create the directory:
$mkdir -p pt/LC_MESSAGES

Then first create a new po with:
$msginit -l pt_BR -o pt_BR-hallowelt.po -i hallowelt-neue.pot
> pt_BR-hallowelt.po <

Edit the "po" file! Then, compile it to a mo file
$msgfmt -c -v -o pt_BR-hallo.mo pt_BR-hallowelt.po
> hallo.mo <

Copy it to the correct location and change the name
$cp pt_BR-hallo.mo pt/LC_MESSAGES/hallo.mo
And its ready. Run it!
> $ ./hallowelt pt <
Ola, mundo!
> $ ./hallowelt pt -h <
uso: ./hallowelt LA [-h]
onde LA = pt, en ou C




Ok! Problem solved. Now, about this one here:


> 
>
> Second small question:
> It seems that adding
>
> #define _( String ) gettext( String )
>
> breaks xgettext
>
> Is there any trick to get it working with the define?


I'm still trying to figure it out.

Thanks,
Beco



-- 
Dr Beco
A.I. researcher

"Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caluyw2yyc-s-mnw97eef3jc7fscwyvdjqtadzoodzbmex3v...@mail.gmail.com



Re: Translate printf("Hallo")

2013-10-01 Thread Beco
On 2 October 2013 00:58, Beco  wrote:
>> #define _( String ) gettext( String )
>>
>> breaks xgettext
>>
>> Is there any trick to get it working with the define?

Solution:

Use -k_ arg. Example:

$xgettext -k_ -d hallo -s -o hallowelt.pot hallowelt.c

Thanks!
Beco.



-- 
Dr Beco
A.I. researcher

"Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caluyw2wnju6wzh5szkyakpsunefp6ffvr3lnnp79uadqcao...@mail.gmail.com