js_erb 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,13 @@
1
1
  = JsErb - Changelog
2
2
 
3
+ == js_erb v0.1.2 released 2010/05/08
4
+
5
+ * fixing bugs
6
+
7
+ == js_erb v0.1.1 released 2010/05/08
8
+
9
+ * fixing bugs
10
+
3
11
  == js_erb v0.1.0 released 2010/05/08
4
12
 
5
13
  * initial release
data/README.rdoc CHANGED
@@ -43,7 +43,7 @@ At the end set javascript_include_tag (add javascript files into the <head>).
43
43
  == Javascript HTML Templates & Translations
44
44
 
45
45
  JsErb will, in addition to javascript source files, create a javascript file with translations
46
- and javascript file with HTML templates. You can access them in anywhere in your javascript like
46
+ and javascript file with HTML templates. You can access them anywhere in your javascript like
47
47
 
48
48
  # Access transations
49
49
  alert( i18n.t('welcome') );
@@ -56,7 +56,7 @@ module JsErb
56
56
  name = File.basename(file, '.js.yml')
57
57
  content = YAML.load(ERB.new(File.read(file)).result)
58
58
  File.open(File.join(JsErb.config['path']['compiled'], 'locales', "#{name}.js"), "wb") do |f|
59
- f.write("window.i18n = {t:function(key){for(var i in i18n.$){return i18n.$[i][key]}}, $:#{content.to_json} };")
59
+ f.write("window.i18n = {t:function(key){for(var i in i18n.$){return eval('i18n.$.'+i+'.'+key)}}, $:#{content.to_json} };")
60
60
  end
61
61
  end
62
62
  end
@@ -2,7 +2,7 @@ module JsErb
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_erb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kristijan Sedlak