⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (470 Bytes)
Bug #5374
» gettext-test.rb
test for gettext workaround -
375gnu (Hleb Valoshka)
, 09/28/2011 04:02 AM
#!/usr/bin/ruby1.9.1 -d -I.
require
'gettext'
include
GetText
$SAFE
=
1
set_current_locale
ARGV
[
0
]
bindtextdomain
(
'test'
,
:path
=>
'./'
)
module
Locale
module_function
def
require_driver
(
name
)
#:nodoc:
require
File
.
join
(
ROOT
,
"locale/driver"
,
name
.
to_s
).
untaint
end
end
module
GetText
class
MOFile
alias
:oldload
:load
def
load
(
arg
)
arg
=
arg
.
dup
.
untaint
if
arg
.
kind_of?
String
oldload
(
arg
)
end
end
end
puts
_
(
'Hello world!'
)
« Previous
1
2
3
4
5
Next »
(3-3/5)
Loading...