Skip to content

Commit

Permalink
Merge pull request #331 from DavidS/drop-i18n
Browse files Browse the repository at this point in the history
Remove i18n/gettext task
  • Loading branch information
pmcmaw authored Feb 9, 2021
2 parents 7579a28 + f98ccc0 commit 77748b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,29 +345,6 @@
end
end

module_dir = Dir.pwd
locales_dir = File.absolute_path('locales', module_dir)
# if the task is allowed to run when the module does not have a locales directory,
# the task is run in the puppet gem instead and creates a POT there.
puts 'gettext-setup tasks will only be loaded if the locales/ directory is present' if Rake.verbose == true
if File.exist? locales_dir
begin
spec = Gem::Specification.find_by_name 'gettext-setup'
load "#{spec.gem_dir}/lib/tasks/gettext.rake"
# Initialization requires a valid locales directory
GettextSetup.initialize(locales_dir)
namespace :module do
desc 'Runs all tasks to build a modules POT file for internationalization'
task :pot_gen do
Rake::Task['gettext:pot'].invoke
Rake::Task['gettext:metadata_pot'].invoke("#{module_dir}/metadata.json")
end
end
rescue Gem::LoadError
puts 'No gettext-setup gem found, skipping GettextSetup config initialization' if Rake.verbose == true
end
end

def create_gch_task(changelog_user = nil, changelog_project = nil, changelog_since_tag = nil, changelog_tag_pattern = 'v%s')
if Bundler.rubygems.find_name('github_changelog_generator').any?
# needed a place to hide these methods
Expand Down
1 change: 0 additions & 1 deletion puppetlabs_spec_helper.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'bundler'
spec.add_development_dependency 'fakefs', ['>= 0.13.3', '< 2']
spec.add_development_dependency 'gettext-setup', '~> 0.29'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'puppet'
spec.add_development_dependency 'rake', ['>= 10.0', '< 14']
Expand Down

0 comments on commit 77748b8

Please sign in to comment.