faalis 2.0.3 → 2.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83b33f4bf52db1cbc56a4928a7bf4537527a91fc
4
- data.tar.gz: ec7a72a64cf258374241e400d1555cd721c9bcdf
3
+ metadata.gz: 91e71ae5053b9659996646106ecb2767da75ed1e
4
+ data.tar.gz: 3267a632620a2c0f490cdbd75faf6ffc44d5c964
5
5
  SHA512:
6
- metadata.gz: c63a79865b8149a058bf6e2257b254b36252630d4e6736dee2791562e0afb91164915bac83c8570c995fff1a5ead3aec4a071f673af8c79241285623973b41fd
7
- data.tar.gz: 51b7103ab4b6ceda42488b537dfa47bd299b8c045eb12e17bba2fe53af1fca96ab644d61d2838ec4e577d794a0b6128d08e4cc2e1a1bdd6246141db3c57e5df2
6
+ metadata.gz: 7ec5735dc4ba300c1f60ac405cd20e69b1b9966785042749e8b4edec1a75280af8006f104e68c7508e72c5bd626e2a2e58567d50affdb21093f4b6076c9cf0c7
7
+ data.tar.gz: 2ec74c76341989469f11dcf3a50f13ff3d0e9a722d4874878ab3fa55ef120c1e49287e80193f24dece988950ee9965646d00a10f0529bae025f69adbedc9a825
File without changes
File without changes
@@ -18,13 +18,13 @@
18
18
 
19
19
  <div class="row">
20
20
  <% if devise_mapping.rememberable? -%>
21
- <div class="col-xs-8">
22
- <div class="checkbox icheck">
23
- <label>
24
- <%= f.check_box :remember_me, :class=>"checkbox" %> <%= t('faalis.remember_me') %>
25
- </label>
26
- </div>
27
- </div><!-- /.col -->
21
+ <div class="col-xs-8">
22
+ <div class="checkbox icheck">
23
+ <label>
24
+ <%= f.check_box :remember_me, :class=>"checkbox" %> <%= t('faalis.remember_me') %>
25
+ </label>
26
+ </div>
27
+ </div><!-- /.col -->
28
28
  <% end %>
29
29
  <div class="col-xs-4">
30
30
  <button type="submit" id="sign_in" class="btn btn-primary btn-block btn-flat"><%= t('faalis.sign_in') %></button>
@@ -33,6 +33,5 @@
33
33
  </form>
34
34
 
35
35
  <%= render "devise/shared/omni_link" %>
36
-
37
36
  <%= render "devise/shared/links" %>
38
37
  <% end %>
@@ -3,7 +3,6 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <title><%= Faalis::Engine.site_title %></title>
6
-
7
6
  <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
8
7
  <%= stylesheet_link_tag 'faalis/simple/' + Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>
9
8
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
data/lib/faalis/i18n.rb CHANGED
@@ -16,64 +16,64 @@
16
16
  # with this program; if not, write to the Free Software Foundation, Inc.,
17
17
  # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
18
  # -----------------------------------------------------------------------------
19
- # module ::ActionView
20
- # # = Action View Translation Helpers
21
- # module Helpers
22
- # module TranslationHelper
19
+ module ::ActionView
20
+ # = Action View Translation Helpers
21
+ module Helpers
22
+ module TranslationHelper
23
23
 
24
- # def t(key, options = {})
25
- # options = options.dup
26
- # has_default = options.has_key?(:default)
27
- # remaining_defaults = Array(options.delete(:default)).compact
24
+ def t(key, options = {})
25
+ options = options.dup
26
+ has_default = options.has_key?(:default)
27
+ remaining_defaults = Array(options.delete(:default)).compact
28
28
 
29
- # if has_default && !remaining_defaults.first.kind_of?(Symbol)
30
- # options[:default] = remaining_defaults
31
- # end
32
- # # If the user has explicitly decided to NOT raise errors, pass that option to I18n.
33
- # # Otherwise, tell I18n to raise an exception, which we rescue further in this method.
34
- # # Note: `raise_error` refers to us re-raising the error in this method. I18n is forced to raise by default.
35
- # if options[:raise] == false
36
- # raise_error = false
37
- # i18n_raise = false
38
- # else
39
- # raise_error = options[:raise] || ActionView::Base.raise_on_missing_translations
40
- # i18n_raise = true
41
- # end
29
+ if has_default && !remaining_defaults.first.kind_of?(Symbol)
30
+ options[:default] = remaining_defaults
31
+ end
32
+ # If the user has explicitly decided to NOT raise errors, pass that option to I18n.
33
+ # Otherwise, tell I18n to raise an exception, which we rescue further in this method.
34
+ # Note: `raise_error` refers to us re-raising the error in this method. I18n is forced to raise by default.
35
+ if options[:raise] == false
36
+ raise_error = false
37
+ i18n_raise = false
38
+ else
39
+ raise_error = options[:raise] || ActionView::Base.raise_on_missing_translations
40
+ i18n_raise = true
41
+ end
42
42
 
