Re: [libvirt PATCH 17/31] po: change the format of POTFILES.in

2020-07-09 Thread Ján Tomko

On a Thursday in 2020, Pavel Hrdina wrote:

There is no need to provide relative paths to the current directory if
we provide search paths using --directory option for xgentext.


xgettext



In addition it will make libvirt.pot file look cleaner as it will not
contain relative paths to current directory. It improves the situation
for developers which are using different build path as that would
change the relative path in libvirt.pot as well. After this patch
it will not happen anymore.

Signed-off-by: Pavel Hrdina 
---
build-aux/syntax-check.mk |   4 +-
po/Makefile.am|   6 +-
po/POTFILES.in| 726 +++---
3 files changed, 369 insertions(+), 367 deletions(-)



Reviewed-by: Ján Tomko 

Jano


signature.asc
Description: PGP signature


[libvirt PATCH 17/31] po: change the format of POTFILES.in

2020-07-02 Thread Pavel Hrdina
There is no need to provide relative paths to the current directory if
we provide search paths using --directory option for xgentext.

In addition it will make libvirt.pot file look cleaner as it will not
contain relative paths to current directory. It improves the situation
for developers which are using different build path as that would
change the relative path in libvirt.pot as well. After this patch
it will not happen anymore.

Signed-off-by: Pavel Hrdina 
---
 build-aux/syntax-check.mk |   4 +-
 po/Makefile.am|   6 +-
 po/POTFILES.in| 726 +++---
 3 files changed, 369 insertions(+), 367 deletions(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index d47a92b530f..bf229c42a74 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -1869,8 +1869,8 @@ sc_po_check: gen_source_files
  { $(VC_LIST_EXCEPT); echo $(generated_files); }   \
| xargs perl $(perl_translatable_files_list_)   \
| xargs $(GREP) -E -l '$(_gl_translatable_string_re)'   \
-   | $(SED) 's|^$(_dot_escaped_srcdir)|@SRCDIR@|'  \
-   | $(SED) 's|^$(_dot_escaped_builddir)|@BUILDDIR@|'  \
+   | $(SED) 's|^$(_dot_escaped_srcdir)/|@SRCDIR@|' \
+   | $(SED) 's|^$(_dot_escaped_builddir)/|@BUILDDIR@|' \
| sort -u > $@-2;   \
  diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; };   \
diff --git a/po/Makefile.am b/po/Makefile.am
index 95294aa12ed..f0698b455ba 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -7,8 +7,8 @@ LANGS := $(shell cat $(srcdir)/LINGUAS)
 POTFILES_IN = $(srcdir)/POTFILES.in
 POTFILES: $(POTFILES_IN)
$(AM_V_GEN) cat $(POTFILES_IN) | \
-   $(SED) 's|[@]SRCDIR[@]|$(top_srcdir)|' | \
-   $(SED) 's|[@]BUILDDIR[@]|$(top_builddir)|' > $@
+   $(SED) 's|[@]SRCDIR[@]||' | \
+   $(SED) 's|[@]BUILDDIR[@]||' > $@
 POTFILE_DEPS = $(shell cat POTFILES)
 POTFILE := $(DOMAIN).pot
 POFILES := $(LANGS:%=%.po)
@@ -32,6 +32,8 @@ XGETTEXT_ARGS = \
--package-name="$(PACKAGE_NAME)" \
--package-version="$(PACKAGE_VERSION)" \
--msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \
+   --directory="$(top_srcdir)" \
+   --directory="$(top_builddir)" \
--sort-output \
$(NULL)
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index af52054aa4e..b10008ae3d5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,363 +1,363 @@
-@BUILDDIR@/src/access/viraccessapicheck.c
-@BUILDDIR@/src/access/viraccessapichecklxc.c
-@BUILDDIR@/src/access/viraccessapicheckqemu.c
-@BUILDDIR@/src/admin/admin_client.h
-@BUILDDIR@/src/admin/admin_server_dispatch_stubs.h
-@BUILDDIR@/src/remote/remote_client_bodies.h
-@BUILDDIR@/src/remote/remote_daemon_dispatch_stubs.h
-@SRCDIR@/src/access/viraccessdriverpolkit.c
-@SRCDIR@/src/access/viraccessmanager.c
-@SRCDIR@/src/admin/admin_server.c
-@SRCDIR@/src/admin/admin_server_dispatch.c
-@SRCDIR@/src/admin/libvirt-admin.c
-@SRCDIR@/src/bhyve/bhyve_capabilities.c
-@SRCDIR@/src/bhyve/bhyve_command.c
-@SRCDIR@/src/bhyve/bhyve_device.c
-@SRCDIR@/src/bhyve/bhyve_domain.c
-@SRCDIR@/src/bhyve/bhyve_driver.c
-@SRCDIR@/src/bhyve/bhyve_monitor.c
-@SRCDIR@/src/bhyve/bhyve_parse_command.c
-@SRCDIR@/src/bhyve/bhyve_process.c
-@SRCDIR@/src/conf/backup_conf.c
-@SRCDIR@/src/conf/capabilities.c
-@SRCDIR@/src/conf/checkpoint_conf.c
-@SRCDIR@/src/conf/cpu_conf.c
-@SRCDIR@/src/conf/device_conf.c
-@SRCDIR@/src/conf/domain_addr.c
-@SRCDIR@/src/conf/domain_capabilities.c
-@SRCDIR@/src/conf/domain_conf.c
-@SRCDIR@/src/conf/domain_event.c
-@SRCDIR@/src/conf/interface_conf.c
-@SRCDIR@/src/conf/netdev_bandwidth_conf.c
-@SRCDIR@/src/conf/netdev_vlan_conf.c
-@SRCDIR@/src/conf/netdev_vport_profile_conf.c
-@SRCDIR@/src/conf/network_conf.c
-@SRCDIR@/src/conf/networkcommon_conf.c
-@SRCDIR@/src/conf/node_device_conf.c
-@SRCDIR@/src/conf/node_device_util.c
-@SRCDIR@/src/conf/numa_conf.c
-@SRCDIR@/src/conf/nwfilter_conf.c
-@SRCDIR@/src/conf/nwfilter_params.c
-@SRCDIR@/src/conf/object_event.c
-@SRCDIR@/src/conf/secret_conf.c
-@SRCDIR@/src/conf/snapshot_conf.c
-@SRCDIR@/src/conf/storage_adapter_conf.c
-@SRCDIR@/src/conf/storage_conf.c
-@SRCDIR@/src/conf/virchrdev.c
-@SRCDIR@/src/conf/virdomainmomentobjlist.c
-@SRCDIR@/src/conf/virdomainobjlist.c
-@SRCDIR@/src/conf/virnetworkobj.c
-@SRCDIR@/src/conf/virnetworkportdef.c
-@SRCDIR@/src/conf/virnodedeviceobj.c
-@SRCDIR@/src/conf/virnwfilterbindingdef.c
-@SRCDIR@/src/conf/virnwfilterbindingobj.c
-@SRCDIR@/src/conf/virnwfilterbindingobjlist.c
-@SRCDIR@/src/conf/virnwfilterobj.c
-@SRCDIR@/src/conf/virsavecookie.c
-@SRCDIR@/src/conf/virsecretobj.c
-@SRCDIR@/src/conf/virstorageobj.c
-@SRCDIR@/src/cpu/cpu.c
-@SRCDIR@/src/cpu/cpu_arm.c
-@SRCDIR@/src/cpu/cpu_map.c