Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) fix gettext rake tasks #180

Merged
merged 1 commit into from
Feb 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
begin
spec = Gem::Specification.find_by_name 'gettext-setup'
load "#{spec.gem_dir}/lib/tasks/gettext.rake"
locales_dir = File.absolute_path('locales', File.dirname(__FILE__))
locales_dir = File.absolute_path('locales', Dir.pwd )
# Initialization requires a valid locales directory
if File.exist? locales_dir
GettextSetup.initialize(locales_dir)
else
puts "No 'locales' directory found in #{File.dirname(__FILE__)}, skipping gettext initialization" if Rake.verbose == true
puts "No 'locales' directory found in #{ Dir.pwd }, skipping gettext initialization" if Rake.verbose == true
end
rescue Gem::LoadError
puts "No gettext-setup gem found, skipping gettext initialization" if Rake.verbose == true
Expand Down