Two questions

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

Guest

Two questions

Post by Guest »

Hi all, Roberto Grassi from Italy.
I've two simple questions.

1) If one specifies the article for an object does this *override* the
call to the CThe function in order to retrieve the article?
2) Can i translate the Manual in Italian?

Rob

Guest

Re: Two questions

Post by Guest »

Anonymous wrote:1) If one specifies the article for an object does this *override* the
call to the CThe function in order to retrieve the article?
No. Well, sort of. A glance at CThe (defined in /lib/hugolib.h) shows that if the object has no article, then a capital "The" is printed, otherwise just the article name. I never gave it any thought before you asked, but this has always worked fine for me. Suppose you had an object called "fence" with an article of "a", and another object called "Bob" (no article). Calling CThe(obj) would print "The fence..." and "Bob..." respectively, which is probably what you wanted.

If you're needing to print the article itself -- whether it's "the" or "a" or "an" or "some" or whatever, you can use CArt(obj) for the capitolized version, or just Art(object) for mid-sentence uses.
Anonymous wrote:2) Can i translate the Manual in Italian?
Kent would have to answer this for sure (don't take this as an answer), but I'm guessing a translation would be very welcomed, if you're up to it!

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

Woops. That reply was from me (somehow I wasn't logged in). So I can't edit my post. But it should have read that "The" is printed if the object *does* have an article assigned. Only the object name is printed if the object has no article. I think what you're after is Art/CArt.

In other words, The/CThe is handy when you want to override the default article. It would make sense to say "You can't eat the rock" by using the(rock), even if its article is "a" and it shows up in inventory as "a rock". It wouldn't make as much sense to say "You can't eat a rock" by using art(rock) instead. Hope that makes sense.

rgrassi
Posts: 3
Joined: Tue Jan 10, 2006 8:57 am

Post by rgrassi »

Merk wrote:Hope that makes sense.
It makes sense.
The problem arises during localization.
If i can have a complete control over the articles for an object (i.e. article is not dinamically retrieved according to gender or singular/plural) then the only thing i should care about is to define the proper articles (if i'm writing a game in a language different than english).
Rob

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

It's also easy to replace Art/CArt/The/CThe (I much prefer replacing short routines than the longer ones). It's probably the same in the other languages. Just make your own version in your source files (leaving the library alone, of course), that handles article-printing the way it needs to be for locallization. That will probably be enough, although there are a host of other library messages you'd need to customize as well.

Post Reply