Patrefans
Renpytom from patreon
Renpytom patreon

Python Tricks #1

🕑 Added 2018-07-31 00:14:36 +0000 UTC
Python Tricks #1

Comments

Renpytom

There are two ways you could do this. One would be to use [he!t] to invoke Ren'Py's translation system. But I think a better way would be to use the __ (double-underscore) function, which translates the string it gets as an argument. If you changed the __unicode__ function to return __(self.he), it would return the translated string, and you could just write [he] again. You'd also want to use _("he"), _("she"), etc to mark the strings as translatable in the first place.

Bruni Multimedia

How does this work with translations?

Renpytom

I'll be honest, "they" is a pretty tough one. My guess as to the best way to do it would be to have variables like "[he_is]" that would be "he is", "she is", or "they are" as appropriate. Well, the best way would be for me to clean up the generative text framework I made a few years ago and post it. But it's so dodgy, and you needed to be on the ball to use it. Maybe something like a text hook that catches "they is" and fixes is would be a simple and correct approach. I'm thinking generative text and a good solution to the pronoun issue would be a full article, and with the android deadline tonight (not gonna make it), I didn't have time to write it.

noeinan

This is great! Especially the pronoun bit. I'm glad they was included! I'll have to do some more thinking on how to change the verb connected to "they"

TrooperSJP

Very cool tricks...one thing that would be a good thing to add to the pronoun picker discussion is about how to deal with verbs. Say the sentence using male pronouns would be "[He] is sitting in front of you." That will be fine for he and she...but they would be "are sitting" rather than is sitting. And also, "He sits" and "She sits" but "They sit." So...are there ways your cool snippets might be utilized to deal with the verb question as well?


More Creators