-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fixes pasting in chinese workshop code in chinese client. #373
Conversation
This will get overridden the next time translations are generated. Either the GUID is wrong, or the translation got updated (in which case this PR would work but we gotta make sure it doesn't get reverted when datatool comes out for the latest update) |
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.
Some of the changes here are incorrect. Not every "None" value needs to be changed from "无" to "开始加速".
For example, the following code in Simplified Chinese is valid and can be pasted:
规则("规则 1")
{
事件
{
持续 - 每名玩家;
双方;
全部;
}
动作
{
开始加速(事件玩家, 矢量(0, 0, 0), 100, 20, 至地图, 无);
}
}
(the above code translated to English)
rule("规则 1")
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Start Accelerating(Event Player, Vector(0, 0, 0), 100, 20, To World, None);
}
}
To actually fix the root issue, it would be necessary to find which string GUIDs are incorrect and fixing those, then running the translation task again.
Upon further investigation, it turns out that Overwatch itself isn't giving the right translation when copying, so fixing this translation error would require us to do one of the following:
Given the massive amount of work Option 3 would require, and that Options 1 and 2 are pretty much equally bad, this issue is going to be closed as a "won't fix" for now. To obtain an incorrect translation: |
Option 3 should be ez to do by manually overriding in astToWorkshop.ts, like I did for a similar bug with Japanese: overpy/src/compiler/astToWorkshop.ts Line 468 in e21b5fa
@kektram please provide the exact overpy code that fails (so we can know exactly which instances of "none" to replace) |
I didn't do any testing. I only verified it got fixed by manually replacing the invalid none entries with the corrected ones. I was notified of the issue with these steps:
After step 3, I manually replaced all invalid "None" entries with the corrected one, and that allowed me to paste it back in. |
If someone wants to fix this bug, all they would have to do is import |
Fixes a workshop bug specific to chinese workshop, setting "None" values to "无" instead of "全部禁用", causing projects compiled by overpy to fail to paste to workshop with errors.