Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Found via `typos --format brief`
  • Loading branch information
kianmeng authored and xxyzz committed Sep 29, 2023
1 parent ed989a6 commit 39722f6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,12 @@ def lemma_lang_changed(self) -> None:
language_dict = load_languages_data(get_plugin_path())
lemma_code = self.lemma_lang_box.currentData()
self.gloss_lang_box.clear()
avaliable_gloss_codes = set()
available_gloss_codes = set()
for code, value in language_dict.items():
if "lemma_languages" in value and lemma_code in value["lemma_languages"]:
self.gloss_lang_box.addItem(_(value["name"]), code)
avaliable_gloss_codes.add(code)
if self.prefer_gloss_code in avaliable_gloss_codes:
available_gloss_codes.add(code)
if self.prefer_gloss_code in available_gloss_codes:
self.gloss_lang_box.setCurrentText(
_(language_dict[self.prefer_gloss_code]["name"])
)
2 changes: 1 addition & 1 deletion docs/contributing/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Run this command to compile .mo files, you don't need to do this if you're using
$ calibre-debug -c "from calibre.translations.msgfmt import main; main()" translations/*.po
.. note::
Poedit's "Update from source code" feature would comment the language name translations then move them to the end of the file. You shold revert this change when commit.
Poedit's "Update from source code" feature would comment the language name translations then move them to the end of the file. You should revert this change when commit.

Add difficulty data to more languages
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/word_wise_db.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ senses
| 1 | 910 | 878 | 910 | 0 | 1 | 1.0 | 34284 | 0 | YSBuYW1lIG9yIHRpdGxl | YSBuYW1lIG9yIHRpdGxl | YW4gaG9ub3JhcnkgYXBwZWxsYXRpb24= |
+----+------------------+---------+---------------+----------+-----------+--------------+-----------+--------------+----------------------+----------------------+----------------------------------+

Some lemmas have mutiple senses:
Some lemmas have multiple senses:

.. code-block:: console
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Use Chocolatey or download from https://www.python.org/downloads
# choco install python
.. attention::
Do not change the default installtion settings in the Python installer.
Do not change the default installation settings in the Python installer.

Install CUDA(optional)
----------------------
Expand Down Expand Up @@ -124,4 +124,4 @@ This step is for Android users. Only KFX books are supported.
- Windows: download from https://developer.android.com/studio/releases/platform-tools

Enable USB debugging, and Rooted debugging(only send Word Wise file requires this option). For more information, please read `Android Debug Bridge user guide <https://developer.android.com/studio/command-line/adb#Enabling>`_. Rooted debugging is only available on `userdebug and eng build variant <https://source.android.com/docs/setup/create/new-device#build-variants>`_ ROMs, some custom ROMs like `LineageOS <https://lineageos.org>`_ have this option. Don't forget to diable USB debugging after the files are sent.
Enable USB debugging, and Rooted debugging(only send Word Wise file requires this option). For more information, please read `Android Debug Bridge user guide <https://developer.android.com/studio/command-line/adb#Enabling>`_. Rooted debugging is only available on `userdebug and eng build variant <https://source.android.com/docs/setup/create/new-device#build-variants>`_ ROMs, some custom ROMs like `LineageOS <https://lineageos.org>`_ have this option. Don't forget to disable USB debugging after the files are sent.
4 changes: 2 additions & 2 deletions parse_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def do_job(
return data


def calulate_final_start(data: ParseJobData) -> int:
def calculate_final_start(data: ParseJobData) -> int:
match data.book_fmt:
case "KFX":
return data.kfx_json[-1]["position"] + len( # type: ignore
Expand Down Expand Up @@ -316,7 +316,7 @@ def create_files(data: ParseJobData, prefs: Prefs, notif: Any) -> None:
return

# Kindle
final_start = calulate_final_start(data)
final_start = calculate_final_start(data)
if data.create_ww:
ll_conn, ll_path = create_lang_layer(
data.asin,
Expand Down
6 changes: 3 additions & 3 deletions send_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def send_files(self, job: Any) -> None:
)

self.move_files_to_kindle(device_mount_point, device_book_path)
libray_book_path = Path(self.job_data.book_path)
if libray_book_path.stem.endswith("_en"):
libray_book_path.unlink()
library_book_path = Path(self.job_data.book_path)
if library_book_path.stem.endswith("_en"):
library_book_path.unlink()
self.gui.status_bar.show_message(self.notif)
elif job is None or self.job_data.book_fmt == "EPUB":
# upload book and cover to device
Expand Down

0 comments on commit 39722f6

Please sign in to comment.