-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question, It is possible to have a report with i18n #145
Comments
This is something that i've thought about quite a lot—how to support other languages. I'd really love to be able to easily have translations available. For the Narrator's log, yes, it really would be as simple as having a different from screenpy import See, Silently, beat
class Ver(See):
@beat("{} ve si {question_to_log} es {resolution_to_log}.")
def perform_as(self, the_actor: Actor) -> None:
Silently(super(Ver, self)).perform_as(the_actor) # might work? Edit: I just realized this probably wouldn't work very well with the That would allow the Narrator to read the Spanish, as long as you made subclasses for all of the Actions you used. The tests themselves would still be using the English methods, though. Making the methods be Spanish, too, you might be able to do... class UnActor(Actor):
llamado = Actor.named
quién_puede = Actor.who_can
# ... That feels a little strange, but i think it should work! As i said, i'm very interested in this. If you try one of these approaches, can you share how successful it was? |
We might need to do some work to more easily allow translations, like Django's |
I'm not well versed in other languages but I have thought about multi language support and one aspect we'll likely need to figure out is how to handle grammar issues depending on the language. The current structure of the screenplay pattern is actor-centric because that's how English has a tendency to flow. Whereas some languages might structure the sentence "To the market, I go." |
Spanish can be as well actor centric, but for instance in english we have a passive voice like |
I'm thinking if there's any possibility to give the actions that are performed in another language for example spanish.
Should I write classes with their respective
beat
for the specific lang?For example if I need an actor
How I should implement this
Create a narrator that gets the message in english and process through a .po file dinamically?
Create a class based on each of the classes using custom
@beat
?for example
The text was updated successfully, but these errors were encountered: