Skip to content

Commit

Permalink
fix: Fixed the saved config display bug for the custom engine. fixed #78
Browse files Browse the repository at this point in the history
, fixed #323
  • Loading branch information
bookfere committed Jun 2, 2024
1 parent b81fc16 commit cf30330
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/landing-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.branch }}
- name: Generate rolling release
Expand Down Expand Up @@ -57,4 +57,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.branch }}
- name: Build
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ __Plugin Homepage__: [https://translator.bookfere.com](https://translator.bookfe

## Manual

* [Tutorial](https://github.com/bookfere/Ebook-Translator-Calibre-Plugin/wiki#a-brief-tour)
* [Installation](https://github.com/bookfere/Ebook-Translator-Calibre-Plugin/wiki/English#installation)
* [Usage](https://github.com/bookfere/Ebook-Translator-Calibre-Plugin/wiki/English#usage)
* [Settings](https://github.com/bookfere/Ebook-Translator-Calibre-Plugin/wiki/English#settings)

---

# Links
## Links

* [GitHub ](https://github.com/bookfere/Ebook-Translator-Calibre-Plugin)
* [MobileRead](https://www.mobileread.com/forums/showthread.php?t=353052)
Expand Down
5 changes: 5 additions & 0 deletions advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,11 @@ def auto_open_close_splitter():
control_layout = QHBoxLayout(control)
control_layout.setContentsMargins(0, 0, 0, 0)

self.trans_worker.start.connect(
lambda: control.setVisible(False))
self.trans_worker.finished.connect(
lambda: control.setVisible(True))

save_status = QLabel()
save_button = QPushButton(_('&Save'))
save_button.setDisabled(True)
Expand Down
4 changes: 2 additions & 2 deletions lib/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ def get_engine_class(engine_name=None):
engine_class.set_engine_data(engine_data)
else:
engine_class = GoogleFreeTranslate
engine_config = config.get('engine_preferences.%s' % engine_class.name)
engine_class.set_config(engine_config or {})
engine_preferences = config.get('engine_preferences')
engine_class.set_config(engine_preferences.get(engine_class.name) or {})
return engine_class


Expand Down

0 comments on commit cf30330

Please sign in to comment.