scripts: Use translations for guix.pot for service descriptions.

  • Done
  • quality assurance status badge
Details
2 participants
  • Julien Lepiller
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
pelzflorian (Florian Pelz)
Severity
normal

Debbugs page

pelzflorian (Florian Pelz) wrote 2 years ago
(address . guix-patches@gnu.org)
87leo6muf2.fsf@pelzflorian.de
Previously, service descriptions appeared in both guix.pot and
packages.pot, but only translations of packages.pot were used.
Now, translations are only done with guix.pot.

This is better, because translators are more likely to translate
guix.pot, and is also easier, because files in gnu/{home/,}services
need to be in po/guix/POTFILES.in anyway and po/guix/Makevars
already acts on the 'description' keyword because of lint checkers.

* guix/scripts/home.scm (service-type-description-string):
Use translations from guix.pot.
* guix/scripts/system/search.scm (service-type-description-string)
(service-type->recutils): Likewise.
* po/packages/POTFILES.in: Move files in gnu/services to ...
* po/guix/POTFILES.in: ... here.
---
P.S. I hope the subject line `scripts: …' is correct, instead of
`nls: …'.

guix/scripts/home.scm | 2 +-
guix/scripts/system/search.scm | 4 ++--
po/guix/POTFILES.in | 4 ++++
po/packages/POTFILES.in | 5 -----
4 files changed, 7 insertions(+), 8 deletions(-)

Toggle diff (71 lines)
diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index 754001a5b8..1c481ccf91 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -705,7 +705,7 @@ (define service-type-name*
(define (service-type-description-string type)
"Return the rendered and localised description of TYPE, a service type."
(and=> (service-type-description type)
- (compose texi->plain-text P_)))
+ (compose texi->plain-text G_)))
(define %service-type-metrics
;; Metrics used to estimate the relevance of a search result.
diff --git a/guix/scripts/system/search.scm b/guix/scripts/system/search.scm
index 44f00194cd..d978884518 100644
--- a/guix/scripts/system/search.scm
+++ b/guix/scripts/system/search.scm
@@ -127,7 +127,7 @@ (define highlighting*
(parameterize ((%text-width width*))
(texi->plain-text
(string-append "description: "
- (or (and=> (service-type-description type) P_)
+ (or (and=> (service-type-description type) G_)
""))))
#\newline)))))
@@ -144,7 +144,7 @@ (define highlighting*
(define (service-type-description-string type)
"Return the rendered and localised description of TYPE, a service type."
(and=> (service-type-description type)
- (compose texi->plain-text P_)))
+ (compose texi->plain-text G_)))
(define %service-type-metrics
;; Metrics used to estimate the relevance of a search result.
diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in
index 228ce04240..7009fc756c 100644
--- a/po/guix/POTFILES.in
+++ b/po/guix/POTFILES.in
@@ -4,10 +4,14 @@ gnu.scm
gnu/packages.scm
gnu/services.scm
gnu/system.scm
+gnu/services/base.scm
+gnu/services/certbot.scm
gnu/services/configuration.scm
+gnu/services/file-sharing.scm
gnu/services/networking.scm
gnu/services/shepherd.scm
gnu/services/samba.scm
+gnu/services/version-control.scm
gnu/home/services.scm
gnu/home/services/ssh.scm
gnu/home/services/symlink-manager.scm
diff --git a/po/packages/POTFILES.in b/po/packages/POTFILES.in
index 398f9adfdf..32d34d6456 100644
--- a/po/packages/POTFILES.in
+++ b/po/packages/POTFILES.in
@@ -57,8 +57,3 @@ gnu/packages/webkit.scm
gnu/packages/web.scm
gnu/packages/wordnet.scm
gnu/packages/xiph.scm
-gnu/services/base.scm
-gnu/services/certbot.scm
-gnu/services/file-sharing.scm
-gnu/services/networking.scm
-gnu/services/version-control.scm

base-commit: bb04b5e0ceb606c8d33d53bf06f7fc8855a2c56b
--
2.38.0
pelzflorian (Florian Pelz) wrote 2 years ago
(address . 59392@debbugs.gnu.org)
8735adn5ls.fsf@pelzflorian.de
Forgot to put translation team in Cc.

No change to Julien’s proxy repository guix-translations.git is needed
as far as I can tell.

Regards,
Florian
Julien Lepiller wrote 2 years ago
Re: [bug#59392] scripts: Use translation s for guix.pot for service descriptions.
(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)
3835A7B2-E367-42EA-82C0-186A3E5BD905@lepiller.eu
LGTM :)

Le 20 novembre 2022 14:00:15 GMT+01:00, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> a écrit :
Toggle quote (7 lines)
>Forgot to put translation team in Cc.
>
>No change to Julien’s proxy repository guix-translations.git is needed
>as far as I can tell.
>
>Regards,
>Florian
Attachment: file
pelzflorian (Florian Pelz) wrote 2 years ago
Re: [bug#59392] scripts: Use translations for guix.pot for service descriptions.
(name . Julien Lepiller)(address . julien@lepiller.eu)
878rk5acia.fsf@pelzflorian.de
Julien Lepiller <julien@lepiller.eu> writes:
Toggle quote (2 lines)
> LGTM :)

Thank you! Pushed as da6c6763fa72585a1df3021781f8d33c3b64dcc8.
Closing.

Regards,
Florian
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 59392@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 59392
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help