-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Initial translation mechanism setup #13
base: master
Are you sure you want to change the base?
Conversation
@sobolevn I guess you'll need to activate the GitHub Actions for this repo so we can test it! |
7b2aa67
to
ef8be76
Compare
I've tested using my fork, it seems to be working: https://github.com/thepabloaguilar/ship-it-boardgame/actions/runs/7953725735 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you, looks simple enough!
Why image sizes were changed?
About the image size change I don't know, maybe when you're exporting those you're embeeding the DrawIO Diagram into the images? |
9e30b61
to
6d00dc7
Compare
attack: | ||
first_player_hand: Рука Алисы | ||
first_player_table: Стол Алисы | ||
second_player_hand: Рука Бориса |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've missed Стол Бориса
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's 'cause attack
doesn't show any table for Boris
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can reuse game_process:
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can but we should have another name for the yaml section for that 🤔
ru/schemas/card.jpg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look: the grid is gone for some reason 🤔
And the right padding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess the padding can be configurable but I'm not sure about the grid! I'm using this exporter https://github.com/jgraph/draw-image-export2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding is optional, but the grid is hard required :(
It is a part of the styleguide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna open an issue there to see if there's a parameter to pass!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sobolevn, I'm back here! I've tried to explore how things work but no success 😞
And no one answered the issue
logger = logging.getLogger(__name__) | ||
|
||
# Add your language folder below when it's ready to be rendered | ||
LANGUAGE_FOLDERS: Final = {'ru'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LANGUAGE_FOLDERS: Final = {'ru'} | |
LANGUAGE_FOLDERS: Final = frozenset({'ru'}) |
json={'format': 'jpg', 'xml': rendered}, | ||
stream=True, | ||
) | ||
assert response.status_code == 200, response.text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert response.status_code == 200, response.text | |
response.raise_for_status() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this file to tools/
and name it render-diagram.py
name: Защита | ||
types: | ||
certificate: Сертификат | ||
escape: Отговорка |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excuse
This PR introduces the initial translation setup, instead of adding a new language to test my plan is to change how the Russian is built today (but keeping it as the source of truth). Here we have the automation to render schemas from the schema resources. So far I've just changed the way of one line from
ru/schema-sources/atack1.drawio
is rendered so we can discuss more before modifying everything at once!Related #12