Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
vendor_ruby /
i18n /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
localization
[ DIR ]
drwxr-xr-x
basics.rb
2.26
KB
-rw-r--r--
defaults.rb
1.92
KB
-rw-r--r--
interpolation.rb
7.33
KB
-rw-r--r--
link.rb
2.15
KB
-rw-r--r--
localization.rb
587
B
-rw-r--r--
lookup.rb
2.79
KB
-rw-r--r--
pluralization.rb
1.33
KB
-rw-r--r--
procs.rb
2.83
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : basics.rb
module I18n module Tests module Basics def teardown I18n.available_locales = nil end test "available_locales returns the locales stored to the backend by default" do I18n.backend.store_translations('de', :foo => 'bar') I18n.backend.store_translations('en', :foo => 'foo') assert I18n.available_locales.include?(:de) assert I18n.available_locales.include?(:en) end test "available_locales can be set to something else independently from the actual locale data" do I18n.backend.store_translations('de', :foo => 'bar') I18n.backend.store_translations('en', :foo => 'foo') I18n.available_locales = :foo assert_equal [:foo], I18n.available_locales I18n.available_locales = [:foo, 'bar'] assert_equal [:foo, :bar], I18n.available_locales I18n.available_locales = nil assert I18n.available_locales.include?(:de) assert I18n.available_locales.include?(:en) end test "available_locales memoizes when set explicitely" do I18n.backend.expects(:available_locales).never I18n.available_locales = [:foo] I18n.backend.store_translations('de', :bar => 'baz') I18n.reload! assert_equal [:foo], I18n.available_locales end test "available_locales delegates to the backend when not set explicitely" do original_available_locales_value = I18n.backend.available_locales I18n.backend.expects(:available_locales).returns(original_available_locales_value).twice assert_equal I18n.backend.available_locales, I18n.available_locales end test "exists? is implemented by the backend" do I18n.backend.store_translations(:foo, :bar => 'baz') assert I18n.exists?(:bar, :foo) end test "storing a nil value as a translation removes it from the available locale data" do I18n.backend.store_translations(:en, :to_be_deleted => 'bar') assert_equal 'bar', I18n.t(:to_be_deleted, :default => 'baz') I18n.cache_store.clear if I18n.respond_to?(:cache_store) && I18n.cache_store I18n.backend.store_translations(:en, :to_be_deleted => nil) assert_equal 'baz', I18n.t(:to_be_deleted, :default => 'baz') end end end end
Close