43
- # if html_safe_translation_key?(key)
44
- # html_safe_options = options.dup
45
- # options.except(*I18n::RESERVED_KEYS).each do |name, value|
46
- # unless name == :count && value.is_a?(Numeric)
47
- # html_safe_options[name] = ERB::Util.html_escape(value.to_s)
48
- # end
49
- # end
50
- # translation = I18n.translate(scope_key_by_partial(key), html_safe_options.merge(raise: i18n_raise))
43
+ if html_safe_translation_key?(key)
44
+ html_safe_options = options.dup
45
+ options.except(*I18n::RESERVED_KEYS).each do |name, value|
46
+ unless name == :count && value.is_a?(Numeric)
47
+ html_safe_options[name] = ERB::Util.html_escape(value.to_s)
48
+ end
49
+ end
50
+ translation = I18n.translate(scope_key_by_partial(key), html_safe_options.merge(raise: i18n_raise))
51
51
 
52
- # translation.respond_to?(:html_safe) ? translation.html_safe : translation
53
- # else
54
- # I18n.translate(scope_key_by_partial(key), options.merge(raise: i18n_raise))
55
- # end
56
- # rescue I18n::MissingTranslationData => e
57
- # if remaining_defaults.present?
58
- # translate remaining_defaults.shift, options.merge(default: remaining_defaults)
59
- # else
60
- # raise e if raise_error
52
+ translation.respond_to?(:html_safe) ? translation.html_safe : translation
53
+ else
54
+ I18n.translate(scope_key_by_partial(key), options.merge(raise: i18n_raise))
55
+ end
56
+ rescue I18n::MissingTranslationData => e
57
+ if remaining_defaults.present?
58
+ translate remaining_defaults.shift, options.merge(default: remaining_defaults)
59
+ else
60
+ raise e if raise_error
61
61
 
62
- # keys = I18n.normalize_keys(e.locale, e.key, e.options[:scope])
63
- # title = "translation missing: #{keys.join('.')}"
62
+ keys = I18n.normalize_keys(e.locale, e.key, e.options[:scope])
63
+ title = "translation missing: #{keys.join('.')}"
64
64
 
65
- # interpolations = options.except(:default, :scope)
66
- # if interpolations.any?
67
- # title << ", " << interpolations.map { |k, v| "#{k}: #{ERB::Util.html_escape(v)}" }.join(', ')
68
- # end
65
+ interpolations = options.except(:default, :scope)
66
+ if interpolations.any?
67
+ title << ", " << interpolations.map { |k, v| "#{k}: #{ERB::Util.html_escape(v)}" }.join(', ')
68
+ end
69
69
 
70
- # content_tag('span', keys.last.to_s.titleize, class: 'translation_missing', title: title)
71
- # #title
72
- # end
73
- # end
74
- # end
75
- # end
76
- # end
70
+ #content_tag('span', keys.last.to_s.titleize, class: 'translation_missing', title: title)
71
+ title
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
77
 
78
78
  module Faalis
79
79
  # I18n related utility functions
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------
2
2
  # Faalis
3
- # Copyright (C) 2012-2015 Yellowen
3
+ # Copyright (C) 2012-2016 Yellowen
4
4
  #
5
5
  # This program is free software; you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -18,5 +18,5 @@
18
18
  # -----------------------------------------------------------------------------
19
19
 
20
20
  module Faalis
21
- VERSION = '2.0.3'
21
+ VERSION = '2.0.4'
22
22
  end
@@ -13,9 +13,9 @@ Steps to finish up installation:
13
13
 
14
14
  $ rake db:migrate db:seed
15
15
 
16
- 4. Make sure you take a look and configured conf/initializer/devise.rb (optional)
16
+ 4. Make sure you take a look and configured config/initializers/devise.rb (optional)
17
17
 
18
18
  NOTE: if you want to use devise with omniauth configure them in
19
- conf/initializer/devise.rb according to devise wiki
19
+ config/initializers/devise.rb according to devise wiki
20
20
 
21
- 5. Make sure you take a look and configured conf/initializer/formtastic.rb (optional)
21
+ 5. Make sure you take a look and configured config/initializers/formtastic.rb (optional)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faalis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sameer Rahmani
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-24 00:00:00.000000000 Z
12
+ date: 2016-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -508,6 +508,8 @@ files:
508
508
  - app/assets/stylesheets/faalis/dashboard/rtl/application.css
509
509
  - app/assets/stylesheets/faalis/dashboard/share.scss
510
510
  - app/assets/stylesheets/faalis/dashboard/variables.scss
511
+ - app/assets/stylesheets/faalis/ltr/application.css
512
+ - app/assets/stylesheets/faalis/rtl/application.css
511
513
  - app/assets/stylesheets/faalis/simple/ltr/application.css
512
514
  - app/assets/stylesheets/faalis/simple/rtl/application.css
513
515
  - app/assets/stylesheets/faalis/simple/rtl/rtl.scss