localeapp 0.6.12 → 0.6.13

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  # Version 0.6.12
4
4
 
5
+ * Respect the `scopez option when contructing translations
6
+ * Specify that the MIT license is used
7
+
8
+ # Version 0.6.12
9
+
5
10
  * Fix an error creating the folder for the syncfile
6
11
 
7
12
  # Version 0.6.11 (yanked)
data/README.md CHANGED
@@ -209,3 +209,7 @@ See [this article on Ruby Inside][1] for some more details.
209
209
 
210
210
  You can contact us via the support link at the bottom of the page or emailing
211
211
  support@localeapp.com
212
+
213
+ ## License
214
+
215
+ The code for `localeapp` is released under the [MIT License](http://opensource.org/licenses/MIT).
@@ -13,6 +13,9 @@ module Localeapp
13
13
  end
14
14
 
15
15
  def add(locale, key, description = nil, options = {})
16
+ separator = options.delete(:separator) { I18n.default_separator }
17
+ scope = options.delete(:scope)
18
+ key = I18n.normalize_keys(nil, key, scope, separator).map(&:to_s).join(separator)
16
19
  record = MissingTranslationRecord.new(key, locale, description, options)
17
20
  @translations[locale][key] = record
18
21
  end
@@ -1,3 +1,3 @@
1
1
  module Localeapp
2
- VERSION = "0.6.12"
2
+ VERSION = "0.6.13"
3
3
  end
data/localeapp.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "http://www.localeapp.com"
12
12
  s.summary = %q{Easy i18n translation management with localeapp.com}
13
13
  s.description = %q{Synchronizes i18n translation keys and content with localeapp.com so you don't have to manage translations by hand.}
14
+ s.license = 'MIT'
14
15
 
15
16
  s.rubyforge_project = "localeapp"
16
17
 
@@ -9,6 +9,14 @@ describe Localeapp::MissingTranslations, "#add(locale, key, description = nil, o
9
9
  translations[:en]['foo'].description.should == 'bar'
10
10
  translations[:en]['foo'].options.should == { :baz => 'bam' }
11
11
  end
12
+
13
+ it "respects I18n options when constructing a key" do
14
+ translations = Localeapp::MissingTranslations.new
15
+ translations.add(:en, 'foo', nil, { :scope => 'bar', :baz => 'bam' })
16
+
17
+ translations[:en].should include('bar.foo')
18
+ translations[:en]['bar.foo'].options.should == { :baz => 'bam' }
19
+ end
12
20
  end
13
21
 
14
22
  describe Localeapp::MissingTranslations, "#to_send" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localeapp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 12
10
- version: 0.6.12
9
+ - 13
10
+ version: 0.6.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christopher Dell
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-09-13 00:00:00 Z
19
+ date: 2013-10-04 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: i18n
@@ -292,8 +292,8 @@ files:
292
292
  - spec/support/localeapp_integration_data.rb
293
293
  - spec/support/localeapp_synchronization_data.rb
294
294
  homepage: http://www.localeapp.com
295
- licenses: []
296
-
295
+ licenses:
296
+ - MIT
297
297
  post_install_message:
298
298
  rdoc_options: []
299
299