mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-22 08:57:37 +01:00
- [TUI] added titan requests; - [GUI] fixed crash when opening the gemlog windows after refreshed the gemlogs data.
80 lines
2.9 KiB
Plaintext
80 lines
2.9 KiB
Plaintext
|
|
;; This program is free software: you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
;; (at your option) any later version.
|
|
|
|
;; This program 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 General Public License for more details.
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with this program.
|
|
;; If not, see [[http://www.gnu.org/licenses/][http://www.gnu.org/licenses/]].
|
|
|
|
(alexandria:define-constant +text-domain+ "@PACKAGE@" :test #'string=)
|
|
|
|
(alexandria:define-constant +program-name+ "@PACKAGE@" :test #'string=)
|
|
|
|
(alexandria:define-constant +program-version+ "@VERSION@" :test #'string=)
|
|
|
|
(alexandria:define-constant +issue-tracker+ "@PACKAGE_BUGREPORT@" :test #'string=)
|
|
|
|
(alexandria:define-constant +package-url+ "@PACKAGE_URL@" :test #'string=)
|
|
|
|
|
|
(alexandria:define-constant +openssl-bin+ "@OPENSSL@" :test #'string=)
|
|
|
|
(alexandria:define-constant +xdg-open-bin+ "@XDG_OPEN@" :test #'string=)
|
|
|
|
(alexandria:define-constant +unzip-bin+ "@UNZIP@" :test #'string=)
|
|
|
|
(alexandria:define-constant +man-bin+ "@MAN@" :test #'string=)
|
|
|
|
(alexandria:define-constant +montage-bin+ "@MONTAGE@" :test #'string=)
|
|
|
|
(alexandria:define-constant +file-bin+ "@FILE@" :test #'string=)
|
|
|
|
(eval-when (:compile-toplevel :load-toplevel :execute)
|
|
|
|
(defun allow-features (test-value feature-keyword)
|
|
(when (and (not (member feature-keyword *features*))
|
|
(string/= test-value "no"))
|
|
(push feature-keyword *features*)))
|
|
|
|
(allow-features +unzip-bin+ :gempub-support)
|
|
|
|
(allow-features +man-bin+ :man-bin)
|
|
|
|
(allow-features +montage-bin+ :montage-bin))
|
|
|
|
(defmacro with-return-untranslated ((untranslated) &body body)
|
|
`(handler-bind ((i18n-conditions:no-translation-table-error
|
|
(lambda (e)
|
|
(declare (ignore e))
|
|
(invoke-restart 'cl-i18n:return-untranslated))))
|
|
(handler-case
|
|
(progn ,@body)
|
|
(i18n-conditions:no-translation (e)
|
|
(declare (ignorable e))
|
|
#+debug-mode
|
|
(progn
|
|
(warn e)
|
|
,untranslated)
|
|
#-debug-mode ,untranslated))))
|
|
|
|
(defun _ (a)
|
|
"get translated string"
|
|
(with-return-untranslated (a)
|
|
(cl-i18n:translate a)))
|
|
|
|
(defun n_ (a b n)
|
|
"Get stranslated string with plural forms
|
|
- a the untranslated string template
|
|
- b the string template to return if no translation was found
|
|
- n the number of object mentioned in the string template"
|
|
(declare (ignore b))
|
|
(with-return-untranslated (a)
|
|
(cl-i18n:ntranslate a a n)))
|