[katello-devel] anyone have gettext testing fu?
Bryan Kearney
bkearney at redhat.com
Thu Mar 7 19:10:46 UTC 2013
On 03/07/2013 11:13 AM, Bryan Kearney wrote:
> On 03/07/2013 05:13 AM, Lukas Zapletal wrote:
>>> Has anyone triend monkey patching _() (or somethinkg like that) to
>>> test that all strings on a page a localized? I would like to avoid
>>> having to regen the strings file all the time.
>>
>> What? :-)
>>
> My real goal is to help with ensuring that all strings on a page are
> translated during development. I was hoping to alias the _() method so
> that it returns the string wiht:
>
> X{THE ORIGINAL STRING }X
>
> so that I could look at a page to know if anything was missed. Once the
> strings are extracted and trasnlated, it is easy to do by switching
> languages.
>
> -- bk
>
ok.. found it.. add this to your fastgettext initializer in
module FastGettext
module Translation
alias :old_ :_
def _(key)
"X" + old_(key) + "X"
end
end
end
-- bk
More information about the katello-devel
mailing list