Skip to content

French translation #46

Merged
merged 1 commit into from Oct 2, 2012

3 participants

@arhuman
arhuman commented Oct 2, 2012

First draft of the French translation.

As said by mail, It's sadly not tested :-(

Please, don't hesitate to test/give feedback and I'll try to improve it.

@theory theory merged commit 08b3174 into theory:master Oct 2, 2012
@theory
Owner
theory commented Oct 2, 2012

Seems to work after I fixed a few syntax errors:

> LANG=fr_fr ./t/sqitch foo
"foo" n'est pas une commande valide

Thanks!

@theory
Owner
theory commented Oct 2, 2012

Oh, BTW, feel free to change things like "{thing}" to «{thing}» as appropriate for French. Those are the preferred quotation marks, yes?

@arhuman
@rdunklau

I have encoding problems with the french translation.
Example:
Module DBD::Pg requis pour gérer PostgreSQL

My system is fully utf8 capable (Gentoo linux with fr_FR.UTF-8 locale).

This has been tested on Sqitch 0.937 from perl cpan (using force install, since tests were failing due to unexpected translations).

Sorry for lacking more details, but I don't know the perl ecosystem at all, and I will gladly provide more information if given the proper instructions.

@theory theory added a commit that referenced this pull request Oct 11, 2012
@theory Identify the French translation as Latin-1.
Reported by @rdunklau in #46.
065eaeb
@theory
Owner
theory commented Oct 11, 2012

@rdunklau Car to give 065eaeb a try? I think it will fix the problem.

@theory
Owner
theory commented Oct 11, 2012

@arhuman May I change the translation info to point to you, rather than me? Something like this:

"Report-Msgid-Bugs-To: arhuman@gmail.com\n"
"Last-Translator: Arnaud Assad <arhuman@gmail.com>\n"
"Language-Team: French <arhuman@gmail.com>\n"

Thanks,

David

@arhuman
@theory theory added a commit that referenced this pull request Oct 11, 2012
@theory Credit @arhuman for the French translation.
And make him reponsible, too! Per request in #46.
de91fcf
@theory
Owner
theory commented Oct 11, 2012

Awesome, thanks!

@arhuman
@rdunklau
@arhuman
arhuman commented Oct 12, 2012

@rdunklau : Can you contact me privately (arhuman@gmail.com or IRC) for I can assist you.

I will provide you a "classical" Module to install (the current sources are supposed to be handled though a Perl tool called Dist::Zilla

BTW: Tu peux bien sur me contacter en Français ;-)

@rdunklau

Thank you for your help, knowing the module was installable with Dist::Zilla sufficed to put me on tracks.

The new version is actually "worse" from a user experience standpoint:

Extract from sqitch status:

With commit: 065eaeb
# Déployé : 2012-10-11 10:52:33 +0200

With Commit: 716d939
# Déployé : 2012-10-11 10:52:33 +0200

It looks like the strings are encoded twice: the po file seems to be utf8, but sqitch encode it another time.

I identified where it happens in the pager code (Sqitch.pm:480):

sub page {
    my $pager = shift->pager;
    # If the pager is a glob, we don't have to encode, because -CAS does it.
    return $pager->say(@_) if ref $pager eq 'GLOB';
    # If it is an object, we have to encode it. Ugh.
    $pager->say(encode_utf8 join '', map { $_ // '' } @_);
}

By returning even if the pager is not GLOB, the output of paged commands such as sqitch log is correctly encoded.
However, sqitch status is still badly encoded.

I don't have the perl skills to approach this problem, but this may be worth investigating.

@theory
Owner
theory commented Oct 13, 2012

Hrm. The problem appears to be not in the page() method (which status does not call), but in Locale::TextDomain: It is not returning text decoded into Perl's internal form! I put this in t/base.t:

for my $lang (qw(fr)) {
    my $text = __x 'On database {db}', db => 'foo';
    diag Encode::is_utf8($text) ? 'Yes' : 'No';
    diag 'UTF-8?   ', utf8::valid($text) ? 'Yes' : 'No';
    diag $text;
}

And with LANGUAGE=fr it emits:

# Decoded? No
# UTF-8?   Yes
# Sur la Base de Données foo

Which tells me that Locale::TextDomain is giving me valid UTF-8, but not decoding it to Perl’s internal representation. I will report this to the author

@theory
Owner
theory commented Oct 13, 2012

I emailed Guid and Cc’d you two. Let’s see what he says. If he decides not to do it, I will probably whip up a subclass that does the decoding.

@theory theory added a commit that referenced this pull request Nov 7, 2012
@theory Force Locale::TextDomain to encode in UTF-8 and to decode all messages.
Based on a discussion with Locale::TextDomain maintainer Guido Flohr. He is
adamantly opposed to returning decoded strings, but points out that through
the combination of setting the `$OUTPUT_CHARSET` environment variable and
binding a filter to the domain, we can get it to properly decode strings. So
let's do that.

Reported in the discussion of pull request #46.
a42733d
@theory
Owner
theory commented Jan 8, 2013

Hey guys, quick note, I just released Dist::Zilla::LocaleTextDomain v0.84. It includes a new command, msg-compile, that make it much easier to test a translation as you work on it without having to compile the entire project. It works like this:

> dzil msg-compile fr                 
[LocaleTextDomain] po/fr.po: 155 translated messages, 24 fuzzy translations, 16 untranslated messages.

> LANGUAGE=fr ./t/sqitch foo
"foo" n'est pas une commande valide
> rm -rf LocaleData                   

The key is to use t/sqitch, which knows to look for ./LocaleData. Hope that helps with future translating work!

@theory
Owner
theory commented Jan 8, 2013

Just pushed Dist::Zilla::LocaleTextDomain v0.85, which changes the interface to:

> dzil msg-compile po/fr.po
[LocaleTextDomain] po/fr.po: 155 translated messages, 24 fuzzy translations, 16 untranslated messages.

> LANGUAGE=fr ./t/sqitch foo
"foo" n'est pas une commande valide
> rm -rf LocaleData

See also its notes for translators and quick blog post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.