[Kde-bindings] Introducing project KDEgettext.rb for qtruby or korundum

Robert Riemann robert.riemann at physik.hu-berlin.de
Sun Aug 16 15:57:47 UTC 2009


Hi David,

Thanks for you testings.

> > Hi everyone,
> >
> > i wrote a little application to extract the translator information
> >  (po-file) from your ruby code.
> >
> > You can find the gem on github and my own server (maybe github is to slow
> >  to show the recent commits):
> >
> > http://git.salout.selfip.org/KDEgettext.rb.git/tree
> > http://github.com/saLOUt/KDEGettext.rb/tree
> >
> > But there is still one problem:
> >
> > On my PC the gem only works with ruby1.9 in a login console (su - user).
> > It would be nice if you test it on your pc. I've uploaded some sample
> > code to: http://pastie.org/572426
> >
> > After installation via sudo gem(1.9) install kdegettext.gem-x.x.x.gem
> > there is a /usr/bin/kdegettext.rb .
> >
> > To use it with ruby v1.9 just try something like:
> > ruby1.9 /usr/bin/kdegettext.rb file.rb
> >
> > to use it with your ruby in $PATH, it is only:
> > kdegettext.rb file.rb
> >
> > I hope the bugs are related to my own ruby configuration.
> >
> > Greets Robert
>
> Hi,
>
> Thanks for your work. It works great! (tested on Debian, ruby1.8 as a
> normal user).
>
> I notice it uses a number of rubygems, which are not available in my distro
> as packages.

Actually all rubygems should be installed automatically via gem from the 
rubyforge.org server. As rubygems are not distro-specific there is no need to 
provide distro packages, isn't it?

>
> Another question: should context really be included in the msgid?

That's a known bug. I updated the online readme where the bug is already 
mentioned: http://korundum.rubyforge.org/kdegettext/README_rdoc.html

Workarounds (i need both tricks, maybe other need only one of them):
- open a console an login via the following command: su - user
- install kdegettext for ruby1.9: gem1.9 install kdegettext and use kdegettext 
  this way: ruby1.9 /usr/bin/kdegettext your_file.rb

It would be nice if you could test which one (maybe both) of these work-
arounds would really necessary for you.

>
> Output for the first file in the pastie:
> =====================
> # SOME DESCRIPTIVE TITLE.
> # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
> # This file is distributed under the same license as the PACKAGE package.
> # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
> #
> #, fuzzy
> msgid ""
> msgstr ""
> "Project-Id-Version: PACKAGE VERSION\n"
> "POT-Creation-Date: 2009-08-15 19:01-0500\n"
> "PO-Revision-Date: 2009-08-15 19:01-0500\n"
> "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
> "Language-Team: LANGUAGE <LL at li.org>\n"
> "MIME-Version: 1.0\n"
> "Content-Type: text/plain; charset=UTF-8\n"
> "Content-Transfer-Encoding: 8bit\n"
> "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
>
> #: test1.rb:20
> msgid "after one Test"
> msgid_plural "after %1 Tests"
> msgstr[0] ""
> msgstr[1] ""
>
> #: test1.rb:16
> msgid "contextTest %1"
> msgstr ""
>
> #: test1.rb:14 test1.rb:22
> msgid "Test without context %1"
> msgstr ""
>
> #: test1.rb:18
> msgid "contextafter one Test with context"
> msgid_plural "after %1 Tests with context"
> msgstr[0] ""
> msgstr[1] ""
>
> #: test1.rb:7
> msgid "i18nQtRuby"




More information about the Kde-bindings mailing list