diff --git a/.tx/config b/.tx/config index a5bb4b54..11a2f2b9 100644 --- a/.tx/config +++ b/.tx/config @@ -6,5 +6,5 @@ file_filter = locale//foreman_puppet.edit.po source_file = locale/foreman_puppet.pot source_lang = en type = PO -minimum_perc = 0 +minimum_perc = 50 resource_name = foreman_puppet diff --git a/locale/Makefile b/locale/Makefile index 9336b6cc..79d0b173 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -6,8 +6,8 @@ # make tx-update - download and merge translations from Transifex # make clean - clean everything # -DOMAIN = foreman_puppet -VERSION = $(shell ruby -e 'require "rubygems";spec = Gem::Specification::load(Dir.glob("../*.gemspec")[0]);puts spec.version') +DOMAIN = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).name') +VERSION = $(shell ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("../*.gemspec")[0]).version') POTFILE = $(DOMAIN).pot MOFILE = $(DOMAIN).mo POFILES = $(shell find . -name '$(DOMAIN).po') @@ -43,7 +43,7 @@ uniq-po: done tx-pull: $(EDITFILES) - cd .. && tx pull -f + cd .. && tx pull -f --all for f in $(EDITFILES) ; do \ sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \ done