doc: Explain why synopses/descriptions must be literal strings.

Suggested by Dave Love <fx@gnu.org>.

* doc/guix.texi (Synopses and Descriptions): Recommend literal strings.
master
Ludovic Courtès 2017-10-03 14:48:09 +02:00
parent df71c88c3a
commit e797e94bf5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 12 additions and 0 deletions

View File

@ -19147,6 +19147,18 @@ Translation Project} so that as many users as possible can read them in
their native language. User interfaces search them and display them in their native language. User interfaces search them and display them in
the language specified by the current locale. the language specified by the current locale.
To allow @command{xgettext} to extract them as translatable strings,
synopses and descriptions @emph{must be literal strings}. This means
that you cannot use @code{string-append} or @code{format} to construct
these strings:
@lisp
(package
;; @dots{}
(synopsis "This is translatable")
(description (string-append "This is " "*not*" " translatable.")))
@end lisp
Translation is a lot of work so, as a packager, please pay even more Translation is a lot of work so, as a packager, please pay even more
attention to your synopses and descriptions as every change may entail attention to your synopses and descriptions as every change may entail
additional work for translators. In order to help them, it is possible additional work for translators. In order to help them, it is possible