Skip to content

CRITICAL FIX: translate.py - #482

Open
Freaku17 wants to merge 2 commits into
bombsquad-community:mainfrom
Freaku17:main
Open

CRITICAL FIX: translate.py#482
Freaku17 wants to merge 2 commits into
bombsquad-community:mainfrom
Freaku17:main

Conversation

@Freaku17

Copy link
Copy Markdown
Collaborator

• 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! )

• 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! )
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.

1 participant