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

Sync locale Makefile from plugin template #179

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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