Skip to content

Conversation

@zlomzlom
Copy link

Hello!

I was considering adding a new translation for the documentation, but I discovered that there is currently no available proper way of generation commands YAML, so I've made a simple Python script using two third-party libs (polib and pyyaml) to generate commands_32.yaml file. The script is grabbing command files from src/commands and reading them using regural expressions (to read only command related info). Then, grabbing translations from po/, comparing them with commands' info, translating that info and dumping it into YAML file

I kinda tested it with my localhost aegisite's translation, everything should be fine

@seproDev
Copy link
Contributor

I looked into the generation of this file a couple of years ago, and from what I could tell it was actually generated during runtime.
Your current approach can lead to incorrect data like the actual command is recent/keyframe and not recent/keyframes https://github.com/Aegisub/Aegisub/blob/6f546951b4f004da16ce19ba638bf3eedefb9f31/src/command/recent.cpp#L45

I think the generation for macros is also wrong, the command uses the registered macro and not the script name
i.e. automation/lua/macro-2-mkfullwitdh/Make fullwidth vs automation/lua/macro-2-mkfullwitdh/Make text fullwidth

@zlomzlom
Copy link
Author

it was actually generated during runtime

Well, I have no idea how to accomplish that. I can only think of some workarounds for any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants