air18n 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/make_gem CHANGED
@@ -1,5 +1,5 @@
1
1
  # Run this to push the new version of the gem to rubygems!
2
- v=0.0.7
2
+ v=0.0.8
3
3
  gem build air18n.gemspec
4
4
  gem push air18n-${v}.gem
5
5
 
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.7
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-25 00:00:00.000000000 Z
16
+ date: 2012-05-30 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n