Rework parse_vbox_lang, update translations from VirtualBox 6.1 and correlated contexts#249
Conversation
parse_vbox_lang.php produce quite a few errors and only work on a
single file. This should make it easier to update translations with
changes in VirtualBox. Introduced in reworked script:
- single file or directory input (batch processing)
- checks to make sure all strings are included in resulting dat file
- checks to get an overview of phpVirtualBox files compared to
VirtualBox files and if settingsGlobalLanguage.html is updated
|
Thanks. There's a lot here that's going to take a while to go through, but at a glance it looks like you're removing "About phpVirtualbox" and "Installing Guest Additions" in all the languages and replacing it with "Loading....". Is there some reason to be doing this? I can't think why we would be removing any text from the translation matrix. Not removing it would make the patch a lot smaller and easier to understand. |
|
I intended for this to be multiple PRs but probably messed something up, but the last two are connected so one would not work without the other. I know there are many changes but this can't really be done in pieces without breaking something. Rework parse_vbox_lang.phpSee commit message. Update translations from VirtualBox 6.1This is Update VirtualBox 6.1 translation contextsProbably been a while since translations have been updated. There is a lot of them but mostly simple changes in source strings to match current in VirtualBox and changes to contexts since some of them have been removed (or strings have been moved to a different context). The two biggest changes in the source files are
Regarding the changes in the XML files; there aren't many but the same change needs to be done in all of them. I've used German while working on this as the German translation is handled by the VirtualBox project. The change is then mirrored to the others. There is a "Loading ..." string in VirtualBox ts "UIVirtualMachineItemCloud" context but it is not translated and in trunk this context is removed. This is moved to the "phpVirtualBox" context. "Automatically start the machine after restore" is a new string and I couldn't find it in the VirtualBox translation files (old or current). The "UIVMDesktop" context doesn't exist anymore. This have been changed to "UIActionPool". "UIActionPool" contain "Console", "About phpVirtualBox..." and "Install Guest Additions...". If we are to mimic the VirtualBox Qt UI, "VirtualBox User Manual" isn't needed anymore and "About" needs to be changed to "About phpVirtualBox...". There is no context named "UIActionsPool" in neither phpVirtualBox nor VirtualBox. The strings in "UIActionsPool" XML exist in current VirtualBox translations so isn't needed here anyway. |
|
Sorry, I know that this is taking a really long time to go through. Just a couple of notes so far:
Combining changes in this way isn't just bad etiquette, it makes cherry-picking impossible. If we have to roll back one simple change we have to roll back all of them! |
|
I don't think I've renamed any files... and any changes to source strings aren't typo changes. They are wrong and break the translations when those are updated to 6.1. As I've said before. Lots of changes I know. But since this hasn't been updated for a long time this is necessary. It's an all or nothing change since everything is connected (source strings, contexts, etc.) Just ask if there is something unclear and I'll try to explain. |
|
FYI: parse_vbox_lang.php (deleted) => ParseVBoxLang.php (new) I'm talking about typo changes like:
There are quite a few like this which are distracting from the fundamental changes being made, particularly in a patch of this size. These don't look like fixes related to translation and don't occur inside a translate css class. It's not impossible, it just makes this a lot harder to go through because each line I have to work out what is the intention behind the change, what group of changes it's part of, etc. |
See the commit message for "Rework parse_vbox_lang.php". The script is replaced since I couldn't be sure the old script produced valid data. I needed checks and such.
This is necessary since source strings are used to lookup the translations. I actually spent quite a bit of time to find that one :-) |
|
I understand, but these are actually three separate things.
With respect to (1), leaving the original script is important so that we can test the differences in output between the old script and your new one. You said "I couldn't be sure" which isn't really very specific enough to be removing the old script. I would have expected more "Old script uses Qm files, new script works on Ts files which are what Virtualbox now uses." but I still wouldn't have deleted the old script because it's still useful until the new script is tested and accepted. With respect to (2), putting those changes into one commit separately allows us to follow and verify the changes that come specifically from the new script. I should be able to run your script and then diff the output and compare that against the proposed commit. With respect to (3), these are different to both (1) and (2) and allows us to tell what is script-related and what are human errors. By putting all these together (and deleting the old script) you're asking us just to trust your commit or (what I'm doing) go back through all this and separate the changes out into one of these three types so that I can verify it independently. |
|
This probably isn't 100% compatible with the latest VBox, but it does get us closer. Thank you @stianvis! I know how much work it is to track these translations down. |

No description provided.