Permalink
Browse files

Tiny support of localized templates naming

  • Loading branch information...
1 parent 124ac72 commit 0739f9853f840f68075fae463bfa69f6c7b1f8c1 @inossidabile inossidabile committed Mar 27, 2012
Showing with 36 additions and 36 deletions.
  1. +34 −35 Gemfile.lock
  2. +2 −1 app/assets/javascripts/joosy/core/templaters/rails_jst.js.coffee
View
@@ -19,7 +19,7 @@ GIT
PATH
remote: .
specs:
- joosy (0.1.0.RC2)
+ joosy (0.1.0.RC3)
coffee-rails
haml_coffee_assets
jquery-rails
@@ -28,34 +28,34 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.2.1)
- actionpack (= 3.2.1)
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
mail (~> 2.4.0)
- actionpack (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.1)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
- activemodel (3.2.1)
- activesupport (= 3.2.1)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
builder (~> 3.0.0)
- activerecord (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
- arel (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
- activesupport (3.2.1)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
i18n (~> 0.6)
multi_json (~> 1.0)
- arel (3.0.0)
+ arel (3.0.2)
builder (3.0.0)
childprocess (0.3.0)
ffi (~> 1.0.6)
@@ -81,44 +81,43 @@ GEM
guard-coffeescript (0.5.4)
coffee-script (>= 2.2.0)
guard (>= 0.8.3)
- haml_coffee_assets (0.8.2)
+ haml_coffee_assets (0.8.4)
execjs (>= 1.2.9)
sprockets (>= 2.0.3)
tilt (>= 1.3.3)
hike (1.2.1)
i18n (0.6.0)
jasmine-core (1.2.0.rc1)
- journey (1.0.1)
- jquery-rails (2.0.0)
- railties (>= 3.2.0.beta, < 5.0)
+ journey (1.0.3)
+ jquery-rails (2.0.1)
+ railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.6.5)
- json (1.6.5-java)
- mail (2.4.1)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
polyglot (0.3.3)
rack (1.4.1)
- rack-cache (1.1)
+ rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.2.1)
- actionmailer (= 3.2.1)
- actionpack (= 3.2.1)
- activerecord (= 3.2.1)
- activeresource (= 3.2.1)
- activesupport (= 3.2.1)
+ rails (3.2.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
bundler (~> 1.0)
- railties (= 3.2.1)
- railties (3.2.1)
- actionpack (= 3.2.1)
- activesupport (= 3.2.1)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -153,7 +152,7 @@ GEM
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.31)
+ tzinfo (0.3.32)
PLATFORMS
java
@@ -12,7 +12,8 @@ class Joosy.Templaters.RailsJST
# @param [String] name Template name 'foo/bar'
#
buildView: (name) ->
- template = JST[location = "#{@applicationName}/templates/#{name}"]
+ unless template = JST[location = "#{@applicationName}/templates/#{name}.#{I18n?.locale}"]
+ template = JST[location = "#{@applicationName}/templates/#{name}"]
unless template
throw new Error "Template '#{name}' not found. Checked at: #{location}"

0 comments on commit 0739f98

Please sign in to comment.