forked from mirrors/org-mode
org-export: Flesh out dictionary
* contrib/lisp/org-export.el (org-export-dictionary): Flesh out dictionary. (org-export-translate): Allow for a :default charset in order to simplify dictionary completion.
This commit is contained in:
parent
d86f09a854
commit
61b5e28509
|
@ -4249,67 +4249,124 @@ object, a string, or nil."
|
||||||
|
|
||||||
(defconst org-export-dictionary
|
(defconst org-export-dictionary
|
||||||
'(("Author"
|
'(("Author"
|
||||||
("fr"
|
("ca" :default "Autor")
|
||||||
:ascii "Auteur"
|
("cs" :default "Autor")
|
||||||
:latin1 "Auteur"
|
("da" :default "Ophavsmand")
|
||||||
:utf-8 "Auteur"))
|
("de" :default "Autor")
|
||||||
|
("eo" :html "Aŭtoro")
|
||||||
|
("es" :default "Autor")
|
||||||
|
("fi" :html "Tekijä")
|
||||||
|
("fr" :default "Auteur")
|
||||||
|
("hu" :default "Szerzõ")
|
||||||
|
("is" :html "Höfundur")
|
||||||
|
("it" :default "Autore")
|
||||||
|
("ja" :html "著者" :utf-8 "著者")
|
||||||
|
("nl" :default "Auteur")
|
||||||
|
("no" :default "Forfatter")
|
||||||
|
("nb" :default "Forfatter")
|
||||||
|
("nn" :default "Forfattar")
|
||||||
|
("pl" :default "Autor")
|
||||||
|
("ru" :html "Автор" :utf-8 "Автор")
|
||||||
|
("sv" :html "Författare")
|
||||||
|
("uk" :html "Автор" :utf-8 "Автор")
|
||||||
|
("zh-CN" :html "作者" :utf-8 "作者")
|
||||||
|
("zh-TW" :html "作者" :utf-8 "作者"))
|
||||||
("Date"
|
("Date"
|
||||||
("fr"
|
("ca" :default "Data")
|
||||||
:ascii "Date"
|
("cs" :default "Datum")
|
||||||
:latin1 "Date"
|
("da" :default "Dato")
|
||||||
:utf-8 "Date"))
|
("de" :default "Datum")
|
||||||
("Equation")
|
("eo" :default "Dato")
|
||||||
|
("es" :default "Fecha")
|
||||||
|
("fi" :html "Päivämäärä")
|
||||||
|
("hu" :html "Dátum")
|
||||||
|
("is" :default "Dagsetning")
|
||||||
|
("it" :default "Data")
|
||||||
|
("ja" :html "日付" :utf-8 "日付")
|
||||||
|
("nl" :default "Datum")
|
||||||
|
("no" :default "Dato")
|
||||||
|
("nb" :default "Dato")
|
||||||
|
("nn" :default "Dato")
|
||||||
|
("pl" :default "Data")
|
||||||
|
("ru" :html "Дата" :utf-8 "Дата")
|
||||||
|
("sv" :default "Datum")
|
||||||
|
("uk" :html "Дата" :utf-8 "Дата")
|
||||||
|
("zh-CN" :html "日期" :utf-8 "日期")
|
||||||
|
("zh-TW" :html "日期" :utf-8 "日期"))
|
||||||
|
("Equation"
|
||||||
|
("fr" :ascii "Equation" :default "Équation"))
|
||||||
("Figure")
|
("Figure")
|
||||||
("Footnotes"
|
("Footnotes"
|
||||||
("fr"
|
("ca" :html "Peus de pàgina")
|
||||||
:ascii "Notes de bas de page"
|
("cs" :default "Pozn\xe1mky pod carou")
|
||||||
:latin1 "Notes de bas de page"
|
("da" :default "Fodnoter")
|
||||||
:utf-8 "Notes de bas de page"))
|
("de" :html "Fußnoten")
|
||||||
|
("eo" :default "Piednotoj")
|
||||||
|
("es" :html "Pies de página")
|
||||||
|
("fi" :default "Alaviitteet")
|
||||||
|
("fr" :default "Notes de bas de page")
|
||||||
|
("hu" :html "Lábjegyzet")
|
||||||
|
("is" :html "Aftanmálsgreinar")
|
||||||
|
("it" :html "Note a piè di pagina")
|
||||||
|
("ja" :html "脚注" :utf-8 "脚注")
|
||||||
|
("nl" :default "Voetnoten")
|
||||||
|
("no" :default "Fotnoter")
|
||||||
|
("nb" :default "Fotnoter")
|
||||||
|
("nn" :default "Fotnotar")
|
||||||
|
("pl" :default "Przypis")
|
||||||
|
("ru" :html "Сноски" :utf-8 "Сноски")
|
||||||
|
("sv" :default "Fotnoter")
|
||||||
|
("uk" :html "Примітки"
|
||||||
|
:utf-8 "Примітки")
|
||||||
|
("zh-CN" :html "脚注" :utf-8 "脚注")
|
||||||
|
("zh-TW" :html "腳註" :utf-8 "腳註"))
|
||||||
("List of Listings"
|
("List of Listings"
|
||||||
("fr"
|
("fr" :default "Liste des programmes"))
|
||||||
:ascii "Liste des programmes"
|
|
||||||
:latin1 "Liste des programmes"
|
|
||||||
:utf-8 "Liste des programmes"))
|
|
||||||
("List of Tables"
|
("List of Tables"
|
||||||
("fr"
|
("fr" :default "Liste des tableaux"))
|
||||||
:ascii "Liste des tableaux"
|
|
||||||
:latin1 "Liste des tableaux"
|
|
||||||
:utf-8 "Liste des tableaux"))
|
|
||||||
("Listing %d:"
|
("Listing %d:"
|
||||||
("fr"
|
("fr"
|
||||||
:ascii "Programme %d :"
|
:ascii "Programme %d :" :default "Programme nº %d :"
|
||||||
:latin1 "Programme %d :"
|
:latin1 "Programme %d :"))
|
||||||
:utf-8 "Programme nº %d :"))
|
|
||||||
("Listing %d: %s"
|
("Listing %d: %s"
|
||||||
("fr"
|
("fr"
|
||||||
:ascii "Programme %d : %s"
|
:ascii "Programme %d : %s" :default "Programme nº %d : %s"
|
||||||
:latin1 "Programme %d : %s"
|
:latin1 "Programme %d : %s"))
|
||||||
:utf-8 "Programme nº %d : %s"))
|
|
||||||
("See section %s"
|
("See section %s"
|
||||||
("fr"
|
("fr" :default "cf. section %s"))
|
||||||
:ascii "cf. section %s"
|
|
||||||
:latin1 "cf. section %s"
|
|
||||||
:utf-8 "cf. section %s"))
|
|
||||||
("Table %d:"
|
("Table %d:"
|
||||||
("fr"
|
("fr"
|
||||||
:ascii "Tableau %d :"
|
:ascii "Tableau %d :" :default "Tableau nº %d :" :latin1 "Tableau %d :"))
|
||||||
:latin1 "Tableau %d :"
|
|
||||||
:utf-8 "Tableau nº %d :"))
|
|
||||||
("Table %d: %s"
|
("Table %d: %s"
|
||||||
("fr"
|
("fr"
|
||||||
:ascii "Tableau %d : %s"
|
:ascii "Tableau %d : %s" :default "Tableau nº %d : %s"
|
||||||
:latin1 "Tableau %d : %s"
|
:latin1 "Tableau %d : %s"))
|
||||||
:utf-8 "Tableau nº %d : %s"))
|
|
||||||
("Table of Contents"
|
("Table of Contents"
|
||||||
("fr"
|
("ca" :html "Índex")
|
||||||
:ascii "Sommaire"
|
("cs" :default "Obsah")
|
||||||
:latin1 "Table des matières"
|
("da" :default "Indhold")
|
||||||
:utf-8 "Table des matières"))
|
("de" :default "Inhaltsverzeichnis")
|
||||||
|
("eo" :default "Enhavo")
|
||||||
|
("es" :html "Índice")
|
||||||
|
("fi" :html "Sisällysluettelo")
|
||||||
|
("fr" :ascii "Sommaire" :default "Table des matières")
|
||||||
|
("hu" :html "Tartalomjegyzék")
|
||||||
|
("is" :default "Efnisyfirlit")
|
||||||
|
("it" :default "Indice")
|
||||||
|
("ja" :html "目次" :utf-8 "目次")
|
||||||
|
("nl" :default "Inhoudsopgave")
|
||||||
|
("no" :default "Innhold")
|
||||||
|
("nb" :default "Innhold")
|
||||||
|
("nn" :default "Innhald")
|
||||||
|
("pl" :html "Spis treści")
|
||||||
|
("ru" :html "Содержание"
|
||||||
|
:utf-8 "Содержание")
|
||||||
|
("sv" :html "Innehåll")
|
||||||
|
("uk" :html "Зміст" :utf-8 "Зміст")
|
||||||
|
("zh-CN" :html "目录" :utf-8 "目录")
|
||||||
|
("zh-TW" :html "目錄" :utf-8 "目錄"))
|
||||||
("Unknown reference"
|
("Unknown reference"
|
||||||
("fr"
|
("fr" :ascii "Destination inconnue" :default "Référence inconnue")))
|
||||||
:ascii "Destination inconnue"
|
|
||||||
:latin1 "Référence inconnue"
|
|
||||||
:utf-8 "Référence inconnue")))
|
|
||||||
"Dictionary for export engine.
|
"Dictionary for export engine.
|
||||||
|
|
||||||
Alist whose CAR is the string to translate and CDR is an alist
|
Alist whose CAR is the string to translate and CDR is an alist
|
||||||
|
@ -4327,11 +4384,15 @@ entry.")
|
||||||
ENCODING is a symbol among `:ascii', `:html', `:latex', `:latin1'
|
ENCODING is a symbol among `:ascii', `:html', `:latex', `:latin1'
|
||||||
and `:utf-8'. INFO is a plist used as a communication channel.
|
and `:utf-8'. INFO is a plist used as a communication channel.
|
||||||
|
|
||||||
Translation depends on `:language' property. Return the
|
Translation depends on `:language' property. Return the
|
||||||
translated string. If no translation is found return S."
|
translated string. If no translation is found, try to fall back
|
||||||
(let ((lang (plist-get info :language))
|
to `:default' encoding. If it fails, return S."
|
||||||
(translations (cdr (assoc s org-export-dictionary))))
|
(let* ((lang (plist-get info :language))
|
||||||
(or (plist-get (cdr (assoc lang translations)) encoding) s)))
|
(translations (cdr (assoc lang
|
||||||
|
(cdr (assoc s org-export-dictionary))))))
|
||||||
|
(or (plist-get translations encoding)
|
||||||
|
(plist-get translations :default)
|
||||||
|
s)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue