From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oKWlCm1572PT3QAAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 13:56:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kEHKCW1572M6YwEAG6o9tA (envelope-from ) for ; Fri, 17 Feb 2023 13:56:13 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B2F072A0E7 for ; Fri, 17 Feb 2023 13:56:12 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=dP6utnY0; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676638572; a=rsa-sha256; cv=none; b=BHmqxp5I7E2B7i1fqLlytD3OzbXGBfKHsqv2kBWPW+h9D8wkZinLtJjQwHXPsd1/MP+U5y sFdN9fwu5jMcOav4P3AyuZhJUCcjZdObVWvj2XEWdqdcoAqh4nSJ+QiYm7SYAJCz8moEHt b0N473fX2LIAzuQw3Wcyni5DyGrrRgxleenVIS4SQ8MtSXI1cQNZ6XIUynBcNsGvFa/sf2 38OoQicbmb1t6DOuTmrbq4NP1l07mCWwyTsvttUmkZDdaB3GBLcrr6QweHDiGlDUvdfVV9 ovEV/OTBfmFjgd1HYBldMeCwKowiS9+1p3ZqXvshJYOOe28vzslYyaU/xMAt/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=dP6utnY0; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676638572; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ibDeIU516qvwMddnyWXSw6Tn/EjcKZT78iIHokF92Kg=; b=nQEIeNEIvalttv3Oa/6HZnbPYl4unrYtk23A+U+Cwl3ivqOfohIy/tbV2xyGh5W17CfUDn ahZxyjeBYz0cwwazwo9vXF4sKVAsPhCNsH4jjiNDDe5piooXf+sUYz1P+s4p3q9gB38//6 dWKJg7Q++pKIUUF2i1sZbQ7saIioCkbRgx0JZvfm2cWRa4fP3dL4iDWCNPd5f5ZP4PjhqD BwjnO00vy4vBzvoXinSMDFLn5vEiH/mXoUEwmFGS+8quhnrr1EZFb4D04fgpje+dgd71CX nXYpdG67otpF5N8zrjBh5eNicXnSbsXTZugtmUU3ejiYFtfBZdVWcMwFQ7HNpg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT0HV-0001t5-NF; Fri, 17 Feb 2023 07:56:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT0HT-0001sK-5n for bug-guix@gnu.org; Fri, 17 Feb 2023 07:56:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT0HS-0007dz-Rr for bug-guix@gnu.org; Fri, 17 Feb 2023 07:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT0HS-0001pq-EL for bug-guix@gnu.org; Fri, 17 Feb 2023 07:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH v3 01/11] gnu: Add a 'update-mozilla-locales' helper for maintenance. References: <87po06puwt.fsf@gnu.org> In-Reply-To: <87po06puwt.fsf@gnu.org> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Feb 2023 12:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32026 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 32026@debbugs.gnu.org Cc: mhw@netris.org, ludo@gnu.org, Jonathan Brielmaier , Maxim Cournoyer Received: via spool by 32026-submit@debbugs.gnu.org id=B32026.16766385566996 (code B ref 32026); Fri, 17 Feb 2023 12:56:02 +0000 Received: (at 32026) by debbugs.gnu.org; 17 Feb 2023 12:55:56 +0000 Received: from localhost ([127.0.0.1]:38762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT0HM-0001om-1Y for submit@debbugs.gnu.org; Fri, 17 Feb 2023 07:55:56 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:39667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT0HK-0001oU-A7 for 32026@debbugs.gnu.org; Fri, 17 Feb 2023 07:55:54 -0500 Received: by mail-qt1-f176.google.com with SMTP id e26so759877qtq.6 for <32026@debbugs.gnu.org>; Fri, 17 Feb 2023 04:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NigxFZDorP6MbY1JXdKfz0N12UW1oVSo4f2LrPMiQzA=; b=dP6utnY0ry95uY3ALehHclyYld856icBEMwgaWnzl/OBrCrDioXvfgXMKLwTtmiAug F/Vu3LBeqkUgkIBhxxYym14lGveKxVLAlwwjxq023HgUJu4BWIU/p+l5X6PnQBnlgiLK uCYqReUEuRsPr/yxAqNaWwiSzDUxqpAhMluLGY6SKIE+8mFlBIZa3RWUM5F9DUVM6ckG jLKU2HjtYNniqpYmPgbMzAxiqDZjp5L3xklq2XzBllnnZeErt0T23fTqT0Jyh11W/WIV 5PnSu+/ioWkcadNltdOSYvMC5TLqIkup7BwB4BjPSge0CCSs1zy1hAwRH4qamb11rVjB kzew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NigxFZDorP6MbY1JXdKfz0N12UW1oVSo4f2LrPMiQzA=; b=KVywKIDUVx3fgpW25gWYkrQMBmn+QPPbNHbkrY7vsgO98XzjmM5CQhv+VIiG0zl4XD qBpzaMGztOwIecM2EzhYfdx4sUh5TAky4bWTI10Vlte/0noVE5I8srFhqJPfHDUdI/Uj GJ+c/QLisbRdEoh6GzMLEz9HbKk/rKg88Wi97iDIeYFHXGEmkYimpsBAA6ypikr0Fsl/ 4QB4sKcYBr/9/ecr/fApiMOx/Q9TVyKXLLqzYrvSJxD6bGek/hmY6E+H/2gWXkqmqjma s/dY/3KX6VNsptfb4pHxZG+PllhbpD7VsseRVhrL3w68O79Wy+KW+qqQA0qnZ3/rWyvF WozQ== X-Gm-Message-State: AO0yUKX67av8VL6z3pxIjrE7nBSS6zNYuUA0iDc30NA8+PyYqFG815hh ce0950C8nedWFef67IJxrSlhG88nfIkqpkTn X-Google-Smtp-Source: AK7set/RJBgwiHDWPbqvrLplMx3RcJbSgZA8jmKYd7vJCmFtNZmExueh+wD1JVZ7OTRyCUZt9moU8Q== X-Received: by 2002:ac8:5cd1:0:b0:3b8:6833:3ad2 with SMTP id s17-20020ac85cd1000000b003b868333ad2mr145098qta.65.1676638548492; Fri, 17 Feb 2023 04:55:48 -0800 (PST) Received: from localhost.localdomain (dsl-157-123.b2b2c.ca. [66.158.157.123]) by smtp.gmail.com with ESMTPSA id f17-20020ac80691000000b003b9b48cdbe8sm3176026qth.58.2023.02.17.04.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 04:55:48 -0800 (PST) From: Maxim Cournoyer Date: Fri, 17 Feb 2023 07:55:28 -0500 Message-Id: <20230217125539.24467-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: B2F072A0E7 X-Spam-Score: -0.53 X-Migadu-Spam-Score: -0.53 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: 2AmN+bAsuK/+ * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. (all-mozilla-locales): Comment how to proceed to update it. --- (no changes since v1) gnu/packages/gnuzilla.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b2e0870fea..2011555d47 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -37,6 +37,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) @@ -91,7 +92,8 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages xiph) #:use-module (gnu packages xdisorg) #:use-module (gnu packages readline) - #:use-module (gnu packages sqlite)) + #:use-module (gnu packages sqlite) + #:autoload (json parser) (json->scm)) (define-public mozjs (package @@ -348,6 +350,10 @@ (define-public mozjs-78 (inputs (list icu4c readline zlib)))) + +;;; +;;; Localization helper procedures. +;;; (define mozilla-compare-locales (origin (method hg-fetch) @@ -371,6 +377,27 @@ (define-syntax-rule (mozilla-locales (hash-string changeset locale) ...) (list (mozilla-locale locale changeset hash-string) ...)) +(define (update-mozilla-locales changesets.json) + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES +variable defined bellow. It requires guile-json to be installed." + ;; To extract the file used as argument, do: + ;; tar -xf $(./pre-inst-env guix build \ + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ + ;; --strip-components=3 \ + ;; --wildcards '*/browser/locales/l10n-changesets.json' + (match (call-with-input-file changesets.json json->scm) + (((lang ("revision" . revision) platforms pin) ...) + (let ((data (reverse (map (lambda (rev lang) + `(,(list->string (make-list 40 #\0)) + ,(string-take rev 12) ,lang)) + revision lang)))) + (format #t "~{~s~%~}" data) + data)))) + +;;; This list must be maintained by hand by comparing with the entries in the +;;; browser/locales/l10n-changesets.json file in the Firefox source (see the +;;; 'update-mozilla-locales' procedure above which aims to make this a bit +;;; easier). (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale base-commit: 23d56ba150ddeaa58e96b3ecf9df251fbd05ed00 -- 2.39.1