summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb
diff options
context:
space:
mode:
authorBenjamin Sanders <ben@Benjamins-MacBook-Pro.local>2025-10-11 10:34:24 -0400
committerBenjamin Sanders <ben@Benjamins-MacBook-Pro.local>2025-10-11 10:34:24 -0400
commit5571dc766e2143e39762ff0b47c41d1c2e154f4c (patch)
treef4f124d314a7e76c04484515aa0fd1f2e271a601 /vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb
parent359f3309c97fc894b63e0a295c76ab298504d635 (diff)
Vendor bundled gems for deployment
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb')
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb b/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb
new file mode 100644
index 0000000..858daff
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n/gettext.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module I18n
+ module Gettext
+ PLURAL_SEPARATOR = "\001"
+ CONTEXT_SEPARATOR = "\004"
+
+ autoload :Helpers, 'i18n/gettext/helpers'
+
+ @@plural_keys = { :en => [:one, :other] }
+
+ class << self
+ # returns an array of plural keys for the given locale or the whole hash
+ # of locale mappings to plural keys so that we can convert from gettext's
+ # integer-index based style
+ # TODO move this information to the pluralization module
+ def plural_keys(*args)
+ args.empty? ? @@plural_keys : @@plural_keys[args.first] || @@plural_keys[:en]
+ end
+
+ def extract_scope(msgid, separator)
+ scope = msgid.to_s.split(separator)
+ msgid = scope.pop
+ [scope, msgid]
+ end
+ end
+ end
+end