public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-i18n] makefile: Set locale for sort
@ 2025-07-23  9:06 Maximiliano Sandoval
  0 siblings, 0 replies; only message in thread
From: Maximiliano Sandoval @ 2025-07-23  9:06 UTC (permalink / raw)
  To: pve-devel

This should make it so that the output from `make update` is stable
across different machines.

From sort(1):

    *** WARNING *** The locale specified by the environment affects sort
    order. Set LC_ALL=C to get the traditional sort order that uses
    native byte values.

LC_COLLATE is a version of LC_ALL which only affects collation.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---

With this patch:
    $ make update && git diff --stat
    ...
    36 files changed, 21133 insertions(+), 17192 deletions(-)

Before:
    $ make update && git diff --stat
    ...
    37 files changed, 13049 insertions(+), 8773 deletions(-)

The last `make update` was run with the en_US.UTF-8 locale, hence switching to
the C locale creates a bigger diff.



 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 34859f5..731fa6e 100644
--- a/Makefile
+++ b/Makefile
@@ -103,7 +103,7 @@ pbs-lang-%.js: %.po
 # parameter 1 is the name
 # parameter 2 is the directory
 define potupdate
-	find . -name "*.js" -path "./$(2)*" | sort | xargs xgettext \
+	find . -name "*.js" -path "./$(2)*" | LC_COLLATE=C sort | xargs xgettext \
       --sort-output \
       --add-comments="TRANSLATORS" \
       --from-code="UTF-8" \
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-23  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-23  9:06 [pve-devel] [PATCH proxmox-i18n] makefile: Set locale for sort Maximiliano Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal