Просмотр исходного кода

Use --add-location=file for po/ and doc/po

This avoids churn in the po/pot files when just the location line
number in the source code changes.

Git-Dch: ignore
Michael Vogt лет назад: 10
Родитель
Сommit
9a2902305b
2 измененных файлов с 6 добавлено и 2 удалено
  1. 4 0
      doc/makefile
  2. 2 2
      po/makefile

+ 4 - 0
doc/makefile

@@ -61,12 +61,15 @@ po4a: manpages/subdirs docbook/subdirs
 
 update-po:
 	po4a --previous --no-backups --force --no-translations \
+		--msgmerge-opt --add-location=file \
+		--porefs noline,wrap \
 		--package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 		--msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
 
 manpages/subdirs: $(MANPAGEPOLIST)
 $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf
 	po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
+		--msgmerge-opt --add-location=file \
 		$(patsubst %,--translate-only $(dir $<)%,$(patsubst %.1.xml,%.$(subst /,,$(dir $<)).1.xml,$(wildcard *.1.xml))) \
 		$(patsubst %,--translate-only $(dir $<)%,$(patsubst %.2.xml,%.$(subst /,,$(dir $<)).2.xml,$(wildcard *.2.xml))) \
 		$(patsubst %,--translate-only $(dir $<)%,$(patsubst %.3.xml,%.$(subst /,,$(dir $<)).3.xml,$(wildcard *.3.xml))) \
@@ -81,6 +84,7 @@ $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf
 docbook/subdirs: $(DOCBOOKPOLIST)
 $(DOCBOOKPOLIST) :: docbook-translation-% : %/makefile po4a.conf
 	po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
+		--msgmerge-opt --add-location=file \
 		$(patsubst %,--translate-only $(dir $<)%,$(patsubst %.dbk,%.$(subst /,,$(dir $<)).dbk,$(wildcard *.dbk))) \
 		--package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 		--msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf

+ 2 - 2
po/makefile

@@ -40,7 +40,7 @@ $(POTFILES) : $(PO)/%.pot :
 	cat $(PO)/domains/$*/*.srclist | sort > $(PO)/POTFILES_$*.in
 	$(XGETTEXT) --default-domain=$* --directory=$(BASE) \
 	  --add-comments --foreign --keyword=_ --keyword=N_ \
-          --no-location \
+          --add-location=file \
 	  --keyword=P_:1,2 \
 	  --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot.tmp
 	cmp --silent $(PO)/domains/$*/c.pot.tmp $(PO)/domains/$*/c.pot || \
@@ -59,7 +59,7 @@ $(POTFILES) : $(PO)/%.pot :
 $(LANG_POFILES) : $(PO_DOMAINS)/%.po : $(POTFILES)
 	printf "%s " "Generating $@"
 	echo $@ : $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot > $(PO)/$(call GETDOMAIN,$*)_$(notdir $@).d
-	$(MSGMERGE) --no-location $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot -o $@
+	$(MSGMERGE) --add-location=file $(notdir $@) $(PO)/$(call GETDOMAIN,$*).pot -o $@
 
 $(MOFILES) : $(PO_DOMAINS)/%.mo : $(PO_DOMAINS)/%.po
 	printf "%s: " "Generating $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo"