Parcourir la source

ox-latex: Change to longtable strings

* lisp/ox-latex.el (org-latex--translate): New function.
(org-latex-longtable-continued-on)
org-latex-longtable-continued-from): Remove variables.
(org-latex-table-row): Use new function.
* lisp/ox.el (org-export-dictionary): Add entries relative to
  longtables.  Fix some other entries.
Nicolas Goaziou il y a 12 ans
Parent
commit
af92fa3b6c
2 fichiers modifiés avec 14 ajouts et 19 suppressions
  1. 7 16
      lisp/ox-latex.el
  2. 7 3
      lisp/ox.el

+ 7 - 16
lisp/ox-latex.el

@@ -525,20 +525,6 @@ When nil, no transformation is made."
 	  (string :tag "Format string")
 	  (string :tag "Format string")
 	  (const :tag "No formatting")))
 	  (const :tag "No formatting")))
 
 
-(defcustom org-latex-longtable-continued-on "Continued on next page"
-  "String to indicate table continued on next page."
-  :group 'org-export-latex
-  :version "24.4"
-  :package-version '(Org . "8.0")
-  :type 'string)
-
-(defcustom org-latex-longtable-continued-from "Continued from previous page"
-  "String to indicate table continued from previous page."
-  :group 'org-export-latex
-  :version "24.4"
-  :package-version '(Org . "8.0")
-  :type 'string)
-
 ;;;; Text markup
 ;;;; Text markup
 
 
 (defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}")
 (defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}")
@@ -1077,6 +1063,11 @@ just outside of it."
      (funcall search-refs element))
      (funcall search-refs element))
    ""))
    ""))
 
 
+(defun org-latex--translate (s info)
+  "Translate string S according to specified language.
+INFO is a plist used as a communication channel."
+  (org-export-translate s :latex info))
+
 
 
 
 
 ;;; Template
 ;;; Template
@@ -2649,7 +2640,7 @@ a communication channel."
 		 (if booktabsp "\\midrule" "\\hline")
 		 (if booktabsp "\\midrule" "\\hline")
 		 (cdr (org-export-table-dimensions
 		 (cdr (org-export-table-dimensions
 		       (org-export-get-parent-table table-row) info))
 		       (org-export-get-parent-table table-row) info))
-		 org-latex-longtable-continued-from
+		 (org-latex--translate "Continued from previous page" info)
 		 (cond ((and booktabsp (memq 'top borders)) "\\toprule\n")
 		 (cond ((and booktabsp (memq 'top borders)) "\\toprule\n")
 		       ((and (memq 'top borders)
 		       ((and (memq 'top borders)
 			     (memq 'above borders)) "\\hline\n")
 			     (memq 'above borders)) "\\hline\n")
@@ -2660,7 +2651,7 @@ a communication channel."
 		 ;; Number of columns.
 		 ;; Number of columns.
 		 (cdr (org-export-table-dimensions
 		 (cdr (org-export-table-dimensions
 		       (org-export-get-parent-table table-row) info))
 		       (org-export-get-parent-table table-row) info))
-		 org-latex-longtable-continued-on))
+		 (org-latex--translate "Continued on next page" info)))
 	;; When BOOKTABS are activated enforce bottom rule even when
 	;; When BOOKTABS are activated enforce bottom rule even when
 	;; no hline was specifically marked.
 	;; no hline was specifically marked.
 	((and booktabsp (memq 'bottom borders)) "\\bottomrule")
 	((and booktabsp (memq 'bottom borders)) "\\bottomrule")

+ 7 - 3
lisp/ox.el

@@ -5276,6 +5276,10 @@ them."
      ("uk" :html "Автор" :utf-8 "Автор")
      ("uk" :html "Автор" :utf-8 "Автор")
      ("zh-CN" :html "作者" :utf-8 "作者")
      ("zh-CN" :html "作者" :utf-8 "作者")
      ("zh-TW" :html "作者" :utf-8 "作者"))
      ("zh-TW" :html "作者" :utf-8 "作者"))
+    ("Continued from previous page"
+     ("fr" :default "Suite de la page précédente"))
+    ("Continued on next page"
+     ("fr" :default "Suite page suivante"))
     ("Date"
     ("Date"
      ("ca" :default "Data")
      ("ca" :default "Data")
      ("cs" :default "Datum")
      ("cs" :default "Datum")
@@ -5384,8 +5388,8 @@ them."
      ("es" :default "Listado de programa %d")
      ("es" :default "Listado de programa %d")
      ("et" :default "Loend %d")
      ("et" :default "Loend %d")
      ("fr" :default "Programme %d :" :html "Programme %d :")
      ("fr" :default "Programme %d :" :html "Programme %d :")
-     ("no" :default "Dataprogram")
-     ("nb" :default "Dataprogram")
+     ("no" :default "Dataprogram %d")
+     ("nb" :default "Dataprogram %d")
      ("zh-CN" :html "代码%d " :utf-8 "代码%d "))
      ("zh-CN" :html "代码%d " :utf-8 "代码%d "))
     ("See section %s"
     ("See section %s"
      ("da" :default "jævnfør afsnit %s")
      ("da" :default "jævnfør afsnit %s")
@@ -5393,7 +5397,7 @@ them."
      ("es" :default "vea seccion %s")
      ("es" :default "vea seccion %s")
      ("et" :html "Vaata peatükki %s" :utf-8 "Vaata peatükki %s")
      ("et" :html "Vaata peatükki %s" :utf-8 "Vaata peatükki %s")
      ("fr" :default "cf. section %s")
      ("fr" :default "cf. section %s")
-     ("zh-CN" :html "参见第%d节" :utf-8 "参见第%s节"))
+     ("zh-CN" :html "参见第%s节" :utf-8 "参见第%s节"))
     ("Table"
     ("Table"
      ("de" :default "Tabelle")
      ("de" :default "Tabelle")
      ("es" :default "Tabla")
      ("es" :default "Tabla")