Message ID | 87zhg1efld.fsf@gnu.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#38436] gnu: Add gfortran-toolchain | expand |
Hi Ludo, > There’s this weird requirement that for the sake of i18n, we must not > construct synopses/descriptions like this: > > https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html Is that a specific rule for Guix? GNU gettext allows format strings, and its manual refers to https://people.csail.mit.edu/jaffer/slib/Format-Specification.html for format string syntax in Scheme. For Guile specifically, it refers to (ice-9 format). Cheers, Konrad
Hi, Konrad Hinsen <konrad.hinsen@fastmail.net> skribis: >> There’s this weird requirement that for the sake of i18n, we must not >> construct synopses/descriptions like this: >> >> https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html > > Is that a specific rule for Guix? Specific to the ‘guix-package’ domain, even. Concretely, the idea is that <package> objects carry the untranslated English-language synopsis and description. This is useful for things like ‘guix search’ or for web page generators, because they can query translation explicitly when they need it. We could allow constructed strings in there, like this: (package ;; … (synopsis (format #f (G_ "This is a ~a compiler") "C"))) But in that case, we’d have to perform translation right in the ‘G_’ call, and thus <package> would end up carrying a translated string. So far we’ve managed to avoid that, it’s a constraint, but hopefully one we can live with. I hope that makes sense! Ludo’.
Hi Ludo, >> Is that a specific rule for Guix? > > Specific to the ‘guix-package’ domain, even. Thanks for the explanation! That all makes sense, it's just not very obvious. I'll send a revised patch in which all synopses and descriptions are literal string. Cheers, Konrad.
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 68030376fc..00de771bc4 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2523,8 +2523,12 @@ COREUTILS-FINAL vs. COREUTILS, etc." ;; (define-public gcc-glibc-2.27-toolchain ;; (make-gcc-toolchain gcc glibc-2.27)) -(define* (make-gcc-toolchain gcc +(define* (make-gcc-toolchain language gcc #:optional + ;; Note: Keep the synopsis literal string here so + ;; that xgettext "sees" it. + (synopsis + "Complete GCC tool chain for C/C++ development") (libc #f)) "Return a complete toolchain for GCC. If LIBC is specified, target that libc." (let ((gcc (if libc (make-gcc-libc gcc libc) gcc)) @@ -2559,7 +2563,7 @@ COREUTILS-FINAL vs. COREUTILS, etc." (search-paths (package-search-paths gcc)) (license (package-license gcc)) - (synopsis "Complete GCC tool chain for C/C++ development") + (synopsis synopsis) (description "This package provides a complete GCC tool chain for C/C++ development to be installed in user profiles. This includes GCC, as well as libc (headers