unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Markup in translatable strings?
@ 2015-07-22 13:55 Ludovic Courtès
  2015-07-22 17:29 ` Benno Schulenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-07-22 13:55 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Guix-devel

Saluton Benno,

We were having an argument on how best to represent bullet lists and
such in Guix package descriptions, which are translatable strings.  That
led us to wonder whether we should simply use a subset of Texinfo or
HTML/XML to do that:

  http://lists.gnu.org/archive/html/guix-devel/2015-07/msg00471.html

In practice, I imagine we would use at just a few markups, like @code,
@itemize and @item, @dfn, @example, and @url.

WDYT?  Is markup acceptable in translatable strings?

If it is, our preference would be Texinfo, because that’s what is used
throughout GNU and Guix; it’s also lightweight (newlines implicitly
introduce a new paragraph, and one doesn’t usually have to “close tags”
as in XML.)  However, if you think HTML or XML would be more appropriate
for translators, that’s an option we could consider.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Markup in translatable strings?
  2015-07-22 13:55 Markup in translatable strings? Ludovic Courtès
@ 2015-07-22 17:29 ` Benno Schulenberg
  2015-07-22 21:19   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Benno Schulenberg @ 2015-07-22 17:29 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Benno Schulenberg, Guix-devel


Saluton Ludo',

On 2015-07-22 15:55, Ludovic Courtès wrote:
> http://lists.gnu.org/archive/html/guix-devel/2015-07/msg00471.html
> 
> In practice, I imagine we would use at just a few markups, like
> @code, @itemize and @item, @dfn, @example, and @url.
> 
> WDYT?  Is markup acceptable in translatable strings?

You can, but you run the risk that a few translators will mistake
the @words for translatable words.  Normally msgfmt would verify
that translators have faithfully copied all formatting specifiers,
but it doesn't know about a texinfo-format or html-format.

So I would suggest you write a little script that verifies that
in a PO file any @word in a msgid also occurs in the corresponding
msgstr.

> If it is, our preference would be Texinfo, because that’s what is
> used throughout GNU and Guix; it’s also lightweight (newlines
> implicitly introduce a new paragraph,

Oof, that sounds a bit "dangerous".  If translators are not aware
of this, might they mess up the structuring of the text?

> and one doesn’t usually have to
> “close tags” as in XML.)  However, if you think HTML or XML would be
> more appropriate for translators, that’s an option we could consider.

Most translators would probably recognize <tags> as being tags
that shouldn't be translated.  But also here it wouldn't hurt to
have a little script verify the presence of the same tags in both
msgid and msgstr.  But... when doing such a script anyway, it's
probably easier to verify Texinfo markup than HTML/XML.  And
also: Texinfo makes more "sense", HTML is more about appearance.

So, it's your choice.  Also see the last four paragraphs of
https://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html .

Regards,

Benno

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Markup in translatable strings?
  2015-07-22 17:29 ` Benno Schulenberg
@ 2015-07-22 21:19   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-07-22 21:19 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Guix-devel

Benno Schulenberg <coordinator@translationproject.org> skribis:

> On 2015-07-22 15:55, Ludovic Courtès wrote:
>> http://lists.gnu.org/archive/html/guix-devel/2015-07/msg00471.html
>> 
>> In practice, I imagine we would use at just a few markups, like
>> @code, @itemize and @item, @dfn, @example, and @url.
>> 
>> WDYT?  Is markup acceptable in translatable strings?
>
> You can, but you run the risk that a few translators will mistake
> the @words for translatable words.  Normally msgfmt would verify
> that translators have faithfully copied all formatting specifiers,
> but it doesn't know about a texinfo-format or html-format.
>
> So I would suggest you write a little script that verifies that
> in a PO file any @word in a msgid also occurs in the corresponding
> msgstr.

OK, sounds like a plan.

>> If it is, our preference would be Texinfo, because that’s what is
>> used throughout GNU and Guix; it’s also lightweight (newlines
>> implicitly introduce a new paragraph,
>
> Oof, that sounds a bit "dangerous".  If translators are not aware
> of this, might they mess up the structuring of the text?

Well, this is not different from markup-less text.  What I wanted to say
is that, while HTML has <p> to delimit paragraphs, which can quickly get
verbose, Texinfo has no such thing.

> Most translators would probably recognize <tags> as being tags
> that shouldn't be translated.  But also here it wouldn't hurt to
> have a little script verify the presence of the same tags in both
> msgid and msgstr.  But... when doing such a script anyway, it's
> probably easier to verify Texinfo markup than HTML/XML.  And
> also: Texinfo makes more "sense", HTML is more about appearance.

Yeah, agreed.

We’ll see how we can implement the “switch” to Texinfo.

> So, it's your choice.  Also see the last four paragraphs of
> https://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html .

That’s because we had read them that we thought we’d ask your opinion,
especially about Texinfo markup.  :-)

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-22 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22 13:55 Markup in translatable strings? Ludovic Courtès
2015-07-22 17:29 ` Benno Schulenberg
2015-07-22 21:19   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.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).