guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 16/32: support: 'l10n' accepts plural forms.


From: Ludovic Courtès
Subject: [shepherd] 16/32: support: 'l10n' accepts plural forms.
Date: Wed, 30 Mar 2022 11:01:30 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit 3dabd8ad2dfa3b2122e1aa812fdea763c22b1cb4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 28 20:46:29 2022 +0200

    support: 'l10n' accepts plural forms.
    
    * modules/shepherd/support.scm (l10n): Turn into a macro.
---
 modules/shepherd/support.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index 67bde32..6595724 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -207,7 +207,10 @@ output port, and PROC's result is returned."
   (setvbuf (current-error-port) (buffering-mode line)))
 
 ;; Localized version of STR.
-(define l10n gettext)
+(define-syntax l10n
+  (syntax-rules ()
+    ((_ str) (gettext str))
+    ((_ singular plural n) (ngettext singular plural n))))
 
 ;; Display some text and a newline.
 (define-syntax-rule (local-output format-string args ...)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]