air18n 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/air18n.rb +2 -0
- data/lib/air18n/class_methods.rb +8 -0
- data/lib/air18n/version.rb +1 -1
- data/make_gem +1 -1
- metadata +2 -2
data/lib/air18n.rb
CHANGED
@@ -11,6 +11,8 @@ require 'air18n/reflection'
|
|
11
11
|
module Air18n
|
12
12
|
AIR18N_RESERVED_KEYS = [:routes_context, :suppress_ct, :default_is_low_priority, :disable_xss_check]
|
13
13
|
|
14
|
+
RTL_LOCALES = [ :he, :ar ]
|
15
|
+
|
14
16
|
def self.included(base)
|
15
17
|
base.class_eval do
|
16
18
|
# Currencies that correspond to users who want distance unit to be
|
data/lib/air18n/class_methods.rb
CHANGED
@@ -49,6 +49,14 @@ module Air18n
|
|
49
49
|
tags ? tags.language.to_sym : language_from_locale(I18n.default_locale)
|
50
50
|
end
|
51
51
|
|
52
|
+
def base_direction_of(locale)
|
53
|
+
RTL_LOCALES.include?(locale) ? 'rtl' : 'ltr'
|
54
|
+
end
|
55
|
+
|
56
|
+
def base_direction
|
57
|
+
base_direction_of(locale)
|
58
|
+
end
|
59
|
+
|
52
60
|
# Gets a hash containing phrases that need to be screenshot in the
|
53
61
|
# specified routes_context.
|
54
62
|
# After this method returns the phrases, it forgets about them, so you
|
data/lib/air18n/version.rb
CHANGED
data/make_gem
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: air18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2012-05-
|
16
|
+
date: 2012-05-30 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: i18n
|