mirror of
https://github.com/tomgi/git_stats.git
synced 2024-09-28 11:41:29 +02:00
i18n added
This commit is contained in:
parent
9acd9cbfe9
commit
26d2df4e0a
2
config/locales/en.yml
Normal file
2
config/locales/en.yml
Normal file
@ -0,0 +1,2 @@
|
||||
en:
|
||||
project_name: Project name
|
@ -23,6 +23,7 @@ Gem::Specification.new do |gem|
|
||||
gem.add_dependency('haml')
|
||||
gem.add_dependency('launchy')
|
||||
gem.add_dependency('lazy_high_charts')
|
||||
gem.add_dependency('i18n')
|
||||
|
||||
gem.add_development_dependency('rake')
|
||||
gem.add_development_dependency('pry')
|
||||
|
@ -8,4 +8,5 @@ require 'fileutils'
|
||||
require 'tilt'
|
||||
require 'lazy_high_charts'
|
||||
require 'launchy'
|
||||
require 'i18n'
|
||||
Dir['lib/**/*.rb'].each { |r| require File.expand_path(r) }
|
5
lib/git_stats/core_extensions/symbol.rb
Normal file
5
lib/git_stats/core_extensions/symbol.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class Symbol
|
||||
def t
|
||||
I18n.t self
|
||||
end
|
||||
end
|
1
lib/git_stats/i18n.rb
Normal file
1
lib/git_stats/i18n.rb
Normal file
@ -0,0 +1 @@
|
||||
I18n.load_path += Dir['config/locales/*.yml']
|
@ -1,6 +1,6 @@
|
||||
%table{:class => "table table-hover table-bordered"}
|
||||
%tr
|
||||
%td Project name
|
||||
%td= :project_name.t
|
||||
%td= repo.project_name
|
||||
%tr
|
||||
%td Project version
|
||||
|
Loading…
Reference in New Issue
Block a user