Re: [PATCH v2 0/9] Incremental po/git.pot update and new l10n workflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 19 2022, Jiang Xin wrote:

> From: Jiang Xin <zhiyou.jx@xxxxxxxxxxxxxxx>
>
> A workflow change for translators are being proposed.
>
> Changes since v1:
>
> * Patch 4/9: When running "make check-pot", do not update "po/git.pot".
> * Patch 6/9: reword: the removal of "po/git.pot" is in preceding commit.
> * Patch 7/9 and 8/9: Add new funciton "check_po_file_envvar" for reuse in both
>   po-update and po-init targets.

Thanks a lot for picking this up. I left some detailed comments on
individual commits.

My own latest WIP version of an approximation of this topic was
https://github.com/avar/git/tree/avar/Makefile-incremental-po-git-pot-rule,
which is what I used for some of the range-diffs.

(I think the first E-Mail I sent had a range-diff against the latest
version I found in your fork, but I found that was probably the v1
version, but I think those comments applied to your v2 (which I read
on-list))

Aside from differences already noted I spotted that your "make pot" ends
up with a po/git.pot that has a header, but I omitted it in
mine. Perhaps that explains some of the headers in 8/9? I.e. we don't
need the header on po/git.pot, perhaps that explains the difference
noted in my comment in 8/9?

Also: shouldn't "make clean" remove the generated po/git.pot and
po/git-core.pot? I see you added it to "distclean", maybe that's better
(or maybe that's from a version of mine...).

Just from some last minute testing I think you want this squashed in
(and move that "sed" to the "init" and/or "update" of the individual
po/XX.po files):
	
	diff --git a/Makefile b/Makefile
	index 65a7558261a..57db37db556 100644
	--- a/Makefile
	+++ b/Makefile
	@@ -2778,14 +2778,7 @@ $(LOCALIZED_PERL_GEN_PO): .build/pot/po/%.po: %
	 	$(QUIET_XGETTEXT)$(XGETTEXT) --omit-header \
	 		-o$@ $(XGETTEXT_FLAGS_PERL) $<
	 
	-.build/pot/git.header: $(LOCALIZED_ALL_GEN_PO)
	-	$(call mkdir_p_parent_template)
	-	$(QUIET_XGETTEXT)$(XGETTEXT) $(XGETTEXT_FLAGS_C) \
	-		-o - /dev/null | \
	-	sed -e 's|charset=CHARSET|charset=UTF-8|g' >$@ && \
	-	echo '"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n"' >>$@
	-
	-po/git.pot: .build/pot/git.header $(LOCALIZED_ALL_GEN_PO)
	+po/git.pot: $(LOCALIZED_ALL_GEN_PO)
	 	$(QUIET_GEN)$(MSGCAT) $(MSGCAT_FLAGS) $^ >$@
	 
	 .PHONY: pot

I.e. we can just msgcat po/git.pot without the header. For both
"po-init" and "po-update" that seems to do the right thing for me...



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux