CRITICAL FIX: translate.py - #482
Open
Freaku17 wants to merge 2 commits into
Open
Conversation
• If YOU were using `translate.py` before v1.7.40 & later updated. It worked fine. • However, if YOU installed it for the first time after v1.7.40 • Your config would not be saved. • Meaning you were unable to change your language preferences. • Reason is because, Eric (developer of bombsquad). Changed the API; instead of `ba.app.lang` made new `ba.app.locale` • This changed config "keys" into another type. • This commit/update has **FIXED** this issued entirely. • This also fixes those whose config may have been broken. (Only if it was caused by translate.py) Other changes: • Use `ba.CallPartial` instead of `ba.CallStrict` • Import `urllib` submodules • Use `daemon` for threads • If using Translate without internet, prints a warning to connect to internet. • Commit config instantly instead of waiting for bombsquad to save it (which it does automatically periodically) • Exact text_widget translate!!! (Wanted to implement this since start, until now it used `for` loop to find text & replace with translated message. Issue was, if someone spammed same message & you clicked translate on 1 message. It would've translated the first message. Instead of the "exact" message you clicked to translate. This basically fixes it, by directly passing the entire text_widget. Yippie! )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
• If YOU were using
translate.pybefore v1.7.40 & later updated. It worked fine.• However, if YOU installed it for the first time after v1.7.40
• Your config would not be saved.
• Meaning you were unable to change your language preferences.
• Reason is because, Eric (developer of bombsquad). Changed the API; instead of
ba.app.langmade newba.app.locale• This changed config "keys" into another type.
• This commit/update has FIXED this issued entirely.
• This also fixes those whose config may have been broken. (Only if it was caused by translate.py)
Other changes:
• Use
ba.CallPartialinstead ofba.CallStrict• Import
urllibsubmodules• Use
daemonfor threads• If using Translate without internet, prints a warning to connect to internet.
• Commit config instantly instead of waiting for bombsquad to save it (which it does automatically periodically)
• Exact text_widget translate!!!
(Wanted to implement this since start, until now it used
forloop to find text & replace with translated message.Issue was, if someone spammed same message & you clicked translate on 1 message.
It would've translated the first message.
Instead of the "exact" message you clicked to translate.
This basically fixes it, by directly passing the entire text_widget. Yippie! )