GNU bug report logs - #53711
[PATCH 1/1] home: services: import i18n module.

Previous Next

Package: guix-patches;

Reported by: Jaming <jaming <at> protonmail.com>

Date: Tue, 1 Feb 2022 20:39:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53711 in the body.
You can then email your comments to 53711 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53711; Package guix-patches. (Tue, 01 Feb 2022 20:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jaming <jaming <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 01 Feb 2022 20:39:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jaming <jaming <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH 1/1] home: services: import i18n module.
Date: Tue, 01 Feb 2022 20:25:37 +0000
From 713a7002c63ad86c36b03656cdd3ec9e350e7480 Mon Sep 17 00:00:00 2001
From: Justin Martin <jaming <at> protonmail.com>
Date: Tue, 1 Feb 2022 14:48:35 -0500
Subject: [PATCH 1/1] home: services: import i18n module.

* gnu/home/services.scm (%initialize-gettext): remove setlocale for guile scripts.
(compute-on-first-login-script): add module import for i18n.
(compute-on-change-gexp): add module import for i18n.
---
 gnu/home/services.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 1c860d7b01..b7ea6f08dd 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -30,6 +30,7 @@ (define-module (gnu home services)
   #:use-module (guix discovery)
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
+  #:use-module (guix modules)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)

@@ -282,13 +283,13 @@ (define %initialize-gettext
   #~(begin
       (bindtextdomain %gettext-domain
                       (string-append #$guix "/share/locale"))
-      (textdomain %gettext-domain)
-      (setlocale LC_ALL "")))
+      (textdomain %gettext-domain)))

 (define (compute-on-first-login-script _ gexps)
   (program-file
    "on-first-login"
-   #~(begin
+   (with-imported-modules (source-module-closure '((guix i18n)))
+     #~(begin
        (use-modules (guix i18n))
        #$%initialize-gettext

@@ -309,7 +310,7 @@ (define (compute-on-first-login-script _ gexps)
              (display (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script
 won't execute anything.  You can check if xdg runtime directory exists,
 XDG_RUNTIME_DIR variable is set to appropriate value and manually execute the
-script by running '$HOME/.guix-home/on-first-login'")))))))
+script by running '$HOME/.guix-home/on-first-login'"))))))))

 (define (on-first-login-script-entry on-first-login)
   "Return, as a monadic value, an entry for the on-first-login script
@@ -401,7 +402,8 @@ (define home-activation-service-type
 ;;;

 (define (compute-on-change-gexp eval-gexps? pattern-gexp-tuples)
-  #~(begin
+  (with-imported-modules (source-module-closure '((guix i18n)))
+    #~(begin
       (use-modules (guix i18n))

       #$%initialize-gettext
@@ -486,7 +488,7 @@ (define expressions-to-eval
             (display (G_ "On-change gexps evaluation finished.\n\n")))
           (display "\
 On-change gexps won't be evaluated; evaluation has been disabled in the
-service configuration"))))
+service configuration")))))

 (define home-run-on-change-service-type
   (service-type (name 'home-run-on-change)
--
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53711; Package guix-patches. (Tue, 01 Feb 2022 21:20:01 GMT) Full text and rfc822 format available.

Message #8 received at 53711 <at> debbugs.gnu.org (full text, mbox):

From: Jaming <jaming <at> protonmail.com>
To: "53711 <at> debbugs.gnu.org" <53711 <at> debbugs.gnu.org>
Subject: Related Issues
Date: Tue, 01 Feb 2022 21:19:10 +0000
The previous patch relates to the issues:

https://issues.guix.gnu.org/53701
https://issues.guix.gnu.org/53621




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 04 Feb 2022 21:51:02 GMT) Full text and rfc822 format available.

Notification sent to Jaming <jaming <at> protonmail.com>:
bug acknowledged by developer. (Fri, 04 Feb 2022 21:51:02 GMT) Full text and rfc822 format available.

Message #13 received at 53711-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jaming <jaming <at> protonmail.com>
Cc: 53711-done <at> debbugs.gnu.org
Subject: Re: bug#53711: [PATCH 1/1] home: services: import i18n module.
Date: Fri, 04 Feb 2022 22:50:22 +0100
Hi,

Jaming <jaming <at> protonmail.com> skribis:

>>From 713a7002c63ad86c36b03656cdd3ec9e350e7480 Mon Sep 17 00:00:00 2001
> From: Justin Martin <jaming <at> protonmail.com>
> Date: Tue, 1 Feb 2022 14:48:35 -0500
> Subject: [PATCH 1/1] home: services: import i18n module.
>
> * gnu/home/services.scm (%initialize-gettext): remove setlocale for guile scripts.
> (compute-on-first-login-script): add module import for i18n.
> (compute-on-change-gexp): add module import for i18n.

I added a “Fixes” line referencing the bug and committed it.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Mar 2022 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.