Skip to content

Commit

Permalink
Sync locale Makefile from plugin template
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Nov 28, 2023
1 parent 7f145cb commit 14e11c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[main]
host = https://www.transifex.com
host = https://app.transifex.com

[o:foreman:p:foreman:r:foreman_templates]
file_filter = locale/<lang>/foreman_templates.edit.po
source_file = locale/foreman_templates.pot
source_lang = en
type = PO
minimum_perc = 0
minimum_perc = 50
resource_name = foreman_templates
6 changes: 3 additions & 3 deletions locale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# make tx-update - download and merge translations from Transifex
# make clean - clean everything
#
DOMAIN = foreman_templates
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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14e11c7

Please sign in to comment.