emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Yasushi SHOJI <yashi@atmark-techno.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Table continuation strings
Date: Thu, 02 Jan 2014 17:15:17 +0900	[thread overview]
Message-ID: <87y52y3ilm.wl@dns1.atmark-techno.com> (raw)
In-Reply-To: <87k3ewhr1j.fsf@gmail.com>

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&otilde;")
      ("is" :html "H&ouml;fundur")
      ("it" :default "Autore")
-     ("ja" :html "&#33879;&#32773;" :utf-8 "著者")
+     ("ja" :default "著者" :html "&#33879;&#32773;")
      ("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 "(&#1055;&#1088;&#1086;&#1076;&#1086;&#1083;&#1078;&#1077;&#1085;&#1080;&#1077;)"
@@ -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 "(&#1055;&#1088;&#1086;&#1076;&#1086;&#1083;&#1078;&#1077;&#1085;&#1080;&#1077; &#1089;&#1083;&#1077;&#1076;&#1091;&#1077;&#1090;)"
@@ -5374,7 +5374,7 @@ them."
      ("hu" :html "D&aacute;tum")
      ("is" :default "Dagsetning")
      ("it" :default "Data")
-     ("ja" :html "&#26085;&#20184;" :utf-8 "日付")
+     ("ja" :default "日付" :html "&#26085;&#20184;")
      ("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 "&#22259;" :utf-8 "図")
+     ("ja" :default "図" :html "&#22259;")
      ("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&nbsp;%d&nbsp;:")
-     ("ja" :html "&#22259;%d: " :utf-8 "図%d: ")
+     ("ja" :default "図%d: " :html "&#22259;%d: ")
      ("no" :default "Illustrasjon %d")
      ("nb" :default "Illustrasjon %d")
      ("nn" :default "Illustrasjon %d")
@@ -5436,7 +5436,7 @@ them."
      ("hu" :html "L&aacute;bjegyzet")
      ("is" :html "Aftanm&aacute;lsgreinar")
      ("it" :html "Note a pi&egrave; di pagina")
-     ("ja" :html "&#33050;&#27880;" :utf-8 "脚注")
+     ("ja" :default "脚注" :html "&#33050;&#27880;")
      ("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 "&#34920;" :utf-8 "表")
+     ("ja" :default "表" :html "&#34920;")
      ("ru" :html "&#1058;&#1072;&#1073;&#1083;&#1080;&#1094;&#1072;" :utf-8 "Таблица")
      ("zh-CN" :html "&#34920;" :utf-8 "表"))
     ("Table %d:"
@@ -5506,7 +5506,7 @@ them."
      ("es" :default "Tabla %d")
      ("et" :default "Tabel %d")
      ("fr" :default "Tableau %d :")
-     ("ja" :html "&#34920;%d:" :utf-8 "表%d:")
+     ("ja" :default "表%d:" :html "&#34920;%d:")
      ("no" :default "Tabell %d")
      ("nb" :default "Tabell %d")
      ("nn" :default "Tabell %d")
@@ -5527,7 +5527,7 @@ them."
      ("hu" :html "Tartalomjegyz&eacute;k")
      ("is" :default "Efnisyfirlit")
      ("it" :default "Indice")
-     ("ja" :html "&#30446;&#27425;" :utf-8 "目次")
+     ("ja" :default "目次" :html "&#30446;&#27425;")
      ("nl" :default "Inhoudsopgave")
      ("no" :default "Innhold")
      ("nb" :default "Innhold")
-- 
1.8.5.2



-- 
            yashi

  reply	other threads:[~2014-01-02  8:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  0:44 [PATCH] Table continuation strings Thomas S. Dye
2013-10-30  8:28 ` Michael Strey
2013-10-30 10:15 ` Nicolas Goaziou
2013-10-30 15:59   ` Thomas S. Dye
2013-12-21  3:15   ` Yasushi SHOJI
2013-12-21  9:05     ` Nicolas Goaziou
2013-12-21 21:59       ` Yasushi SHOJI
2013-12-22  8:20         ` Nicolas Goaziou
2013-12-22 16:13           ` Yasushi SHOJI
2013-12-23  9:09             ` Nicolas Goaziou
2014-01-02  8:15               ` Yasushi SHOJI [this message]
2014-01-02  8:29                 ` Yasushi SHOJI
2014-01-03  8:59                   ` Nicolas Goaziou
2014-01-03  8:59                 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y52y3ilm.wl@dns1.atmark-techno.com \
    --to=yashi@atmark-techno.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).