From 25b61a2a2bc67070dd65ec9fcd81ada3b282fc83 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 28 Nov 2023 18:16:33 +0100 Subject: [PATCH] Sync locale Makefile from plugin template --- .tx/config | 2 +- locale/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.tx/config b/.tx/config index 79710c9f9..289cfeb40 100644 --- a/.tx/config +++ b/.tx/config @@ -6,5 +6,5 @@ file_filter = locale//foreman_ansible.edit.po source_file = locale/foreman_ansible.pot source_lang = en type = PO -minimum_perc = 0 +minimum_perc = 50 resource_name = foreman_ansible diff --git a/locale/Makefile b/locale/Makefile index b9ce84ce5..79d0b1730 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_ansible -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