Skip to content

Commit 13c4405

Browse files
ekohlchris1984
authored andcommitted
Sync locale Makefile from plugin template
1 parent 3bd67d6 commit 13c4405

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.tx/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ file_filter = locale/<lang>/foreman_virt_who_configure.edit.po
66
source_file = locale/foreman_virt_who_configure.pot
77
source_lang = en
88
type = PO
9-
minimum_perc = 50
9+
minimum_perc = 0
1010
resource_name = foreman_virt_who_configure

locale/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@ all-mo: $(MOFILES)
3131
cat $@
3232
! grep -q msgid $@
3333

34-
%.edit.po:
34+
%.edit.po: %.po.time_stamp
3535
touch $@
3636

37+
# gettext will trash the .edit.po file if the time stamp doesn't exist or is older than the po file
38+
%.po.time_stamp: %.po
39+
touch --reference $< $@
40+
41+
# Prevent make from treating this as an intermediate file to be cleaned up
42+
.PRECIOUS: %.po.time_stamp
43+
3744
check: $(POXFILES)
3845

3946
# Unify duplicate translations
@@ -43,7 +50,10 @@ uniq-po:
4350
done
4451

4552
tx-pull: $(EDITFILES)
46-
cd .. && tx pull -f --all
53+
# Initialize new languages
54+
cd .. && tx pull -f --all --minimum-perc 50
55+
# Force update all existing languages
56+
cd .. && tx pull -f --minimum-perc 0
4757
for f in $(EDITFILES) ; do \
4858
sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
4959
done

0 commit comments

Comments
 (0)