Subject: [sup-talk] i18n?

From: [email-masked] (Christopher Bertels)
Date: Thu, 01 Oct 2009 01:30:54 +0200

Hi,

are there any plans on doing some internationalization?  If not, would
people like to have something like this, now that I have mentioned it? ;)

I guess something yaml-based could work, there are some good libraries
out there afaik.

Why this came to my mind: I usually write mails in german and english
and have done a custom patch to check for the german word for
"attachment" to warn me before sending an email, if I haven't yet
added an attachment to a composed mail. This obviously works for
english right now, but I wanted to have a similar feature in german.
Since adding language specific options all over the code really isn't
the right way, maybe having some kind of language packs would be
nice. I could take care of some german translation (and I suppose I'm
not the only one on this list ;))

Cheers,
Christopher.
-- 
================================
Christopher Bertels
http://www.adztec-independent.de
GPG Key ID: 0x2345b203
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 902 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20091001/d6569555/attachment.bin>

---

From: [email-masked] (William Morgan)
Date: Thu, 01 Oct 2009 09:44:43 -0700

Reformatted excerpts from Christopher Bertels's message of 2009-09-30:
> people like to have something like this, now that I have mentioned it?

I have no immediate plans personally, but I would love to have this in
Sup.

> I guess something yaml-based could work, there are some good libraries

There is a Ruby-Gettext package, which we already use for other reasons.
I think this is probably the best thing to start with, unless it turns
out to be too hard to use, in which case we could consider a custom
solution.

http://www.yotabanana.com/hiki/ruby-gettext.html

> I could take care of some german translation (and I suppose I'm not
> the only one on this list ;))

I know we have a fair amount of German and French representation on the
list, and that's probably representative of the user population in
general. So you should have an appreciative audience.
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Christopher Bertels)
Date: Thu, 01 Oct 2009 20:15:50 +0200

> I have no immediate plans personally, but I would love to have this in

Alright, good to know.

> http://www.yotabanana.com/hiki/ruby-gettext.html

Cool, I'll have a look at it.

Another reason for adding this would be that for example gpg's output
is different for me (in german) than what sup expects. So trust-paths
for example aren't recognized by default, since the regular expression
in crypto.rb only looks for english output. I fixed this for myself
but I figured it would make more sense to put this kind of stuff to a
central location.
-- 
================================
Christopher Bertels
http://www.adztec-independent.de
GPG Key ID: 0x2345b203
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20091001/cf2f42a4/attachment.bin>

---

From: [email-masked] (Christopher Bertels)
Date: Thu, 01 Oct 2009 20:21:48 +0200

> I have no immediate plans personally, but I would love to have this in

Ok, great!

> http://www.yotabanana.com/hiki/ruby-gettext.html

Thanks, I'll have a look at it.

Btw, another reason for adding something like this would be that sup
depends on an english version of gpg. For checking a trust-path, for
example, it uses a regular expression that checks for a certain output
of gpg (in english).  Since I have a german version, this obviously
doesn't work (I had to patch it for my needs).  I guess there probably
are more things where different languages could play a role, so
putting it in a central, well-defined location makes sense.
-- 
================================
Christopher Bertels
http://www.adztec-independent.de
GPG Key ID: 0x2345b203

---

From: [email-masked] (William Morgan)
Date: Thu, 01 Oct 2009 11:24:57 -0700

Reformatted excerpts from Christopher Bertels's message of 2009-10-01:
> in crypto.rb only looks for english output.

It will be interesting to see how gettext handles the case of regular
expressions (which is also probably what you want for the "attachment"
detector). If it's not natural to wedge regexen into gettext, we should
consider a custom solution.
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Christopher Bertels)
Date: Thu, 01 Oct 2009 20:33:03 +0200

Please excuse my double posting. Sup crashed after sending a message.
I have the exception log attached.
Seems like it has a problem with the sent.mbox and wants me to 
      sup-sync --changed sup://sent

I switched from ferret to xapian today and the error clearly happens there.
-- 
================================
Christopher Bertels
http://www.adztec-independent.de
GPG Key ID: 0x2345b203
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: exception-log.txt
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20091001/8366e0e9/attachment.txt>

---

From: [email-masked] (Rich Lane)
Date: Thu, 01 Oct 2009 14:47:44 -0400

Excerpts from Christopher Bertels's message of Thu Oct 01 14:33:03 -0400 2009:
> undefined method `[]' for nil:NilClass
> /home/bakkdoor/projekte/ruby/sup/lib/sup/xapian_index.rb:558:in `mkterm'

What commit is your tree at?

---

From: [email-masked] (Christopher Bertels)
Date: Fri, 02 Oct 2009 02:19:35 +0200

> consider a custom solution.

Hmm. Well I started working on something simple based on yaml files.
I looked at gettext but that seemed a little weird to me.  Since
Ruby's yaml module supports regular expressions, this is a plus point,
I guess. It worked with the attachments example.
-- 
================================
Christopher Bertels
http://www.adztec-independent.de
GPG Key ID: 0x2345b203
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 902 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20091002/9c56d49e/attachment.bin>

---

From: [email-masked] (Christopher Bertels)
Date: Fri, 02 Oct 2009 14:52:47 +0200

I've uploaded what I've done so far to
http://www.gitorious.org/~bakkdoor/sup/bakkdoors-clone/trees/i18n 
You can get it via git here:
git://gitorious.org/~bakkdoor/sup/bakkdoors-clone.git (branch: i18n)

Please tell me what you think. I know it's pretty simple but for now I
guess that's all we need. Or am I missing something?  

One thing I wanted to add as well is, that if there is no translation
found for a different language, it will default to the english version
(instead of returning nil).
-- 
================================
Christopher Bertels
http://www.adztec-independent.de
GPG Key ID: 0x2345b203