Monster spell messages (list-mon-spells.h) conversion to text in progress

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9647

    #16
    Those look excellent. I'll get them incorporated, and let you know of any problems.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • fph
      Veteran
      • Apr 2009
      • 1030

      #17
      Originally posted by takkaria
      I think we want to avoid constructing strings in the code (thinking about potential future translations here too).
      Angband looks like a hell to translate. Lots of strings are like "The {{name}} hits you", where {{name}} can be hundreds of different things.
      They are very tricky to translate because in many languages there is nontrivial grammatical interaction between the sentence and the name you plug in it. For instance, in Italian you would need different variants according to the grammatical gender of {{name}} and its first consonant group. Some languages have different plurals for 2 and 3+ objects.

      It looks challenging to code without extra logic in the source and a big lookup table. As far as I know handling gender is an unsolved issue even for things like gettext (see e.g. http://stackoverflow.com/q/6143547).
      --
      Dive fast, die young, leave a high-CHA corpse.

      Comment

      • AnonymousHero
        Veteran
        • Jun 2007
        • 1393

        #18
        Originally posted by fph
        Angband looks like a hell to translate. Lots of strings are like "The {{name}} hits you", where {{name}} can be hundreds of different things.
        They are very tricky to translate because in many languages there is nontrivial grammatical interaction between the sentence and the name you plug in it. For instance, in Italian you would need different variants according to the grammatical gender of {{name}} and its first consonant group. Some languages have different plurals for 2 and 3+ objects.

        It looks challenging to code without extra logic in the source and a big lookup table. As far as I know handling gender is an unsolved issue even for things like gettext (see e.g. http://stackoverflow.com/q/6143547).
        Yeah, the only real way to do translation is to use a Turing Complete language (or something very close to it) for generating text. That does not mean that you can separate it from game logic (and it should be!). You "just" have separate per-language functions which you can call with whatever numbers (etc.) need to be there for generating the message.

        In C it could either be done by linking different per-language .o files (if you can live with a compile-time language choice), or using pseudo-OOP using a struct of functions which would have different per-language instances (if you want run-time language choice).

        Of course, as you say, this is still very hard for something like Angband where there's so much "substitute-monster-name-in-plural-here" stuff going on. However, I think it would be only viable way.

        (If you look into the Hengband/Entroband source you'll see another variation based on #ifdef JP for handing different languages. This approach does not scale to large numbers of languages and is completely untenable for maintenance.)

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9647

          #19
          Originally posted by Elsairon
          I'm calling this first iteration done. All of the requested messages as far as I can tell are added to the monster_spell.txt file.
          OK, I have this incorporated in development now - here is what it looks like if you want to make any changes.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • Elsairon
            Adept
            • Apr 2007
            • 117

            #20
            As far as I can see, add one line to explain {pronoun} in the header would do it.

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