GNU bug report logs -
#32026
IceCat locales are missing?
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Sun, 1 Jul 2018 20:24:02 UTC
Severity: normal
Merged with 25504
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* 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
This bug report was last modified 2 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.