[Rg 127] [PATCH] gettext parser module

Keita Yamaguchi keita.yamaguchi at gmail.com
Mon Jan 14 07:39:07 EST 2008


Hi,

This patch adds a gettext parser module for creating pot file.
The pod file generated by this module includes file name and line
number information.
And I think this is useful for rake users.

Usage:

put a task like this into Rakefile:

task :generate_pot do
  require 'ramaze/contrib/gettext/parser.rb'
  Ramaze::Tool::Gettext.module_eval do
    pot = (trait[:file] % trait[:default_language]) + '.pot'
    GetText::RGetText.run(Dir.glob("template/*.{xhtml,mab}"), pot)
  end
end

% rake generate_pot

Regards,
Keita Yamaguchi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gettext-parser.patch.gz
Type: application/x-gzip
Size: 1601 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20080114/77284cbd/attachment.gz 


More information about the Ramaze-general mailing list