Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French translation #46

Merged
merged 1 commit into from Oct 2, 2012
Merged

French translation #46

merged 1 commit into from Oct 2, 2012

Conversation

arhuman
Copy link
Collaborator

@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 added a commit that referenced this pull request Oct 2, 2012
French translation thanks to arhuman!
@theory theory merged commit 08b3174 into sqitchers:master Oct 2, 2012
@theory
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator Author

arhuman commented Oct 2, 2012

On Tue, Oct 2, 2012 at 7:10 PM, David E. Wheeler
notifications@github.comwrote:

Seems to work after I fixed a few syntax errors:

Sorry for the errors.
I was also wondering for the msgstr (if they could be multiline like the
msgid), but I forgot to ask.
Now, I know :-)

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

Thanks!

You're welcome !


Reply to this email directly or view it on GitHubhttps://github.com//pull/46#issuecomment-9082963.

@rdunklau
Copy link

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 added a commit that referenced this pull request Oct 11, 2012
@theory
Copy link
Collaborator

theory commented Oct 11, 2012

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

@theory
Copy link
Collaborator

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
Copy link
Collaborator Author

arhuman commented Oct 11, 2012

Of course :-)
Feel free to do it...

BTW: I just finished to install Dist::Zilla I'll now be able to test.

ArnaudA

On Thu, Oct 11, 2012 at 8:29 PM, David E. Wheeler
notifications@github.comwrote:

@arhuman https://github.com/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


Reply to this email directly or view it on GitHubhttps://github.com//pull/46#issuecomment-9352321.

theory added a commit that referenced this pull request Oct 11, 2012
And make him reponsible, too! Per request in #46.
@theory
Copy link
Collaborator

theory commented Oct 11, 2012

Awesome, thanks!

@arhuman
Copy link
Collaborator Author

arhuman commented Oct 12, 2012

Hello,

DISCLAIMER: I'm not an I18N/Encoding expert

Are you sure about your choice of changing the encoding to Latin 1 for the
French .po file ?
When I look at the file, the encoding really looks like utf8 (and my vim
seems to confirm it)

When I switch back the encoding to UTF-8 in the file, most of the tests
pass :

Test Summary Report

t/add.t (Wstat: 512 Tests: 85 Failed: 2)
Failed tests: 45, 48
Non-zero exit status: 2
t/base.t (Wstat: 512 Tests: 99 Failed: 2)
Failed tests: 94, 98
Non-zero exit status: 2
t/engine.t (Wstat: 256 Tests: 255 Failed: 1)
Failed test: 150
Non-zero exit status: 1
t/log.t (Wstat: 6912 Tests: 236 Failed: 27)
Failed tests: 41, 43, 45, 47-48, 50-51, 53, 55, 57, 59
61, 63, 102, 112, 132-133, 135-136, 144-145
147-148, 204, 206, 208, 210
Non-zero exit status: 27
t/plan.t (Wstat: 12032 Tests: 714 Failed: 47)
Failed tests: 20, 24, 28, 32, 36, 40, 44, 48, 52, 56
60, 64, 68, 72, 76, 80, 84, 88, 92, 96
100, 104, 108, 191, 195, 199, 203, 207
211, 215, 219, 223, 227, 231, 235, 259
684, 687, 690, 693, 696, 699, 702, 705
708, 711, 714
Non-zero exit status: 47
Files=30, Tests=3290, 17 wallclock secs ( 0.55 usr 0.06 sys + 15.95 cusr
0.88 csys = 17.44 CPU)

I gazed quickly at one failing test (I'm at the office currently) and the
first error I've seen was linked to Mock object
(I suspect the mockobject is not using translating strings)

I'll try to sort this out tonight...

Regards,

ArnaudA

On Thu, Oct 11, 2012 at 11:01 PM, David E. Wheeler <notifications@github.com

wrote:

Awesome, thanks!


Reply to this email directly or view it on GitHubhttps://github.com//pull/46#issuecomment-9357762.

@rdunklau
Copy link

Le jeudi 11 octobre 2012 11:26:23 David E. Wheeler a écrit :

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

I'd love to, but I don't understand the installation instructions...

I don't have a Build.PL file in the repository, is this something that should
come from my perl configuration / installation ?

Sorry, this must be a total newbie question but I never used perl before and
I'm completely at lost.


Reply to this email directly or view it on GitHub:
#46 (comment)

@arhuman
Copy link
Collaborator Author

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
Copy link

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
Copy link
Collaborator

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
Copy link
Collaborator

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 added a commit that referenced this pull request Nov 7, 2012
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.
@theory
Copy link
Collaborator

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
Copy link
Collaborator

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants