;;; GNU Guix web site ;;; Copyright © 2019 Florian Pelz ;;; ;;; This file is part of the GNU Guix web site. ;;; ;;; The GNU Guix web site is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU Affero General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; The GNU Guix web site is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU Affero General Public License for more details. ;;; ;;; You should have received a copy of the GNU Affero General Public License ;;; along with the GNU Guix web site. If not, see . (define-module (sexp-xgettext) #:export (%current-mo-file mo-lookup)) (define %current-mo-file (make-parameter #f)) (define (mo-lookup msg #:key number msgctxt) "Return the translation of MSG from the %CURRENT-MO-FILE for NUMBER (like n in ngettext) that has the specified MSGCTXT (like pgettext)." ;; TODO CURRENTLY THIS FUNCTION USES guix/build/po.scm TO LOOK UP ;; TRANSLATIONS FROM A PO FILE AND NOT FROM AN MO FILE