-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1144 from ferrisoxide/fix-1102
Support for hash arguments in i18n. Fixes #1102
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
# Copyright (c) 2008-2013 Michael Dvorkin and contributors. | ||
# | ||
# Fat Free CRM is freely distributable under the terms of MIT license. | ||
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php | ||
#------------------------------------------------------------------------------ | ||
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') | ||
|
||
describe 'I18n.t()' do | ||
|
||
class TestController < ActionController::Base | ||
include FatFreeCRM::I18n | ||
end | ||
|
||
let(:entity_string) { 'entities' } | ||
let(:hidden_count) { 10 } | ||
let(:test_controller) { TestController.new } | ||
|
||
it 'should translate hash arguments' do | ||
expect(test_controller.t(:not_showing_hidden_entities, entity: entity_string, count: hidden_count)) | ||
.to eq("Not showing 10 hidden entities.") | ||
end | ||
end |