On 2013-11-16, ThomasG wrote:

> I'm looking to a way to use an explicit title with a long link that point 
> to an external URL.
> The context is within an existing sphinx project based on Sphinx where I'm 
> starting to use internationalization.

> For the moment, the doc uses:

> `My title is cool`_

> and make a reference
> .. _`My title is cool`: 
> http://hyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyper.org

> But when I make the translation using i18n, the .po file looks

> #: myfile/mynewfile.txt:120
> # 0b980b6a3364440bb7bf15ca94a1256c
> msgid "`My title is cool`_"
> msgstr "`Mon titre est cool`_"

> For this reason, English (original) doc is ok but French loses the link 
> after I applied internationalization

You could add an alias (indirect `hyperlink target`_) like::

  `My title is cool`_
  
  .. _`My title is cool`: cooltitle_
  
  .. _cooltitle:
     
http://hyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyper.org


or use an `embedded alias`_:

  `My title is cool <cooltitle_>`_
  
  .. _cooltitle:
     
http://hyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyper.org


Günter

.. _hyperlink target:
   
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-targets

.. _embedded alias: 
    
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#embedded-uris-and-aliases



-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to