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

David Palacio dpalacio at uninorte.edu.co
Sun Aug 16 01:13:10 UTC 2009


On Miércoles 05 Agosto 2009 08:10:28 Robert Riemann escribió:
> 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.

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

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