emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Table continuation strings


From: Yasushi SHOJI
Subject: Re: [O] [PATCH] Table continuation strings
Date: Thu, 02 Jan 2014 17:15:17 +0900
User-agent: Wanderlust/2.15.9

Hi,

At Mon, 23 Dec 2013 10:09:44 +0100,
Nicolas Goaziou wrote:
> 
> There's a limitation: if you use Latin1 characters (e.g. when you write
> in French), you cannot export to text/ascii anymore.
> 
> So, if, for some reason, you really need to export to ascii only, but
> still need to write in french, you have to be careful not to use any of
> these Latin1 characters, in particular in translated strings. Similarly,
> Japanese :ascii entries could be written using romanji.
> 
> I don't know to what extent it is useful, though.

Right.  It is doable, but for Japanese I don't think anyone wants to
do it, or at least not a ordinal usage, IMO.

> > I'm checking exporters I use, including plain text and html, but it
> > doesn't seems to go wrong. But I really needs some help for other
> > back-ends. I'll post a patch for testing if anyone's interested in.
> 
> Good idea.
> 
> You can also set entries to :default and provide a different :latex
> value, if required.

Ok, I've checked what I can.  It seems working at least for me.  Let's
patch up the `org-export-dictionary' to see it breaks for others.

Here is a patch to convert all Japanese entries from :utf-8 to :default.
You can apply it with `git am --scissors'.

----- >8 ----- cut here ----- >8 -----
Subject: [PATCH 1/2] ox: Convert Japanese translation from utf-8 to default

* lisp/ox.el (org-export-dictionary): Convert all Japanese translation
  from utf-8 to default.

There shouldn't be much need for exporters and users to worry about
the coding system of the final output.  If one wants to export a
"Japanese" document, he should already have the document with Japanese
capable coding system. In that case, Emacs should be able to handle
the coding system conversion form the translation table to the
designated file coding system.

There are two cases which I can think don't work:

  - all words in the document are written in romaji, and one wants
    romaji translations

  - the documents are writ en in a language which does not support
    Japanese character set, ie English or French, and one wants to use
    Japanese for non-content strings, ie TOC.

These cases are too rare that we can ignore for now.
---
 lisp/ox.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 2160826..592cc79 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5331,7 +5331,7 @@ them."
      ("hu" :default "Szerzõ")
      ("is" :html "Höfundur")
      ("it" :default "Autore")
-     ("ja" :html "著者" :utf-8 "著者")
+     ("ja" :default "著者" :html "著者")
      ("nl" :default "Auteur")
      ("no" :default "Forfatter")
      ("nb" :default "Forfatter")
@@ -5347,7 +5347,7 @@ them."
      ("es" :default "Continúa de la página anterior")
      ("fr" :default "Suite de la page précédente")
      ("it" :default "Continua da pagina precedente")
-     ("ja" :utf-8 "前ページからの続き")
+     ("ja" :default "前ページからの続き")
      ("nl" :default "Vervolg van vorige pagina")
      ("pt" :default "Continuação da página anterior")
      ("ru" :html 
"(Продолжение)"
@@ -5357,7 +5357,7 @@ them."
      ("es" :default "Continúa en la siguiente página")
      ("fr" :default "Suite page suivante")
      ("it" :default "Continua alla pagina successiva")
-     ("ja" :utf-8 "次ページに続く")
+     ("ja" :default "次ページに続く")
      ("nl" :default "Vervolg op volgende pagina")
      ("pt" :default "Continua na página seguinte")
      ("ru" :html 
"(Продолжение 
следует)"
@@ -5374,7 +5374,7 @@ them."
      ("hu" :html "Dátum")
      ("is" :default "Dagsetning")
      ("it" :default "Data")
-     ("ja" :html "日付" :utf-8 "日付")
+     ("ja" :default "日付" :html "日付")
      ("nl" :default "Datum")
      ("no" :default "Dato")
      ("nb" :default "Dato")
@@ -5403,7 +5403,7 @@ them."
      ("de" :default "Abbildung")
      ("es" :default "Figura")
      ("et" :default "Joonis")
-     ("ja" :html "図" :utf-8 "図")
+     ("ja" :default "図" :html "図")
      ("no" :default "Illustrasjon")
      ("nb" :default "Illustrasjon")
      ("nn" :default "Illustrasjon")
@@ -5416,7 +5416,7 @@ them."
      ("es" :default "Figura %d:")
      ("et" :default "Joonis %d:")
      ("fr" :default "Figure %d :" :html "Figure %d :")
-     ("ja" :html "図%d: " :utf-8 "図%d: ")
+     ("ja" :default "図%d: " :html "図%d: ")
      ("no" :default "Illustrasjon %d")
      ("nb" :default "Illustrasjon %d")
      ("nn" :default "Illustrasjon %d")
@@ -5436,7 +5436,7 @@ them."
      ("hu" :html "Lábjegyzet")
      ("is" :html "Aftanmálsgreinar")
      ("it" :html "Note a piè di pagina")
-     ("ja" :html "脚注" :utf-8 "脚注")
+     ("ja" :default "脚注" :html "脚注")
      ("nl" :default "Voetnoten")
      ("no" :default "Fotnoter")
      ("nb" :default "Fotnoter")
@@ -5497,7 +5497,7 @@ them."
      ("es" :default "Tabla")
      ("et" :default "Tabel")
      ("fr" :default "Tableau")
-     ("ja" :html "表" :utf-8 "表")
+     ("ja" :default "表" :html "表")
      ("ru" :html "Таблица" :utf-8 
"Таблица")
      ("zh-CN" :html "表" :utf-8 "表"))
     ("Table %d:"
@@ -5506,7 +5506,7 @@ them."
      ("es" :default "Tabla %d")
      ("et" :default "Tabel %d")
      ("fr" :default "Tableau %d :")
-     ("ja" :html "表%d:" :utf-8 "表%d:")
+     ("ja" :default "表%d:" :html "表%d:")
      ("no" :default "Tabell %d")
      ("nb" :default "Tabell %d")
      ("nn" :default "Tabell %d")
@@ -5527,7 +5527,7 @@ them."
      ("hu" :html "Tartalomjegyzék")
      ("is" :default "Efnisyfirlit")
      ("it" :default "Indice")
-     ("ja" :html "目次" :utf-8 "目次")
+     ("ja" :default "目次" :html "目次")
      ("nl" :default "Inhoudsopgave")
      ("no" :default "Innhold")
      ("nb" :default "Innhold")
-- 
1.8.5.2



-- 
            yashi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]