Hi all,

Thanks Günter, I'm now using your second solution doing like below

en original file (unchanged):

`My title is cool`_

  .. _My title is cool:

http://hyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyper.org

.po file :

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


I choose this second solution because the first one will lead to create a
second reference in original en file. This behaviour is "wrong" in my case:
I don't want to put constraint on original English content to the English
authors and mix languages (and make translation too intrusive).

As an example, en file would contain :

`My title is cool`_

  .. _`My title is cool`: cooltitle_

  .. _`Mon titre est cool `: cooltitle_

  .. _cooltitle:

http://hyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyperlongurlhyper.org

and  the .po file would be :

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

Thanks for all those valuable inputs
Cheers

Thomas


2013/11/17 Guenter Milde <[email protected]>

> 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 a topic in the
> Google Groups "sphinx-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sphinx-users/rujpFXC3AB8/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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