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
Message #100 received at 32026 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure.
> (all-mozilla-locales): Comment how to proceed to update it.
[...]
> +(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))))
Thanks very much for this! I didn't know about the
browser/locales/l10n-changesets.json file, and neither does the code in
the upstream 'makeicecat' script, which simply uses "hg clone" to fetch
the latest revisions at the time the 'makeicecat' script is run. Now we
can change that code to use the revisions listed in
'l10n-changesets.json' instead, and thus eliminate a source of
nondeterminism for non-Guix users of IceCat.
However, I'd like to propose a different way to make use of this code.
Instead of adding this new toplevel procedure that must be run manually,
which involves steering the user toward the 'upstream-firefox-source'
variable (which therefore must be promoted to a toplevel binding), all
of which makes me extremely uncomfortable, how about the following:
I propose adding a check to the code that populates the l10n directory
in 'icecat-source'. That code has access to the unpacked firefox source
directory, and already makes use of '#+all-mozilla-locales'. It's in a
perfect position to check whether '#+all-mozilla-locales' is up-to-date
w.r.t. browser/locales/l10n-changesets.json.
My suggestion would be this: if '#+all-mozilla-locales' is not
up-to-date, print an error report with the relevant information and
force the derivation to *fail*.
What do you think? If the idea sounds good to you, would you like to
work on it, or should I?
Thanks again for your work on this!
Regards,
Mark
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.