On 16 November 2010 16:54, Adam Borowski <kilob...@angband.pl> wrote:
> On Sun, Nov 14, 2010 at 02:11:41PM +0100, Xavier R wrote:
>> Also, I want to translate DCSS in french (a huge work, I know, but im ready
>> :] )
>> is this possible/viable/cool/etc... ?
>
> I don't know what Raphael wrote since that was in some exceptionally heathen
> language :p, but here's my take:

:)

Since you're not going to be the only one with that question, he
pretty much said that the question comes up a lot (lately, that is),
that maintaining several distinct translated versions is out of the
question (Crawl changes too quickly, I think), that the translation
requires internationalization of the code, and that doing so is not of
high priority at the moment. I hope I didn't forget anything. :)

> Our code is more complex due to capitalization needed, but I have an idea
> how to simplify that[1].  With no heed for capitalization, a parametrized
> message would be:
>
> "$ARTICLE(definite, %1) %1 reflects the %2 off $PRONOUN(possessive, %1) %3!"
> (of course, the actual markup would be much terser)
>
> The Polish translation would be:
> "$NOUN(%1, nominative, singular) $VERB("reflect", $GENDER(%1)) $NOUN(%2,
> accusative, singular) od swej $NOUN(%3, genitive, singular)!"
>
> $VERB(x, y) would provide the declination of word x appropriate for gender y.
> $NOUN(x, y, z) would take word x, place it in case y and number z.

Sounds good, though I think a previous step is in order that
differentiates word order by
language, i.e. a function that gets passed in the subject, action verb
and objects and
returns a sentence made up of language dependent function calls in the
required order.

> After coming up with such a syntax, the biggest part would be going through
> all the source and replacing all strings this way.  If marked in a
> consistent way (like, _("foo") as gettext uses), we would be able to run
> some automated tool and gather a list of messages that do need to be
> translated.

I think Patric Mueller did something similar for NetHack-De: first
running a script that found all messages (presumably by looking for
quotation marks) and added a predefined marker in that line (in this
case "TODO DE").
Later, it was easy to grep the source for untranslated (or
half-translated) fragments and translate the messages one line at a
time.

> This would require step three: actual translation.  This includes:
> * messages
> * verbs/etc used in the above
> * monsters, items, etc
> * speech and descriptions
>
> The last part is already in a database, so it requires no code changes.

The speech does include some place holders for monster names etc. but
it's bound to be simpler than the more flexible messages elsewhere.

> Just loads and loads of actually translating.

Yep, though I'd bet we'd get lots of volunteers for that. :)

> In other words, unlike translating some random desktop program, translating
> Crawl would be a huge task.

A very concise summary, thank you! :D

> [1]. Since all translateable strings would need to go through a new separate
> function, its semantics may be different from what we have.  Since 99.9%
> messages are capitalized -- or perhaps even 100% as I haven't found an
> example to the contrary, the function may always capitalize its input unless
> specifically directed not to.  This would remove the need for manually
> capitalizing pronouns and names at the start of a sentence.

I agree. It would make things much simpler.

Johanna

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Crawl-ref-discuss mailing list
Crawl-ref-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss

Reply via email to