diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f770849a..e6e62a57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,101 +1,242 @@ +name: Build + +# Trigger the workflow on any push and when a release is published on: push: {} - -name: Build + release: + types: [published] env: PYTHONIOENCODING: utf-8 +# Set the permissions of GITHUB_TOKEN +permissions: + contents: write + jobs: build: name: Build - runs-on: windows-2019 + runs-on: windows-latest + strategy: + matrix: + CI_ARCH: ["x86", "x64"] # Define architectures to build for steps: + # Step 1: Check out the repository - name: Check out sources uses: actions/checkout@v4 - - name: Get Python + + # Step 2: Set up Python environment with the specified architecture + - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.10" architecture: ${{ matrix.CI_ARCH }} - - uses: actions/cache@v4 + + # Step 3: Cache dependencies to speed up builds + - name: Cache dependencies + uses: actions/cache@v4 id: cache-deps with: path: | - venv + .env bookworm/resources - key: ${{ runner.os }}-venv-${{ matrix.CI_ARCH }}-${{ hashFiles('requirements*.txt') }} - - name: Setup dependencies + key: ${{ runner.os }}-env-${{ matrix.CI_ARCH }}-${{ hashFiles('requirements*.txt') }} + + # Step 4: Install dependencies if cache is not hit + - name: Install dependencies + if: steps.cache-deps.outputs.cache-hit != 'true' run: | - python -m venv venv - venv/scripts/activate + python -m venv .env + .env\Scripts\activate pip install invoke invoke dev - if: steps.cache-deps.outputs.cache-hit != 'true' - - name: test code - run: | - venv/scripts/activate - pytest -v - - name: Build code + + # Step 5: Build the project + - name: Build the project run: | - venv/scripts/activate - invoke freeze - invoke copy-executables - invoke make-installer + .env\Scripts\activate + invoke build + invoke create-portable + + # Step 6: Generate translation catalogs and version info (only for x64) - name: Generate translation catalogs and version info if: matrix.CI_ARCH == 'x64' run: | - venv/scripts/activate + .env\Scripts\activate invoke gen-pot invoke update-version-info - - name: Upload portable build + + # Step 7: Upload installer artifact + - name: Upload installer + uses: actions/upload-artifact@v4 + with: + name: Bookworm-setup-${{ matrix.CI_ARCH }} + path: scripts\Bookworm-*-${{ matrix.CI_ARCH }}-setup.exe + + # Step 8: Upload portable version artifact + - name: Upload portable version uses: actions/upload-artifact@v4 with: name: Bookworm-portable-${{ matrix.CI_ARCH }} - path: scripts/builder/dist/${{ matrix.CI_ARCH }}/Bookworm - - name: Upload installer + path: scripts\Bookworm-*-${{ matrix.CI_ARCH }}-portable.zip + + # Step 9: Upload update bundle artifact + - name: Upload update bundle uses: actions/upload-artifact@v4 with: - name: Bookworm-setup-${{ matrix.CI_ARCH }} - path: scripts/Bookworm*setup.exe + name: Bookworm-bundle-${{ matrix.CI_ARCH }} + path: scripts\Bookworm-*-${{ matrix.CI_ARCH }}-update.bundle + + # Step 10: Upload translation catalogs (only for x64) - name: Upload translation catalogs if: matrix.CI_ARCH == 'x64' uses: actions/upload-artifact@v4 with: name: translation-catalogs - path: scripts/*.pot - - name: Upload version info - if: matrix.CI_ARCH == 'x64' && startsWith(github.ref, 'refs/tags') && !github.event_type != 'pull_request' + path: scripts\*.pot + + # Step 11: Upload release info (only for x64 and non-pull_request) + - name: Upload release info + if: matrix.CI_ARCH == 'x64' && startsWith(github.ref, 'refs/tags') && github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: name: release-info - path: scripts/release-info.json - strategy: - matrix: - CI_ARCH: ["x86", "x64"] - + path: scripts\release-info.json + + generate_update_info: + name: Generate update-info.json + runs-on: windows-latest + needs: build # Wait for the build job to complete + steps: + # Step 1: Check out the repository + - name: Check out sources + uses: actions/checkout@v4 + + # Step 2: Download update bundles from both architectures + - name: Download update bundle for x64 + uses: actions/download-artifact@v4 + with: + name: Bookworm-bundle-x64 + path: scripts + - name: Download update bundle for x86 + uses: actions/download-artifact@v4 + with: + name: Bookworm-bundle-x86 + path: scripts + + # Step 3: Set up Python environment + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + # Step 4: Install dependencies + - name: Install dependencies + run: | + python -m venv .env + .env\Scripts\activate + pip install invoke + invoke dev + + # Step 5: Generate update-info.json + - name: Generate update-info.json + run: | + .env\Scripts\activate + invoke gen-update-info-file + + # Step 6: Upload update-info.json as an artifact + - name: Upload update-info.json + uses: actions/upload-artifact@v4 + with: + name: update-info + path: update_info.json + deploy: - runs-on: ubuntu-latest - needs: ["build"] + name: Deploy + runs-on: windows-latest + needs: [build, generate_update_info] # Wait for build and generate_update_info jobs steps: - - uses: actions/download-artifact@v4 + # Step 1: Download all artifacts from previous jobs + - name: Download artifacts + uses: actions/download-artifact@v4 with: - path: ~/artifacts - - name: Zip Artifacts + path: artifacts + + # Step 2: Prepare release assets by moving them into an upload directory + - name: Prepare release assets run: | - mkdir -p upload - zip -r upload/Bookworm-portable-x64.zip Bookworm-portable-x64 - zip -r upload/Bookworm-portable-x86.zip Bookworm-portable-x86 - mv Bookworm-setup-x64/* upload - mv Bookworm-setup-x86/* upload - mv release-info/* upload || echo "No release-info" - mv translation-catalogs/* upload - - working-directory: /home/runner/artifacts - - name: Release - if: startsWith(github.ref, 'refs/tags') && !github.event_type != 'pull_request' + mkdir upload + echo Listing files in artifacts directory... + dir artifacts\ + echo Moving setup files... + move artifacts\Bookworm-setup-x86\* upload\ + move artifacts\Bookworm-setup-x64\* upload\ + echo Moving portable files... + move artifacts\Bookworm-portable-x86\* upload\ + move artifacts\Bookworm-portable-x64\* upload\ + echo Moving bundle files... + move artifacts\Bookworm-bundle-x86\* upload\ + move artifacts\Bookworm-bundle-x64\* upload\ + if exist artifacts\translation-catalogs\* (move artifacts\translation-catalogs\* upload\) else (echo "No translation catalogs") + if exist artifacts\release-info\* (move artifacts\release-info\* upload\) else (echo "No release info") + if exist artifacts\update-info\* (move artifacts\update-info\* upload\) else (echo "No update info") + shell: cmd + + # Step 3: Create a draft release (only when a tag is pushed and not for pull requests) + - name: Create Release + if: startsWith(github.ref, 'refs/tags') && github.event_name != 'pull_request' uses: ncipollo/release-action@v1 with: - artifacts: "/home/runner/artifacts/upload/*" + artifacts: 'upload\*' draft: true generateReleaseNotes: true + + submit_update_info: + name: Submit update_info.json to main + runs-on: windows-latest + if: github.event_name == 'release' && github.event.action == 'published' # Trigger when the release is published + steps: + # Step 1: Check out the repository + - name: Check out sources + uses: actions/checkout@v4 + + # Step 2: Download update_info.json from the release assets + - name: Download update_info.json from release + env: + PAT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + $ReleaseAssetsUrl = "${{ github.event.release.assets_url }}" + Write-Host "Fetching release assets from: $ReleaseAssetsUrl" + $AuthHeader = "token $env:PAT_TOKEN" + $Headers = @{ + Authorization = "token $env:PAT_TOKEN" + Accept = "application/vnd.github.v3+json" + } + $Assets = Invoke-RestMethod -Headers $Headers -Uri $ReleaseAssetsUrl + $UpdateInfoAsset = $Assets | Where-Object { $_.name -eq "update_info.json" } + if ($UpdateInfoAsset -ne $null) { + Write-Host "Downloading update_info.json from: $($UpdateInfoAsset.browser_download_url)" + Invoke-WebRequest -Headers $Headers -Uri $UpdateInfoAsset.browser_download_url -OutFile update_info.json + } else { + Write-Error "update_info.json not found in release assets" + exit 1 + } + shell: pwsh + + # Step 3: Set up Git user + - name: Configure Git + run: | + git config user.name "GitHub Action" + git config user.email "action@github.com" + + # Step 4: Create Pull Request to main branch + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'Update update_info.json after release' + branch: update-info/${{ github.run_id }} + title: 'Update update_info.json after release' + body: 'This Pull Request updates update_info.json after the release is published.' + labels: 'automation' + base: main diff --git a/appveyor.yml b/appveyor.yml index 1f1f307d..2de345df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,81 +1,83 @@ -os: Visual Studio 2019 - -clone_depth: 1 - -branches: - only: - - main - - develop - - next - - /try.*/ - - /dev.*/ - - /release-.*/ - -environment: - github_access_token: - secure: "ogfTv7V0xR13ETjrC+koS7ZURfl0KLRfwcjYBexoiB1gcc5pppO/H42BopJWl0ua" - -install: - # Install hyperfine for benchmarking - - cinst hyperfine - # NSIS Paths - # https://www.appveyor.com/docs/build-environment/#tools - - set PATH=%PATH%;C:\Program Files (x86)\NSIS - # Python stdout encoding - - set PYTHONIOENCODING=utf-8 - - -build_script: - # 32-bit version - - ps: Write-Host "Building the 32-bit variant." - - py -3.10-32 -m venv .venv32 - - call ".venv32\Scripts\activate.bat" - - python -m pip install invoke - - invoke dev - - python -m pytest -vvv - - invoke build - - invoke create-portable - - invoke bench - - deactivate - # 64-bit version - - ps: Write-Host "Building the 64-bit variant." - - py -3.10-64 -m venv .venv64 - - call ".venv64\Scripts\activate.bat" - - python -m pip install invoke - - invoke dev - - python -m pytest -vvv - - invoke build - - invoke create-portable - - invoke bench - # Update the release info file - - invoke update-version-info - - invoke gen-pot - - -artifacts: - - path: scripts\Bookworm*setup.exe - - path: scripts\Bookworm*update.bundle - - path: scripts\Bookworm*portable.zip - - path: scripts\release-info.json - - path: scripts\benchmark*.json - - path: scripts\bookworm*.pot - - -on_success: - - ps: | - if ($env:APPVEYOR_REPO_TAG_NAME -and $env:APPVEYOR_REPO_TAG_NAME.StartsWith("release-")) { - echo "Updating version information for this release." - } - - -deploy: - release: "Bookworm Release (Build v$(appveyor_build_version))" - description: "Uploaded from appveyor by the build bot" - provider: GitHub - auth_token: - secure: "ogfTv7V0xR13ETjrC+koS7ZURfl0KLRfwcjYBexoiB1gcc5pppO/H42BopJWl0ua" - artifact: /Bookworm-.*-setup\.exe/, /Bookworm-.*-update\.bundle/, /Bookworm-.*-portable\.zip/, /release-info\.json/, /bookworm-.*\.pot/, /benchmark.*\.json/ - draft: true - prerelease: true - on: - APPVEYOR_REPO_TAG: true +os: Visual Studio 2019 + +clone_depth: 1 + +branches: + only: + - main + - develop + - next + - /try.*/ + - /dev.*/ + - /release-.*/ + +environment: + github_access_token: + secure: "ogfTv7V0xR13ETjrC+koS7ZURfl0KLRfwcjYBexoiB1gcc5pppO/H42BopJWl0ua" + +install: + # Install Chocolatey if not already installed + - powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" + # Install hyperfine without reboot + - choco install hyperfine --params "/norestart" + # NSIS Paths + # https://www.appveyor.com/docs/build-environment/#tools + - set PATH=%PATH%;C:\Program Files (x86)\NSIS + # Python stdout encoding + - set PYTHONIOENCODING=utf-8 + + +build_script: + # 32-bit version + - ps: Write-Host "Building the 32-bit variant." + - py -3.10-32 -m venv .venv32 + - call ".venv32\Scripts\activate.bat" + - python -m pip install invoke + - invoke dev + - python -m pytest -vvv + - invoke build + - invoke create-portable + - invoke bench + - deactivate + # 64-bit version + - ps: Write-Host "Building the 64-bit variant." + - py -3.10-64 -m venv .venv64 + - call ".venv64\Scripts\activate.bat" + - python -m pip install invoke + - invoke dev + - python -m pytest -vvv + - invoke build + - invoke create-portable + - invoke bench + # Update the release info file + - invoke update-version-info + - invoke gen-pot + + +artifacts: + - path: scripts\Bookworm*setup.exe + - path: scripts\Bookworm*update.bundle + - path: scripts\Bookworm*portable.zip + - path: scripts\release-info.json + - path: scripts\benchmark*.json + - path: scripts\bookworm*.pot + + +on_success: + - ps: | + if ($env:APPVEYOR_REPO_TAG_NAME -and $env:APPVEYOR_REPO_TAG_NAME.StartsWith("release-")) { + echo "Updating version information for this release." + } + + +deploy: + release: "Bookworm Release (Build v$(appveyor_build_version))" + description: "Uploaded from appveyor by the build bot" + provider: GitHub + auth_token: + secure: "ogfTv7V0xR13ETjrC+koS7ZURfl0KLRfwcjYBexoiB1gcc5pppO/H42BopJWl0ua" + artifact: /Bookworm-.*-setup\.exe/, /Bookworm-.*-update\.bundle/, /Bookworm-.*-portable\.zip/, /release-info\.json/, /bookworm-.*\.pot/, /benchmark.*\.json/ + draft: true + prerelease: true + on: + APPVEYOR_REPO_TAG: true diff --git a/bookworm/app.py b/bookworm/app.py index baa79a6b..01a015bb 100644 --- a/bookworm/app.py +++ b/bookworm/app.py @@ -13,7 +13,7 @@ version_ex = "2022.1.0.30" url = "https://github.com/blindpandas/bookworm" website = "https://getbookworm.com" -update_url = "https://getbookworm.com/update_info.json" +update_url = "https://github.com/blindpandas/bookworm/blob/main/update_info.json" copyright = f"Copyright (c) 2022 {author} and {display_name} contributors." exit_code = 0 is_frozen = getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS") diff --git a/bookworm/document/formats/epub.py b/bookworm/document/formats/epub.py index 1dadc087..e6a99dac 100644 --- a/bookworm/document/formats/epub.py +++ b/bookworm/document/formats/epub.py @@ -82,8 +82,15 @@ def metadata(self): desc = HTMLParser(info.get("description", "")).text() except: desc = None + date_value = info.get("date", "") + if not isinstance(date_value, str): + log.warning(f"Unexpected date format: {type(date_value)}. Converting to string.") + if isinstance(date_value, (int, float)): + date_value = str(date_value) + else: + date_value = "" if pubdate := dateparser.parse( - info.get("date", ""), + date_value, languages=[ self.language.two_letter_language_code, ], @@ -92,7 +99,7 @@ def metadata(self): pubdate, date_only=True, format="long", localized=True ) else: - publish_date = "" + publish_date = "Unknown Publication Date" return BookMetadata( title=self.epub.title, author=author.removeprefix("By ").strip(), diff --git a/bookworm/gui/settings.py b/bookworm/gui/settings.py index 1bc691fe..5c7fbf40 100644 --- a/bookworm/gui/settings.py +++ b/bookworm/gui/settings.py @@ -16,7 +16,7 @@ from bookworm.paths import app_path from bookworm.platforms import PLATFORM from bookworm.resources import app_icons -from bookworm.shell import shell_disintegrate, shell_integrate +from bookworm.shell import shell_disintegrate, shell_integrate,is_file_type_associated from bookworm.shellinfo import get_ext_info from bookworm.signals import app_started, config_updated from bookworm.utils import restart_application @@ -39,7 +39,6 @@ class ReconciliationStrategies(IntEnum): load = auto() save = auto() - class FileAssociationDialog(SimpleDialog): """Associate supported file types.""" @@ -58,8 +57,8 @@ def addControls(self, parent): parent, -1, _( - "This dialog will help you to setup file associations.\n" - "Associating files with Bookworm means that when you click on a file in windows explorer, it will be opened in Bookworm by default " + "This dialog will help you to set up file associations.\n" + "Associating files with Bookworm means that when you click on a file in Windows Explorer, it will be opened in Bookworm by default." ), ) masterPanel = sc.SizedPanel(parent, -1) @@ -69,9 +68,7 @@ def addControls(self, parent): assoc_btn = CommandLinkButton( panel1, -1, - # Translators: the main label of a button _("Associate all"), - # Translators: the note of a button _("Use Bookworm to open all supported document formats"), ) half = len(self.ext_info) / 2 @@ -79,29 +76,72 @@ def addControls(self, parent): for i, (ext, metadata) in enumerate(self.ext_info): if i >= half: buttonPanel = panel2 - # Translators: the main label of a button - mlbl = _("Associate files of type {format}").format(format=metadata[1]) - # Translators: the note of a button - nlbl = _( - "Associate files with {ext} extension so they always open in Bookworm" - ).format(ext=ext) - btn = CommandLinkButton(buttonPanel, -1, mlbl, nlbl) - self.Bind( - wx.EVT_BUTTON, - lambda e, args=(ext, metadata[1]): self.onFileAssoc(*args), - btn, - ) + # Create button + btn = CommandLinkButton(buttonPanel, -1, "", "") + # Update the button with the correct label and event handler + self.update_button_for_file_type(btn, ext, metadata) dissoc_btn = CommandLinkButton( panel2, -1, - # Translators: the main label of a button _("Dissociate all supported file types"), - # Translators: the note of a button _("Remove previously associated file types"), ) self.Bind(wx.EVT_BUTTON, lambda e: self.onBatchAssoc(assoc=True), assoc_btn) self.Bind(wx.EVT_BUTTON, lambda e: self.onBatchAssoc(assoc=False), dissoc_btn) + def update_button_for_file_type(self, btn, ext, metadata): + """ + Updates the button's label and event handler based on the file type's association status. + + Args: + btn (wx.CommandLinkButton): The button to update. + ext (str): The file extension associated with the button. + metadata (tuple): The metadata tuple containing prog_id, description, and icon. + """ + is_associated = is_file_type_associated(ext) + if is_associated: + # Translators: the main label of a button + mlbl = _("Dissociate files of type {format}").format(format=metadata[1]) + # Translators: the note of a button + nlbl = _("Dissociate files with {ext} extension so they no longer open in Bookworm").format(ext=ext) + btn.SetLabel(mlbl) + btn.SetNote(nlbl) + btn.Bind(wx.EVT_BUTTON, lambda e: self.on_disassociate(btn, ext, metadata)) + else: + # Translators: the main label of a button + mlbl = _("Associate files of type {format}").format(format=metadata[1]) + # Translators: the note of a button + nlbl = _("Associate files with {ext} extension so they always open in Bookworm").format(ext=ext) + btn.SetLabel(mlbl) + btn.SetNote(nlbl) + btn.Bind(wx.EVT_BUTTON, lambda e: self.on_associate(btn, ext, metadata)) + + def on_disassociate(self, btn, ext, metadata): + """ + Handles the disassociation of a file type. + + Args: + btn (wx.CommandLinkButton): The button associated with the action. + ext (str): The file extension to disassociate. + metadata (tuple): The metadata associated with the file type. + """ + shell_disintegrate(supported=ext) + # After disassociating, update the button to reflect the change + self.update_button_for_file_type(btn, ext, metadata) + + def on_associate(self, btn, ext, metadata): + """ + Handles the association of a file type. + + Args: + btn (wx.CommandLinkButton): The button associated with the action. + ext (str): The file extension to associate. + metadata (tuple): The metadata associated with the file type. + """ + shell_integrate(supported=ext) + # After associating, update the button to reflect the change + self.update_button_for_file_type(btn, ext, metadata) + def getButtons(self, parent): btnsizer = wx.StdDialogButtonSizer() cancelBtn = wx.Button(self, wx.ID_CANCEL, _("&Close")) diff --git a/bookworm/ocr/ocr_menu.py b/bookworm/ocr/ocr_menu.py index 45e01074..4af07b43 100644 --- a/bookworm/ocr/ocr_menu.py +++ b/bookworm/ocr/ocr_menu.py @@ -315,22 +315,25 @@ def _continue_with_text_extraction(self, ocr_opts, output_file, progress_dlg): target=self.service.current_ocr_engine.scan_to_text, args=args ) progress_dlg.set_abort_callback(scan2text_process.cancel) - scan2text_process.add_done_callback( - wx.CallAfter, - wx.MessageBox, - _( - "Successfully processed {total} pages.\nExtracted text was written to: {file}" - ).format(total=total, file=output_file), - _("OCR Completed"), - wx.ICON_INFORMATION, - ) - for progress in scan2text_process: - progress_dlg.Update( - progress + 1, - f"Scanning page {progress} of {total}", + + try: + for progress in scan2text_process: + progress_dlg.Update( + progress + 1, + f"Scanning page {progress} of {total}", + ) + wx.CallAfter( + wx.MessageBox, + message = _( + "Successfully processed {total} pages.\nExtracted text was written to: {file}" + ).format(total=total, file=output_file), + caption = _("OCR Completed"), + style = wx.ICON_INFORMATION | wx.OK, + parent = self.view # 设置 parent 确保对话框聚焦 ) - progress_dlg.Dismiss() - wx.CallAfter(self.view.contentTextCtrl.SetFocus) + finally: + progress_dlg.Dismiss() + wx.CallAfter(self.view.contentTextCtrl.SetFocus) def onChangeOCROptions(self, event): self._get_ocr_options(from_cache=False) diff --git a/bookworm/otau.py b/bookworm/otau.py index 9acdc368..d89541e1 100644 --- a/bookworm/otau.py +++ b/bookworm/otau.py @@ -28,7 +28,9 @@ def __hash__(self): @field_validator("root") @classmethod def validate_identifier(cls, v: str): - if v not in ["", "b", "a", "dev"]: + if v is None: + v = "" + if v not in ["", "b", "a", "rc"]: raise TypeError("Unrecognized release identifier") return v @@ -61,6 +63,8 @@ def channels(self) -> Tuple[UpdateChannel]: return tuple(self.root.keys()) def get_update_info_for_channel(self, channel_identifier: str) -> VersionInfo: + if channel_identifier is None: + channel_identifier = "" return self.root.get(UpdateChannel.model_validate(channel_identifier)) diff --git a/bookworm/platforms/win32/shell.py b/bookworm/platforms/win32/shell.py index c27ed56c..38068ea3 100644 --- a/bookworm/platforms/win32/shell.py +++ b/bookworm/platforms/win32/shell.py @@ -101,3 +101,19 @@ def shell_disintegrate(supported="*"): for ext, (prog_id, desc, icon) in doctypes.items(): remove_association(ext, prog_id) shell_notify_association_changed() + + +def is_file_type_associated(ext): + ext_info = get_ext_info([ext]) + prog_id, _, _ = ext_info[ext] + try: + with RegKey.LocalSoftware(rf"{ext}\OpenWithProgids") as key: + key.get_value(prog_id) + return True + except FileNotFoundError: + return False + except PermissionError: + return False + except Exception as e: + log.exception(f"Unexpected error when checking file association for {ext}: {str(e)}") + return False diff --git a/bookworm/platforms/win32/speech_engines/piper/__init__.py b/bookworm/platforms/win32/speech_engines/piper/__init__.py index 8d26f186..c1cccf0b 100644 --- a/bookworm/platforms/win32/speech_engines/piper/__init__.py +++ b/bookworm/platforms/win32/speech_engines/piper/__init__.py @@ -41,7 +41,9 @@ "pyper", "espeak-ng.dll" ) if not espeak_dll_dst.exists(): - os.link(espeak_ng_dll, espeak_dll_dst) + os.symlink(espeak_ng_dll, espeak_dll_dst) + + from ..utils import _audio_uri_to_filepath diff --git a/bookworm/platforms/win32/updater.py b/bookworm/platforms/win32/updater.py index 291b40fc..e4c145d9 100644 --- a/bookworm/platforms/win32/updater.py +++ b/bookworm/platforms/win32/updater.py @@ -179,7 +179,7 @@ def execute_bootstrap(extraction_dir): log.info("Executing bootstrap to complete update.") move_to = extraction_dir.parent shutil.move(str(extraction_dir / "bootstrap.exe"), str(move_to)) - args = f'"{os.getpid()}" "{extraction_dir}" "{paths.app_path()}" "{sys.executable}"' + args = f'"{os.getpid()}" "{extraction_dir}" "{Path(paths.app_path()).parent}" "{sys.executable}"' viewer = wx.GetApp().mainFrame if viewer.reader.ready: viewer.reader.save_current_position() diff --git a/bookworm/resources/locale/zh_CN/LC_MESSAGES/bookworm.po b/bookworm/resources/locale/zh_CN/LC_MESSAGES/bookworm.po index 48b059bb..549e69de 100644 --- a/bookworm/resources/locale/zh_CN/LC_MESSAGES/bookworm.po +++ b/bookworm/resources/locale/zh_CN/LC_MESSAGES/bookworm.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: 'Bookworm'\n" "Report-Msgid-Bugs-To: ibnomer2011@hotmail.com\n" -"POT-Creation-Date: 2023-03-20 01:27+0000\n" -"PO-Revision-Date: 2023-03-20 13:51+0800\n" +"POT-Creation-Date: 2024-08-26 09:17+0800\n" +"PO-Revision-Date: 2024-08-26 10:02+0800\n" "Last-Translator: Cary-rowen \n" "Language-Team: Cary-Rowen \n" "Language: zh_CN\n" @@ -17,24 +17,24 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "Generated-By: Babel 2.9.1\n" -"X-Generator: Poedit 2.4.3\n" +"X-Generator: Poedit 3.4.4\n" "X-Poedit-SourceCharset: UTF-8\n" #. Translators: the content of a message indicating a connection error -#: bookworm/otau.py:76 +#: bookworm/otau.py:78 msgid "We couldn't access the internet right now. Please try again later." msgstr "当前无法连接网络,请稍后再试。" #. Translators: the title of a message indicating a connection error #. Translators: the title of a message indicating a failure in downloading an #. update -#: bookworm/otau.py:78 bookworm/platforms/win32/updater.py:120 +#: bookworm/otau.py:80 bookworm/platforms/win32/updater.py:119 msgid "Network Error" msgstr "网络错误" #. Translators: the content of a message indicating an error while updating the #. app -#: bookworm/otau.py:88 +#: bookworm/otau.py:90 msgid "" "We have faced a technical problem while checking for updates. Please try " "again later." @@ -42,13 +42,13 @@ msgstr "检查更新过程中遇到了问题。请稍后再试。" #. Translators: the title of a message indicating an error while updating the #. app -#: bookworm/otau.py:92 +#: bookworm/otau.py:94 msgid "Error Checking For Updates" msgstr "检查更新出错" #. Translators: the content of a message indicating that there is no new #. version -#: bookworm/otau.py:109 +#: bookworm/otau.py:111 msgid "" "Congratulations, you have already got the latest version of Bookworm.\n" "We are working day and night on making Bookworm better. The next version of " @@ -61,142 +61,142 @@ msgstr "" "待。我们会在发布新版时通知您。" #. Translators: the title of a message indicating that there is no new version -#: bookworm/otau.py:116 +#: bookworm/otau.py:118 msgid "No Update" msgstr "当前已是最新版" #. Translators: the label of an item in the application menubar -#: bookworm/otau.py:141 +#: bookworm/otau.py:143 msgid "&Check for updates" msgstr "检测更新(&C)" #. Translators: the help text of an item in the application menubar -#: bookworm/otau.py:143 +#: bookworm/otau.py:145 msgid "Update the application" msgstr "更新应用程序" #. Translators: the title of the window when an e-book is open -#: bookworm/reader.py:426 +#: bookworm/reader.py:439 msgid "{title} — by {author}" msgstr "{title} —作者 {author}" #. Translators: title of a message dialog that shows a table as html document -#: bookworm/reader.py:443 +#: bookworm/reader.py:456 msgid "Table View" msgstr "表格试图" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/__init__.py:61 +#: bookworm/annotation/__init__.py:69 msgid "&Annotation" msgstr "注解(&A)" -#: bookworm/annotation/__init__.py:69 +#: bookworm/annotation/__init__.py:77 msgid "&Bookmark...\tCtrl-B" msgstr "添加书签... \tCtrl-B" -#: bookworm/annotation/__init__.py:70 bookworm/annotation/__init__.py:76 +#: bookworm/annotation/__init__.py:78 bookworm/annotation/__init__.py:84 msgid "Bookmark the current location" msgstr "在当前位置添加书签" -#: bookworm/annotation/__init__.py:75 +#: bookworm/annotation/__init__.py:83 msgid "&Named Bookmark...\tCtrl-Shift-B" msgstr "命名书签(&N)...\tCtrl-Shift-B" -#: bookworm/annotation/__init__.py:81 +#: bookworm/annotation/__init__.py:89 msgid "Co&mment...\tCtrl-m" msgstr "注释... \tCtrl-m" -#: bookworm/annotation/__init__.py:82 +#: bookworm/annotation/__init__.py:90 msgid "Add a comment at the current location" msgstr "在当前位置添加注释" -#: bookworm/annotation/__init__.py:92 +#: bookworm/annotation/__init__.py:100 msgid "Highlight Selection\tCtrl-Shift-H" msgstr "标记为高亮... \tCtrl-Shift-H" -#: bookworm/annotation/__init__.py:93 +#: bookworm/annotation/__init__.py:101 msgid "Highlight and save selected text." msgstr "高亮显示并保存所选文本。" #. Translators: the label of a button in the application toolbar #. Translators: spoken message when jumping to a bookmark -#: bookworm/annotation/__init__.py:102 bookworm/annotation/__init__.py:139 +#: bookworm/annotation/__init__.py:110 bookworm/annotation/__init__.py:147 msgid "Bookmark" msgstr "书签" #. Translators: the label of a button in the application toolbar -#: bookworm/annotation/__init__.py:104 +#: bookworm/annotation/__init__.py:112 msgid "Comment" msgstr "注释" #. Translators: the label of a page in the settings dialog #. Translators: label for a aria region containing annotation #. used when exporting annotations to HTML -#: bookworm/annotation/__init__.py:114 +#: bookworm/annotation/__init__.py:122 #: bookworm/annotation/exporters/core_renderers.py:171 msgid "Annotation" msgstr "注解" #. Translators: spoken message -#: bookworm/annotation/__init__.py:127 +#: bookworm/annotation/__init__.py:135 msgid "No next bookmark" msgstr "往下没有书签" #. Translators: spoken message -#: bookworm/annotation/__init__.py:130 +#: bookworm/annotation/__init__.py:138 msgid "No previous bookmark" msgstr "往上没有书签" #. Translators: spoken message -#: bookworm/annotation/__init__.py:157 +#: bookworm/annotation/__init__.py:165 msgid "No next comment" msgstr "往下没有注释" #. Translators: spoken message -#: bookworm/annotation/__init__.py:160 +#: bookworm/annotation/__init__.py:168 msgid "No previous comment" msgstr "往上没有注释" #. Translators: spoken message when jumping to a comment -#: bookworm/annotation/__init__.py:171 +#: bookworm/annotation/__init__.py:179 msgid "Comment: {comment}" msgstr "注释: {comment}" #. Translators: spoken message -#: bookworm/annotation/__init__.py:184 +#: bookworm/annotation/__init__.py:192 msgid "No next highlight" msgstr "往下没有高亮" #. Translators: spoken message -#: bookworm/annotation/__init__.py:187 +#: bookworm/annotation/__init__.py:195 msgid "No previous highlight" msgstr "往上没有高亮" -#: bookworm/annotation/__init__.py:197 +#: bookworm/annotation/__init__.py:205 msgid "Highlight" msgstr "高亮" #. Translators: spoken message indicating the presence of an annotation when #. the user navigates the text -#: bookworm/annotation/__init__.py:239 +#: bookworm/annotation/__init__.py:247 msgid "Bookmarked" msgstr "书签" #. Translators: spoken message indicating the presence of an annotation when #. the user navigates the text -#: bookworm/annotation/__init__.py:242 +#: bookworm/annotation/__init__.py:250 msgid "Highlighted" msgstr "高亮" #. Translators: spoken message indicating the presence of an annotation when #. the user navigates the text -#: bookworm/annotation/__init__.py:245 +#: bookworm/annotation/__init__.py:253 msgid "Line contains highlight" msgstr "行包含高亮" #. Translators: spoken message indicating the presence of an annotation when #. the user navigates the text -#: bookworm/annotation/__init__.py:248 +#: bookworm/annotation/__init__.py:256 msgid "Has comment" msgstr "有注释" @@ -207,16 +207,16 @@ msgstr "有注释" #. content when searching the bookshelf #. Translators: the label of the text area which shows the #. content of the current page -#: bookworm/annotation/annotation_dialogs.py:56 -#: bookworm/annotation/annotation_dialogs.py:263 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:122 -#: bookworm/gui/book_viewer/__init__.py:307 +#: bookworm/annotation/annotation_dialogs.py:59 +#: bookworm/annotation/annotation_dialogs.py:266 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:126 +#: bookworm/gui/book_viewer/__init__.py:317 msgid "Content" msgstr "内容" #. Translators: header of a group of controls in a dialog to view/edit #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:60 +#: bookworm/annotation/annotation_dialogs.py:63 msgid "Metadata" msgstr "元数据" @@ -225,21 +225,21 @@ msgstr "元数据" #. Translators: label of an edit control that allows the user to edit the tag #. set of a comment/highlight #. Translators: written to output document when exporting a comment/highlight -#: bookworm/annotation/annotation_dialogs.py:63 -#: bookworm/annotation/annotation_dialogs.py:519 +#: bookworm/annotation/annotation_dialogs.py:66 +#: bookworm/annotation/annotation_dialogs.py:522 #: bookworm/annotation/exporters/core_renderers.py:201 msgid "Tags" msgstr "标签" #. Translators: label of an edit control in a dialog to view/edit #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:68 +#: bookworm/annotation/annotation_dialogs.py:71 msgid "Date Created" msgstr "创建日期" #. Translators: label of an edit control in a dialog to view/edit #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:74 +#: bookworm/annotation/annotation_dialogs.py:77 msgid "Last updated" msgstr "最近更新时间" @@ -247,38 +247,38 @@ msgstr "最近更新时间" #. Translators: the label of the cancel button in a dialog #. Translators: the label of the close button in a dialog #. Translators: the label of a button to close the dialog -#: bookworm/annotation/annotation_dialogs.py:88 -#: bookworm/annotation/annotation_dialogs.py:145 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:173 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:241 -#: bookworm/gui/book_viewer/core_dialogs.py:398 bookworm/gui/settings.py:103 -#: bookworm/ocr/ocr_dialogs.py:416 bookworm/text_to_speech/tts_gui.py:328 +#: bookworm/annotation/annotation_dialogs.py:91 +#: bookworm/annotation/annotation_dialogs.py:148 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:177 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:245 +#: bookworm/gui/book_viewer/core_dialogs.py:407 bookworm/gui/settings.py:147 +#: bookworm/ocr/ocr_dialogs.py:428 bookworm/text_to_speech/tts_gui.py:331 #: bookworm/webservices/wikiworm.py:215 msgid "&Close" msgstr "关闭(&C)" #. Translators: label for unnamed bookmarks shown #. when editing a single bookmark which has no name -#: bookworm/annotation/annotation_dialogs.py:122 +#: bookworm/annotation/annotation_dialogs.py:125 msgid "[Unnamed Bookmark]" msgstr "[未命名书签]" #. Translators: label of a list control containing bookmarks -#: bookworm/annotation/annotation_dialogs.py:127 +#: bookworm/annotation/annotation_dialogs.py:130 msgid "Saved Bookmarks" msgstr "保存书签" #. Translators: text of a button to remove bookmarks #. Translators: text of a button to remove a language from Tesseract OCR Engine #. Translators: the label of a button to remove a voice profile -#: bookworm/annotation/annotation_dialogs.py:130 -#: bookworm/ocr/ocr_dialogs.py:455 bookworm/text_to_speech/tts_gui.py:322 +#: bookworm/annotation/annotation_dialogs.py:133 +#: bookworm/ocr/ocr_dialogs.py:467 bookworm/text_to_speech/tts_gui.py:325 msgid "&Remove" msgstr "删除(&R)" #. Translators: the title of a column in the bookmarks list -#: bookworm/annotation/annotation_dialogs.py:154 -#: bookworm/gui/book_viewer/core_dialogs.py:256 +#: bookworm/annotation/annotation_dialogs.py:157 +#: bookworm/gui/book_viewer/core_dialogs.py:265 msgid "Name" msgstr "名称" @@ -289,11 +289,11 @@ msgstr "名称" #. Translators: the title of a column in the search results list #. Translators: the label of the image of a page in a dialog to render the #. current page -#: bookworm/annotation/annotation_dialogs.py:161 -#: bookworm/annotation/annotation_dialogs.py:352 +#: bookworm/annotation/annotation_dialogs.py:164 +#: bookworm/annotation/annotation_dialogs.py:355 #: bookworm/annotation/exporters/core_renderers.py:178 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:192 -#: bookworm/gui/book_viewer/core_dialogs.py:51 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:196 +#: bookworm/gui/book_viewer/core_dialogs.py:60 #: bookworm/gui/book_viewer/render_view.py:32 msgid "Page" msgstr "页" @@ -302,16 +302,16 @@ msgstr "页" #. Translators: label of an editable combobox to filter annotations by section #. Translators: the title of a column in the search results list #. showing the title of the chapter in which this occurrence was found -#: bookworm/annotation/annotation_dialogs.py:169 -#: bookworm/annotation/annotation_dialogs.py:258 +#: bookworm/annotation/annotation_dialogs.py:172 +#: bookworm/annotation/annotation_dialogs.py:261 #: bookworm/annotation/exporters/core_renderers.py:145 -#: bookworm/gui/book_viewer/core_dialogs.py:66 +#: bookworm/gui/book_viewer/core_dialogs.py:75 msgid "Section" msgstr "章节" #. Translators: content of a message asking the user if they want to delete a #. bookmark -#: bookworm/annotation/annotation_dialogs.py:216 +#: bookworm/annotation/annotation_dialogs.py:219 msgid "" "This action can not be reverted.\r\n" "Are you sure you want to remove this bookmark?" @@ -321,88 +321,88 @@ msgstr "" #. Translators: title of a message asking the user if they want to delete a #. bookmark -#: bookworm/annotation/annotation_dialogs.py:220 +#: bookworm/annotation/annotation_dialogs.py:223 msgid "Remove Bookmark?" msgstr "删除书签?" #. Translators: label of an editable combobox to filter annotations by book #. Translators: text of a toggle button to sort comments/highlights list -#: bookworm/annotation/annotation_dialogs.py:247 -#: bookworm/annotation/annotation_dialogs.py:356 -#: bookworm/annotation/annotation_dialogs.py:552 +#: bookworm/annotation/annotation_dialogs.py:250 +#: bookworm/annotation/annotation_dialogs.py:359 +#: bookworm/annotation/annotation_dialogs.py:555 #: bookworm/annotation/exporters/core_renderers.py:143 msgid "Book" msgstr "文档" #. Translators: label of an editable combobox to filter annotations by tag -#: bookworm/annotation/annotation_dialogs.py:252 +#: bookworm/annotation/annotation_dialogs.py:255 #: bookworm/annotation/exporters/core_renderers.py:147 msgid "Tag" msgstr "标签" #. Translators: text of a button to apply chosen filters in a dialog to view #. user's comments/highlights -#: bookworm/annotation/annotation_dialogs.py:268 +#: bookworm/annotation/annotation_dialogs.py:271 msgid "&Apply" msgstr "应用(&A)" #. Translators: the title of a column in the comments/highlights list #. Translators: header of a group of controls in a dialog to view user's #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:335 +#: bookworm/annotation/annotation_dialogs.py:338 msgid "Filter By" msgstr "过滤" #. Translators: header of a group of controls in a dialog to view user's #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:344 +#: bookworm/annotation/annotation_dialogs.py:347 msgid "Sort By" msgstr "排序方式" #. Translators: text of a toggle button to sort comments/highlights list -#: bookworm/annotation/annotation_dialogs.py:350 +#: bookworm/annotation/annotation_dialogs.py:353 msgid "Date" msgstr "日期" #. Translators: text of a toggle button to sort comments/highlights list -#: bookworm/annotation/annotation_dialogs.py:362 +#: bookworm/annotation/annotation_dialogs.py:365 msgid "Ascending" msgstr "上升" #. Translators: text of a button in a dialog to view comments/highlights -#: bookworm/annotation/annotation_dialogs.py:371 +#: bookworm/annotation/annotation_dialogs.py:374 msgid "&View..." msgstr "查看(&V)" #. Translators: text of a button in a dialog to view comments/highlights #. Translators: the label of a button to edit a voice profile -#: bookworm/annotation/annotation_dialogs.py:374 -#: bookworm/text_to_speech/tts_gui.py:320 +#: bookworm/annotation/annotation_dialogs.py:377 +#: bookworm/text_to_speech/tts_gui.py:323 msgid "&Edit..." msgstr "编辑(&E)" #. Translators: text of a button in a dialog to view comments/highlights -#: bookworm/annotation/annotation_dialogs.py:377 +#: bookworm/annotation/annotation_dialogs.py:380 msgid "&Delete..." msgstr "删除(&D)..." #. Translators: text of a button in a dialog to view comments/highlights -#: bookworm/annotation/annotation_dialogs.py:379 +#: bookworm/annotation/annotation_dialogs.py:382 msgid "E&xport..." msgstr "导出(&X)" #. Translators: title of a dialog to view or edit a single comment/highlight -#: bookworm/annotation/annotation_dialogs.py:451 +#: bookworm/annotation/annotation_dialogs.py:454 msgid "Editing" msgstr "编辑" -#: bookworm/annotation/annotation_dialogs.py:451 +#: bookworm/annotation/annotation_dialogs.py:454 msgid "View" msgstr "查看" #. Translators: content of a message asking the user if they want to delete a #. comment/highlight -#: bookworm/annotation/annotation_dialogs.py:468 +#: bookworm/annotation/annotation_dialogs.py:471 msgid "" "This action can not be reverted.\r\n" "Are you sure you want to remove this item?" @@ -412,259 +412,259 @@ msgstr "" #. Translators: title of a message asking the user if they want to delete a #. bookmark -#: bookworm/annotation/annotation_dialogs.py:472 +#: bookworm/annotation/annotation_dialogs.py:475 msgid "Delete Annotation?" msgstr "删除注释?" #. Translators: title of a dialog that allows the user to edit the tag set of a #. comment/highlight -#: bookworm/annotation/annotation_dialogs.py:517 +#: bookworm/annotation/annotation_dialogs.py:520 msgid "Edit Tags" msgstr "编辑标签" #. Translators: title of a dialog that allows the user to customize #. how comments/highlights are exported -#: bookworm/annotation/annotation_dialogs.py:530 +#: bookworm/annotation/annotation_dialogs.py:533 msgid "Export Options" msgstr "导出选项" #. Translators: label of a checkbox in a dialog to set export options for #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:590 +#: bookworm/annotation/annotation_dialogs.py:593 msgid "Include book title" msgstr "包含书名" -#: bookworm/annotation/annotation_dialogs.py:595 +#: bookworm/annotation/annotation_dialogs.py:598 msgid "Include section title" msgstr "包含章节标题" -#: bookworm/annotation/annotation_dialogs.py:601 +#: bookworm/annotation/annotation_dialogs.py:604 msgid "Include page number" msgstr "包含页码" #. Translators: label of a checkbox in a dialog to set export options for #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:604 +#: bookworm/annotation/annotation_dialogs.py:607 msgid "Include tags" msgstr "包含标签" #. Translators: label of a choice control in a dialog to set export options for #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:606 +#: bookworm/annotation/annotation_dialogs.py:609 msgid "Output format:" msgstr "输出格式:" #. Translators: label of an edit control in a dialog to set export options for #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:611 +#: bookworm/annotation/annotation_dialogs.py:614 msgid "Output File" msgstr "输出文件" #. Translators: text of a button in a dialog to set export options for #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:616 +#: bookworm/annotation/annotation_dialogs.py:619 msgid "&Browse" msgstr "浏览(&B)" #. Translators: label of a checkbox in a dialog to set export options for #. comments/highlights -#: bookworm/annotation/annotation_dialogs.py:621 +#: bookworm/annotation/annotation_dialogs.py:624 msgid "Open file after exporting" msgstr "导出后打开文件" #. Translators: the title of a save file dialog asking the user for a filename #. to export annotations to #. Translators: the title of a dialog to save the exported book -#: bookworm/annotation/annotation_dialogs.py:648 -#: bookworm/gui/book_viewer/menubar.py:247 +#: bookworm/annotation/annotation_dialogs.py:651 +#: bookworm/gui/book_viewer/menubar.py:253 msgid "Save As" msgstr "另存为" #. Translators: the title of a group of controls in the settings dialog -#: bookworm/annotation/annotation_gui.py:25 +#: bookworm/annotation/annotation_gui.py:28 msgid "When navigating text" msgstr "文本导航过程中" #. Translators: the label of a checkbox -#: bookworm/annotation/annotation_gui.py:30 +#: bookworm/annotation/annotation_gui.py:33 msgid "Play a sound to indicate the presence of annotations" msgstr "使用音效提示有注释" #. Translators: the label of a checkbox -#: bookworm/annotation/annotation_gui.py:37 +#: bookworm/annotation/annotation_gui.py:40 msgid "Speak a message to indicate the presence of annotations" msgstr "使用语音提示有注释" #. Translators: the title of a group of controls in the settings dialog -#: bookworm/annotation/annotation_gui.py:41 +#: bookworm/annotation/annotation_gui.py:44 msgid "Miscellaneous settings" msgstr "杂项设置" #. Translators: the label of a checkbox -#: bookworm/annotation/annotation_gui.py:46 +#: bookworm/annotation/annotation_gui.py:49 msgid "Speak the bookmark when jumping" msgstr "跳转时读出书签" #. Translators: the label of a checkbox -#: bookworm/annotation/annotation_gui.py:53 +#: bookworm/annotation/annotation_gui.py:56 msgid "Select the bookmarked line when jumping" msgstr "跳转时选中书签线" #. Translators: the label of a checkbox -#: bookworm/annotation/annotation_gui.py:60 +#: bookworm/annotation/annotation_gui.py:63 msgid "Use visual styles to indicate annotations" msgstr "使用视觉样式显示注释" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:99 +#: bookworm/annotation/annotation_gui.py:102 msgid "Add &Bookmark\tCtrl-B" msgstr "添加书签... \tCtrl-B" #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:101 +#: bookworm/annotation/annotation_gui.py:104 msgid "Add a bookmark at the current position" msgstr "在当前位置添加书签" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:106 +#: bookworm/annotation/annotation_gui.py:109 msgid "Add &Named Bookmark...\tCtrl-Shift-B" msgstr "添加命名书签... \tCtrl-Shift-B" #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:108 +#: bookworm/annotation/annotation_gui.py:111 msgid "Add a named bookmark at the current position" msgstr "在当前位置添加并命名书签" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:113 +#: bookworm/annotation/annotation_gui.py:116 msgid "Add Co&mment...\tCtrl-M" msgstr "添加注释... \tCtrl-M" #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:115 +#: bookworm/annotation/annotation_gui.py:118 msgid "Add a comment at the current position" msgstr "在当前位置添加注释" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:120 +#: bookworm/annotation/annotation_gui.py:123 msgid "&Highlight Selection\tCtrl-H" msgstr "标记为高亮(&H)... \tCtrl-H" #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:122 +#: bookworm/annotation/annotation_gui.py:125 msgid "Highlight selected text and save it." msgstr "高亮显示所选文本并保存。" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:127 +#: bookworm/annotation/annotation_gui.py:130 msgid "Saved &Bookmarks..." msgstr "已保存的书签(&B)..." #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:129 +#: bookworm/annotation/annotation_gui.py:132 msgid "View added bookmarks" msgstr "查看已添加的书签" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:134 +#: bookworm/annotation/annotation_gui.py:137 msgid "Saved Co&mments..." msgstr "已保存的注释(&M)..." #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:136 +#: bookworm/annotation/annotation_gui.py:139 msgid "View, edit, and remove comments." msgstr "查看,编辑和删除注释。" #. Translators: the label of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:141 +#: bookworm/annotation/annotation_gui.py:144 msgid "Saved &Highlights..." msgstr "已保存的高亮(&H)..." #. Translators: the help text of an item in the application menubar -#: bookworm/annotation/annotation_gui.py:143 +#: bookworm/annotation/annotation_gui.py:146 msgid "View saved highlights." msgstr "查看已保存的高亮显示。" -#: bookworm/annotation/annotation_gui.py:181 +#: bookworm/annotation/annotation_gui.py:184 msgid "Bookmark removed" msgstr "书签已删除" #. Translators: spoken message -#: bookworm/annotation/annotation_gui.py:184 +#: bookworm/annotation/annotation_gui.py:187 msgid "Bookmark Added" msgstr "书签已添加" #. Translators: title of a dialog -#: bookworm/annotation/annotation_gui.py:193 +#: bookworm/annotation/annotation_gui.py:196 msgid "Add Named Bookmark" msgstr "命名书签" #. Translators: label of a text entry -#: bookworm/annotation/annotation_gui.py:195 +#: bookworm/annotation/annotation_gui.py:198 msgid "Bookmark name:" msgstr "书签名称:" #. Translators: the title of a dialog to add a comment -#: bookworm/annotation/annotation_gui.py:205 +#: bookworm/annotation/annotation_gui.py:208 msgid "New Comment" msgstr "添加注释" #. Translators: the label of an edit field to enter a comment -#: bookworm/annotation/annotation_gui.py:207 +#: bookworm/annotation/annotation_gui.py:210 msgid "Comment:" msgstr "注释:" #. Translators: title of a dialog -#: bookworm/annotation/annotation_gui.py:220 +#: bookworm/annotation/annotation_gui.py:223 msgid "Tag Comment" msgstr "标签注释" #. Translators: label of a text entry -#: bookworm/annotation/annotation_gui.py:222 -#: bookworm/annotation/annotation_gui.py:269 +#: bookworm/annotation/annotation_gui.py:225 +#: bookworm/annotation/annotation_gui.py:272 msgid "Tags:" msgstr "标签:" -#: bookworm/annotation/annotation_gui.py:234 +#: bookworm/annotation/annotation_gui.py:237 msgid "No selection" msgstr "无章节" #. Translators: spoken message -#: bookworm/annotation/annotation_gui.py:242 +#: bookworm/annotation/annotation_gui.py:245 msgid "Highlight removed" msgstr "已取消高亮" #. Translators: spoken message -#: bookworm/annotation/annotation_gui.py:245 +#: bookworm/annotation/annotation_gui.py:248 msgid "Already highlighted" msgstr "已高亮显示" #. Translators: spoken message -#: bookworm/annotation/annotation_gui.py:252 -#: bookworm/annotation/annotation_gui.py:258 +#: bookworm/annotation/annotation_gui.py:255 +#: bookworm/annotation/annotation_gui.py:261 msgid "Highlight extended" msgstr "高亮扩展" #. Translators: spoken message -#: bookworm/annotation/annotation_gui.py:261 +#: bookworm/annotation/annotation_gui.py:264 msgid "Selection highlighted" msgstr "高亮显示选中" #. Translators: title of a dialog -#: bookworm/annotation/annotation_gui.py:267 +#: bookworm/annotation/annotation_gui.py:270 msgid "Tag Highlight" msgstr "标签高亮" #. Translators: the title of a dialog to view bookmarks -#: bookworm/annotation/annotation_gui.py:282 +#: bookworm/annotation/annotation_gui.py:285 msgid "Bookmarks | {book}" msgstr "书签 | {book}" -#: bookworm/annotation/annotation_gui.py:292 +#: bookworm/annotation/annotation_gui.py:295 msgid "Comments" msgstr "注释" -#: bookworm/annotation/annotation_gui.py:305 +#: bookworm/annotation/annotation_gui.py:308 msgid "Highlights" msgstr "高亮" @@ -672,7 +672,7 @@ msgstr "高亮" #. Translators: a name of a file format #. Translators: file type in a save as dialog #: bookworm/annotation/exporters/core_renderers.py:15 -#: bookworm/gui/book_viewer/menubar.py:251 bookworm/ocr/ocr_menu.py:285 +#: bookworm/gui/book_viewer/menubar.py:257 bookworm/ocr/ocr_menu.py:287 msgid "Plain Text" msgstr "纯文本" @@ -727,14 +727,14 @@ msgid "Copy to clipboard" msgstr "复制到剪贴板" #. Translators: the label of a page in the settings dialog -#: bookworm/bookshelf/__init__.py:54 +#: bookworm/bookshelf/__init__.py:56 msgid "Bookshelf" msgstr "书架" #. Translators: the label of an item in the application menubar #. Translators: the label of the bookshelf sub menu found in the file menu of #. the application -#: bookworm/bookshelf/__init__.py:64 +#: bookworm/bookshelf/__init__.py:66 msgid "Boo&kshelf" msgstr "书架(&K)" @@ -742,7 +742,7 @@ msgstr "书架(&K)" #. preferences dialog #. Translators: the name of a book shelf type. #. This bookshelf type is stored in a local database -#: bookworm/bookshelf/local_bookshelf/__init__.py:47 +#: bookworm/bookshelf/local_bookshelf/__init__.py:67 #: bookworm/bookshelf/viewer_integration.py:36 msgid "Local Bookshelf" msgstr "本地书架" @@ -794,24 +794,24 @@ msgstr "无法添加文档" msgid "Reading list and collections" msgstr "阅读清单和收藏" -#: bookworm/bookshelf/window.py:51 +#: bookworm/bookshelf/window.py:56 msgid "{name} ({count})" msgstr "{name} ({count})" #. Translators: label of a text box to filter documents in bookshelf -#: bookworm/bookshelf/window.py:74 +#: bookworm/bookshelf/window.py:79 msgid "Filter documents..." msgstr "查找文档..." #. Translators: label of the bookshelf document list. This label is shown when #. the documents are being loaded from the database -#: bookworm/bookshelf/window.py:80 +#: bookworm/bookshelf/window.py:85 msgid "Loading items" msgstr "加载项目" #. Translators: content of a message shown when the bookshelf fails to load and #. show documents -#: bookworm/bookshelf/window.py:190 +#: bookworm/bookshelf/window.py:195 msgid "" "Failed to retrieve documents.\n" "Please try again." @@ -832,179 +832,179 @@ msgstr "" #. Translators: title of a messagebox #. Translators: the title of a message telling the user that an error has #. occurred -#: bookworm/bookshelf/local_bookshelf/__init__.py:270 -#: bookworm/bookshelf/local_bookshelf/__init__.py:316 -#: bookworm/bookshelf/local_bookshelf/__init__.py:362 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:225 -#: bookworm/bookshelf/window.py:192 bookworm/gui/settings.py:579 -#: bookworm/ocr/ocr_dialogs.py:203 bookworm/ocr/ocr_dialogs.py:613 +#: bookworm/bookshelf/local_bookshelf/__init__.py:290 +#: bookworm/bookshelf/local_bookshelf/__init__.py:336 +#: bookworm/bookshelf/local_bookshelf/__init__.py:382 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:229 +#: bookworm/bookshelf/window.py:197 bookworm/gui/settings.py:623 +#: bookworm/ocr/ocr_dialogs.py:215 bookworm/ocr/ocr_dialogs.py:625 #: bookworm/platforms/win32/pandoc_download.py:63 -#: bookworm/platforms/win32/tesseract_download.py:94 -#: bookworm/text_to_speech/tts_gui.py:426 bookworm/webservices/wikiworm.py:170 +#: bookworm/platforms/win32/tesseract_download.py:96 +#: bookworm/text_to_speech/tts_gui.py:429 bookworm/webservices/wikiworm.py:170 msgid "Error" msgstr "错误" #. Translators: label of an item in the context menu of a document in the #. bookshelf #. Translators: the label of the close button in a dialog -#: bookworm/bookshelf/window.py:232 -#: bookworm/gui/book_viewer/core_dialogs.py:388 +#: bookworm/bookshelf/window.py:237 +#: bookworm/gui/book_viewer/core_dialogs.py:397 msgid "&Open" msgstr "打开(&O)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/window.py:237 +#: bookworm/bookshelf/window.py:242 msgid "Open in &system viewer" msgstr "在系统查看器中打开(&S)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/window.py:242 +#: bookworm/bookshelf/window.py:247 msgid "Edit &title" msgstr "编辑标题(&T)" #. Translators: spoken message when activating a document #. Translators: spoken message when no matching documents were found when #. filtering the document list -#: bookworm/bookshelf/window.py:295 +#: bookworm/bookshelf/window.py:300 msgid "No matching documents" msgstr "没有匹配的文档" #. Translators: message shown when loading documents in the bookshelf -#: bookworm/bookshelf/window.py:349 bookworm/bookshelf/window.py:361 +#: bookworm/bookshelf/window.py:354 bookworm/bookshelf/window.py:366 msgid "Retrieving items..." msgstr "正在检索项目..." #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/window.py:386 +#: bookworm/bookshelf/window.py:391 msgid "Document &info..." msgstr "文档信息(&I)..." #. Translators: label of the combo box showing a list of bookshelf providers. #. Currently, only the Local Bookshelf provider is implemented. In the future, #. other providers may be added, such as Bookshare and Pocket. -#: bookworm/bookshelf/window.py:417 +#: bookworm/bookshelf/window.py:422 msgid "Provider" msgstr "来源" #. Translators: label of the bookshelf tree that shows reading lists and #. collections and other categories #. Translators: label of the settings categories list box -#: bookworm/bookshelf/window.py:424 bookworm/bookshelf/window.py:430 -#: bookworm/gui/settings.py:622 +#: bookworm/bookshelf/window.py:429 bookworm/bookshelf/window.py:435 +#: bookworm/gui/settings.py:666 msgid "Categories" msgstr "类别" #. Translators: title of Bookshelf window -#: bookworm/bookshelf/window.py:467 +#: bookworm/bookshelf/window.py:472 msgid "Bookworm Bookshelf: {name}" msgstr "Bookworm 书架: {name}" #. Translators: label of a menu item to exit the application -#: bookworm/bookshelf/window.py:491 +#: bookworm/bookshelf/window.py:496 msgid "&Exit" msgstr "退出(&E)" #. Translators: lable of the file menu in the menu bar #. Translators: the label of an item in the application menubar -#: bookworm/bookshelf/window.py:494 bookworm/gui/book_viewer/menubar.py:883 +#: bookworm/bookshelf/window.py:499 bookworm/gui/book_viewer/menubar.py:889 msgid "&File" msgstr "文件(&F)" #. Translators: the label of a menu item to remove a bookshelf reading list or #. collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:56 +#: bookworm/bookshelf/local_bookshelf/__init__.py:76 msgid "Remove..." msgstr "删除..." #. Translators: the label of a menu item to change the name of a bookshelf #. reading list or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:61 +#: bookworm/bookshelf/local_bookshelf/__init__.py:81 msgid "Edit name..." msgstr "编辑名称..." #. Translators: the label of a menu item to remove all documents under a #. specific bookshelf reading list or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:66 +#: bookworm/bookshelf/local_bookshelf/__init__.py:86 msgid "Clear documents..." msgstr "清除文档..." #. Translators: the name of a category in the bookshelf for recently added #. documents -#: bookworm/bookshelf/local_bookshelf/__init__.py:90 +#: bookworm/bookshelf/local_bookshelf/__init__.py:110 msgid "Recently Added" msgstr "最近添加" #. Translators: the name of a category in the bookshelf for documents currently #. being read by the user -#: bookworm/bookshelf/local_bookshelf/__init__.py:97 +#: bookworm/bookshelf/local_bookshelf/__init__.py:117 msgid "Currently Reading" msgstr "正在阅读" #. Translators: the name of a category in the bookshelf for documents the user #. wants to read -#: bookworm/bookshelf/local_bookshelf/__init__.py:106 +#: bookworm/bookshelf/local_bookshelf/__init__.py:126 msgid "Want to Read" msgstr "想要阅读" #. Translators: the name of a category in the bookshelf for documents favored #. by the user -#: bookworm/bookshelf/local_bookshelf/__init__.py:115 +#: bookworm/bookshelf/local_bookshelf/__init__.py:135 msgid "Favorites" msgstr "最爱" #. Translators: the name of a category in the bookshelf which contains the #. user's reading lists -#: bookworm/bookshelf/local_bookshelf/__init__.py:125 +#: bookworm/bookshelf/local_bookshelf/__init__.py:145 msgid "Reading Lists" msgstr "阅读清单" #. Translators: the name of a category in the bookshelf which contains the #. user's collections #. Translators: label of a text box for entering a document's collections -#: bookworm/bookshelf/local_bookshelf/__init__.py:130 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:47 +#: bookworm/bookshelf/local_bookshelf/__init__.py:150 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:51 msgid "Collections" msgstr "收藏" #. Translators: the name of a reading list in the bookshelf which contains #. documents that do not have any category assigned to them #. Translators: the label of a page in the settings dialog -#: bookworm/bookshelf/local_bookshelf/__init__.py:138 -#: bookworm/gui/settings.py:590 +#: bookworm/bookshelf/local_bookshelf/__init__.py:158 +#: bookworm/gui/settings.py:634 msgid "General" msgstr "常规" #. Translators: the label of a menu item in the bookshelf to add a new reading #. list or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:147 +#: bookworm/bookshelf/local_bookshelf/__init__.py:167 msgid "Add New..." msgstr "新增..." #. Translators: the name of a category in the bookshelf that lists the authors #. of the documents stored in the bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:166 -#: bookworm/gui/book_viewer/core_dialogs.py:353 +#: bookworm/bookshelf/local_bookshelf/__init__.py:186 +#: bookworm/gui/book_viewer/core_dialogs.py:362 msgid "Authors" msgstr "作者" #. Translators: the label of a menu item in the bookshelf file menu to import #. documents to the bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:177 +#: bookworm/bookshelf/local_bookshelf/__init__.py:197 msgid "Import Documents...\tCtrl+O" msgstr "导入文档...\tCtrl+O" #. Translators: the label of a menu item in the bookshelf file menu to import #. an entire folder to the bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:182 +#: bookworm/bookshelf/local_bookshelf/__init__.py:202 msgid "Import documents from folder..." msgstr "从文件夹导入文档(&F)..." #. Translators: the label of a menu item in the bookshelf file menu to search #. documents contained in the bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:186 +#: bookworm/bookshelf/local_bookshelf/__init__.py:206 msgid "Search Bookshelf..." msgstr "搜索书架..." @@ -1012,18 +1012,18 @@ msgstr "搜索书架..." #. files added to the bookshelf to a private folder that blongs to Bookworm. #. This is important to make the bookshelf works with portable copies, or if #. the user wants to move or rename added documents -#: bookworm/bookshelf/local_bookshelf/__init__.py:189 +#: bookworm/bookshelf/local_bookshelf/__init__.py:209 msgid "Bundle Documents..." msgstr "存档文档..." #. Translators: the label of a menu item in the bookshelf file menu to clear #. documents that no longer exist in the file system -#: bookworm/bookshelf/local_bookshelf/__init__.py:192 +#: bookworm/bookshelf/local_bookshelf/__init__.py:212 msgid "Clear invalid documents..." msgstr "清除无效文档..." #. Translators: the title of a file dialog to browse to a document -#: bookworm/bookshelf/local_bookshelf/__init__.py:204 +#: bookworm/bookshelf/local_bookshelf/__init__.py:224 msgid "Import Documents To Bookshelf" msgstr "将文档导入书架" @@ -1031,82 +1031,82 @@ msgstr "将文档导入书架" #. collection #. Translators: title of a dialog to change the reading list or collection for #. a document -#: bookworm/bookshelf/local_bookshelf/__init__.py:220 -#: bookworm/bookshelf/local_bookshelf/__init__.py:620 +#: bookworm/bookshelf/local_bookshelf/__init__.py:240 +#: bookworm/bookshelf/local_bookshelf/__init__.py:640 msgid "Edit reading list/collections" msgstr "编辑阅读列表/收藏" #. Translators: a message shown when Bookworm is importing documents to the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:237 +#: bookworm/bookshelf/local_bookshelf/__init__.py:257 msgid "Importing document..." msgstr "正在导入文档..." #. Translators: a message shown when Bookworm is importing documents to the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:240 +#: bookworm/bookshelf/local_bookshelf/__init__.py:260 msgid "Importing documents..." msgstr "正在导入文档..." #. Translators: content of a message shown when importing documents to the #. bookshelf has failed -#: bookworm/bookshelf/local_bookshelf/__init__.py:268 +#: bookworm/bookshelf/local_bookshelf/__init__.py:288 msgid "Failed to import document. Please try again." msgstr "文档导入失败。请重试。" #. Translators: title of a dialog to import an entire folder to the bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:281 +#: bookworm/bookshelf/local_bookshelf/__init__.py:301 msgid "Import Documents From Folder" msgstr "从文件夹导入文档" #. Translators: a message shown when importing an entire folder to the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:295 +#: bookworm/bookshelf/local_bookshelf/__init__.py:315 msgid "Importing documents from folder. Please wait..." msgstr "正在从文件夹导入文档。请稍等..." #. Translators: content of a message shown when importing documents from a #. folder to the bookshelf is successful -#: bookworm/bookshelf/local_bookshelf/__init__.py:304 +#: bookworm/bookshelf/local_bookshelf/__init__.py:324 msgid "Documents imported from folder." msgstr "从文件夹导入的文档。" #. Translators: title of a message shown when importing documents from a folder #. to the bookshelf is successful -#: bookworm/bookshelf/local_bookshelf/__init__.py:306 +#: bookworm/bookshelf/local_bookshelf/__init__.py:326 msgid "Operation Completed" msgstr "操作完成" #. Translators: content of a message shown when importing documents from a #. folder to the bookshelf has failed -#: bookworm/bookshelf/local_bookshelf/__init__.py:314 +#: bookworm/bookshelf/local_bookshelf/__init__.py:334 msgid "Failed to import documents from folder." msgstr "从文件夹导入文档失败。" #. Translators: title of a dialog to search bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:324 +#: bookworm/bookshelf/local_bookshelf/__init__.py:344 msgid "Search Bookshelf" msgstr "搜索书架" #. Translators: a message shown while searching bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:337 +#: bookworm/bookshelf/local_bookshelf/__init__.py:357 msgid "Searching bookshelf..." msgstr "搜索书架..." #. Translators: content of a message shown when searching bookshelf has failed -#: bookworm/bookshelf/local_bookshelf/__init__.py:360 +#: bookworm/bookshelf/local_bookshelf/__init__.py:380 msgid "Failed to search bookshelf," msgstr "搜索书架失败," #. Translators: title of a dialog that shows bookshelf search results. It #. searches documents by title and content, hence full-text -#: bookworm/bookshelf/local_bookshelf/__init__.py:377 +#: bookworm/bookshelf/local_bookshelf/__init__.py:397 msgid "Full Text Search Results" msgstr "全文搜索结果" #. Translators: content of a message to confirm the bundling of documents added #. to bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:387 +#: bookworm/bookshelf/local_bookshelf/__init__.py:407 msgid "" "This will create copies of all of the documents you have added to your Local " "Bookshelf.\n" @@ -1122,35 +1122,35 @@ msgstr "" #. Translators: title of a message to confirm the bundling of documents added #. to bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:391 +#: bookworm/bookshelf/local_bookshelf/__init__.py:411 msgid "Bundle Documents?" msgstr "存档文档?" #. Translators: a message shown when bundling documents added to bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:399 +#: bookworm/bookshelf/local_bookshelf/__init__.py:419 msgid "Bundling documents. Please wait..." msgstr "正在存档,请稍后..." #. Translators: content of a message when bundling of documents is successful -#: bookworm/bookshelf/local_bookshelf/__init__.py:428 +#: bookworm/bookshelf/local_bookshelf/__init__.py:448 msgid "Bundled {num_documents} files." msgstr "存档了 {num_documents} 个文件。" #. Translators: title of a message when bundling of documents is successful -#: bookworm/bookshelf/local_bookshelf/__init__.py:430 +#: bookworm/bookshelf/local_bookshelf/__init__.py:450 msgid "Done" msgstr "完毕" #. Translators: title of a dialog that shows titles and paths of documents #. which have not been bundled successfully -#: bookworm/bookshelf/local_bookshelf/__init__.py:438 +#: bookworm/bookshelf/local_bookshelf/__init__.py:458 msgid "Bundle Results: {num_succesfull} successfull, {num_faild} faild" msgstr "存档结果: {num_succesfull} 成功,{num_faild} 失败" #. Translators: content of a message to confirm the clearing of documents #. which have been added to bookshelf, but they have been moved, renamed, or #. deleted -#: bookworm/bookshelf/local_bookshelf/__init__.py:450 +#: bookworm/bookshelf/local_bookshelf/__init__.py:470 msgid "" "This action will clear invalid documents from your bookshelf.\n" "Invalid documents are the documents which no longer exist on your computer." @@ -1162,25 +1162,25 @@ msgstr "" #. Translators: title of a message to confirm the clearing of documents #. which have been added to bookshelf, but they have been moved, renamed, or #. deleted -#: bookworm/bookshelf/local_bookshelf/__init__.py:455 +#: bookworm/bookshelf/local_bookshelf/__init__.py:475 msgid "Clear Invalid Documents?" msgstr "清除无效文档?" #. Translators: label of a text box to change the name of a reading list or #. collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:470 +#: bookworm/bookshelf/local_bookshelf/__init__.py:490 msgid "New name:" msgstr "新名称:" #. Translators: title of a dialog to change the name of a reading list or #. collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:472 +#: bookworm/bookshelf/local_bookshelf/__init__.py:492 msgid "Edit Name" msgstr "编辑名称" #. Translators: content of a message when changing the name of a reading list #. or collection was not successful -#: bookworm/bookshelf/local_bookshelf/__init__.py:482 +#: bookworm/bookshelf/local_bookshelf/__init__.py:502 msgid "" "The given name {name} already exists.\n" "Please choose another name." @@ -1188,13 +1188,13 @@ msgstr "名称 {name} 已存在。请选择其他名称。" #. Translators: title of a message when changing the name of a reading list or #. collection was not successful -#: bookworm/bookshelf/local_bookshelf/__init__.py:486 +#: bookworm/bookshelf/local_bookshelf/__init__.py:506 msgid "Duplicate name" msgstr "重复名称" #. Translators: content of a message to confirm the removal of a reading list #. or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:496 +#: bookworm/bookshelf/local_bookshelf/__init__.py:516 msgid "" "Are you sure you want to remove {name}?\n" "This will not remove document classified under {name}." @@ -1206,15 +1206,15 @@ msgstr "" #. collection #. Translators: title of a message box #. Translators: title of a messagebox -#: bookworm/bookshelf/local_bookshelf/__init__.py:500 -#: bookworm/gui/components.py:610 bookworm/ocr/ocr_dialogs.py:529 -#: bookworm/ocr/ocr_dialogs.py:571 +#: bookworm/bookshelf/local_bookshelf/__init__.py:520 +#: bookworm/gui/components.py:610 bookworm/ocr/ocr_dialogs.py:541 +#: bookworm/ocr/ocr_dialogs.py:583 msgid "Confirm" msgstr "确认" #. Translators: content of a message to confirm the removal of all documents #. classified under a specific reading list or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:511 +#: bookworm/bookshelf/local_bookshelf/__init__.py:531 msgid "" "Are you sure you want to clear all documents classified under {name}?\n" "This will remove those documents from your bookshelf." @@ -1224,72 +1224,72 @@ msgstr "" #. Translators: title of a message to confirm the removal of all documents #. classified under a specific reading list or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:515 +#: bookworm/bookshelf/local_bookshelf/__init__.py:535 msgid "Clear All Documents" msgstr "清除所有文档" #. Translators: label of a text box for the name of a new reading list or #. collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:528 +#: bookworm/bookshelf/local_bookshelf/__init__.py:548 msgid "Enter name:" msgstr "输入名称:" #. Translators: title of a dialog for adding a new reading list or collection -#: bookworm/bookshelf/local_bookshelf/__init__.py:530 +#: bookworm/bookshelf/local_bookshelf/__init__.py:550 msgid "Add New" msgstr "新增" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:555 +#: bookworm/bookshelf/local_bookshelf/__init__.py:575 msgid "&Edit reading list / collections..." msgstr "编辑阅读列表/收藏(&D)..." #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:560 +#: bookworm/bookshelf/local_bookshelf/__init__.py:580 msgid "Remove from ¤tly reading" msgstr "从正在阅读中删除(&C)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:562 +#: bookworm/bookshelf/local_bookshelf/__init__.py:582 msgid "Add to ¤tly reading" msgstr "添加到正在阅读(&C)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:567 +#: bookworm/bookshelf/local_bookshelf/__init__.py:587 msgid "Remove from &want to read" msgstr "从想要阅读中删除(&W)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:569 +#: bookworm/bookshelf/local_bookshelf/__init__.py:589 msgid "Add to &want to read" msgstr "添加到想要阅读(&W)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:574 +#: bookworm/bookshelf/local_bookshelf/__init__.py:594 msgid "Remove from &favorites" msgstr "从最爱中删除(&F)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:576 +#: bookworm/bookshelf/local_bookshelf/__init__.py:596 msgid "Add to &favorites" msgstr "添加到最爱(&F)" #. Translators: label of an item in the context menu of a document in the #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:581 +#: bookworm/bookshelf/local_bookshelf/__init__.py:601 msgid "&Remove from bookshelf" msgstr "从书架中删除(&R)" #. Translators: content of a message to confirm the removal of this document #. from bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:647 +#: bookworm/bookshelf/local_bookshelf/__init__.py:667 msgid "" "Are you sure you want to remove this document from your bookshelf?\n" "Title: {title}\n" @@ -1301,45 +1301,45 @@ msgstr "" #. Translators: title of a message to confirm the removal of this document from #. bookshelf -#: bookworm/bookshelf/local_bookshelf/__init__.py:651 +#: bookworm/bookshelf/local_bookshelf/__init__.py:671 msgid "Remove From Bookshelf?" msgstr "从书架上删除?" #. Translators: the name of a category under the Authors category. This #. category shows documents for which author info is not available -#: bookworm/bookshelf/local_bookshelf/__init__.py:683 +#: bookworm/bookshelf/local_bookshelf/__init__.py:703 msgid "Unknown Author" msgstr "未知作者" #. Translators: label of a combo box for choosing a document's reading list #. Translators: label of a button -#: bookworm/bookshelf/local_bookshelf/dialogs.py:43 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:86 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:47 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:90 msgid "Reading List" msgstr "阅读列表" #. Translators: label of a check box -#: bookworm/bookshelf/local_bookshelf/dialogs.py:51 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:93 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:55 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:97 msgid "Add to full-text search index" msgstr "添加到全文搜索索引" #. Translators: label of an edit control for entering the path to a folder to #. import to the bookshelf -#: bookworm/bookshelf/local_bookshelf/dialogs.py:80 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:84 msgid "Select a folder:" msgstr "选择一个文件夹:" #. Translators: label of a text box for entering a search term #. Translators: the label of a button in the application toolbar -#: bookworm/bookshelf/local_bookshelf/dialogs.py:112 -#: bookworm/gui/book_viewer/__init__.py:402 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:116 +#: bookworm/gui/book_viewer/__init__.py:412 msgid "Search" msgstr "搜索" #. Translators: title of a group of controls to select which document field to #. search in when searching bookshelf -#: bookworm/bookshelf/local_bookshelf/dialogs.py:116 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:120 msgid "Search Field" msgstr "搜索范围" @@ -1349,55 +1349,55 @@ msgstr "搜索范围" #. of search results of matching document titles #. Translators: title of a list control colum showing the document titles of #. documents not bundled due to errors when bundling documents -#: bookworm/bookshelf/local_bookshelf/dialogs.py:120 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:186 -#: bookworm/bookshelf/local_bookshelf/dialogs.py:229 -#: bookworm/gui/book_viewer/core_dialogs.py:342 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:124 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:190 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:233 +#: bookworm/gui/book_viewer/core_dialogs.py:351 msgid "Title" msgstr "标题" #. Translators: label of a list showing search results of documents with title #. matching the given search query -#: bookworm/bookshelf/local_bookshelf/dialogs.py:154 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:158 msgid "Title matches" msgstr "标题匹配" #. Translators: the label of a tab in a tabl control in a dialog showing a list #. of search results in the bookshelf -#: bookworm/bookshelf/local_bookshelf/dialogs.py:157 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:161 msgid "Title Matches" msgstr "标题匹配" #. Translators: label of a list showing search results of content matching the #. given search query -#: bookworm/bookshelf/local_bookshelf/dialogs.py:164 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:168 msgid "Content matches" msgstr "内容匹配" #. Translators: the label of a tab in a tabl control in a dialog showing a list #. of search results in the bookshelf -#: bookworm/bookshelf/local_bookshelf/dialogs.py:167 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:171 msgid "Content Matches" msgstr "内容匹配" -#: bookworm/bookshelf/local_bookshelf/dialogs.py:183 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:187 msgid "Snippet" msgstr "片段" #. Translators: title of a list control colum showing the file names of files #. not bundled due to errors when bundling documents -#: bookworm/bookshelf/local_bookshelf/dialogs.py:227 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:231 msgid "File Name" msgstr "文件名" #. Translators: label of a list control showing file copy errors -#: bookworm/bookshelf/local_bookshelf/dialogs.py:232 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:236 msgid "Errors" msgstr "错误" #. Translators: label shown in a list control indicating the failure to copy #. the document when bundling documents -#: bookworm/bookshelf/local_bookshelf/dialogs.py:235 +#: bookworm/bookshelf/local_bookshelf/dialogs.py:239 msgid "Failed to copy document" msgstr "无法复制文档" @@ -1430,12 +1430,12 @@ msgid "Full text" msgstr "全文" #. Translators: the name of a document file format -#: bookworm/document/formats/archive.py:42 +#: bookworm/document/formats/archive.py:45 msgid "Archive File" -msgstr "存档文件" +msgstr "压缩文件" #. Translators: the name of a document file format -#: bookworm/document/formats/epub.py:48 +#: bookworm/document/formats/epub.py:46 msgid "Electronic Publication (EPUB)" msgstr "Electronic Publication (EPUB)" @@ -1445,17 +1445,17 @@ msgid "Fiction Book (FB2)" msgstr "Fiction Book (FB2)" #. Translators: the name of a document file format -#: bookworm/document/formats/fitz.py:169 +#: bookworm/document/formats/fitz.py:174 msgid "XPS Document" msgstr "XPS Document" #. Translators: the name of a document file format -#: bookworm/document/formats/fitz.py:176 +#: bookworm/document/formats/fitz.py:181 msgid "Comic Book Archive" msgstr "Comic Book Archive" #. Translators: the name of a document file format -#: bookworm/document/formats/html.py:174 bookworm/document/formats/html.py:243 +#: bookworm/document/formats/html.py:189 bookworm/document/formats/html.py:258 msgid "HTML Document" msgstr "HTML Document" @@ -1470,16 +1470,16 @@ msgid "Kindle eBook" msgstr "Kindle eBook" #. Translators: the name of a document file format -#: bookworm/document/formats/odf.py:82 +#: bookworm/document/formats/odf.py:81 msgid "Open Document Text" msgstr "Open Document Text" #. Translators: the name of a document file format -#: bookworm/document/formats/odf.py:128 +#: bookworm/document/formats/odf.py:127 msgid "Open Document Presentation" msgstr "Open Document Presentation" -#: bookworm/document/formats/odf.py:191 +#: bookworm/document/formats/odf.py:190 #: bookworm/document/formats/powerpoint.py:155 msgid "Slide {number}" msgstr "幻灯片 {number}" @@ -1520,9 +1520,9 @@ msgid "Portable Document (PDF)" msgstr "Portable Document (PDF)" #. Translators: the name of a document file format -#: bookworm/document/formats/plain_text.py:28 +#: bookworm/document/formats/plain_text.py:31 msgid "Plain Text File" -msgstr "Plain Text File" +msgstr "文本文档" #: bookworm/document/formats/powerpoint.py:85 msgid "Slide Notes" @@ -1563,11 +1563,11 @@ msgstr "无法启动 Web 查看器" msgid "An error occurred while opening the web viewer. Please try again." msgstr "打开 Web 查看器时出错。请重试。" -#: bookworm/epub_serve/webapp.py:140 +#: bookworm/epub_serve/webapp.py:148 msgid "404 Not Found" msgstr "404 Not Found" -#: bookworm/epub_serve/webapp.py:141 +#: bookworm/epub_serve/webapp.py:149 msgid "" "The book you are trying to access does not exist or has been closed. Please " "make sure you opened the book from within Bookworm. All URLs are temporary " @@ -1576,11 +1576,11 @@ msgstr "" "您尝试访问的图书不存在或已关闭。请确保您是从 Bookworm 中打开这本书的。所有 " "URL 都是临时的,在您关闭页面后可能无法使用。" -#: bookworm/epub_serve/webapp.py:180 +#: bookworm/epub_serve/webapp.py:188 msgid "Failed to load content" msgstr "无法加载内容" -#: bookworm/epub_serve/webapp.py:181 +#: bookworm/epub_serve/webapp.py:189 msgid "Cannot retreive content. Probably the eBook has been closed." msgstr "无法检索内容。可能该电子书已关闭。" @@ -1625,14 +1625,14 @@ msgstr "所选章节:" #. Translators: the label of the OK button in a dialog #: bookworm/gui/components.py:277 bookworm/gui/components.py:318 -#: bookworm/gui/settings.py:646 +#: bookworm/gui/settings.py:690 msgid "OK" msgstr "确定(&O)" #. Translators: the lable of the cancel button in a dialog #. Translators: the label of the cancel button in a dialog #: bookworm/gui/components.py:280 bookworm/gui/components.py:321 -#: bookworm/gui/settings.py:649 +#: bookworm/gui/settings.py:693 msgid "Cancel" msgstr "取消(&C)" @@ -1648,52 +1648,59 @@ msgstr "" "你确定要中止吗?" #. Translators: the title of the file associations dialog -#: bookworm/gui/settings.py:44 +#: bookworm/gui/settings.py:47 msgid "Bookworm File Associations" msgstr "Bookworm文件关联" -#: bookworm/gui/settings.py:56 +#: bookworm/gui/settings.py:59 msgid "" -"This dialog will help you to setup file associations.\n" +"This dialog will help you to set up file associations.\n" "Associating files with Bookworm means that when you click on a file in " -"windows explorer, it will be opened in Bookworm by default " +"Windows Explorer, it will be opened in Bookworm by default." msgstr "" "此对话框可以帮助您设置文件关联。\n" -"设置文件关联后,当您在Windows资源管理器中单击文件时,将会在 Bookworm 中打开该" -"文件 " +"设置某种类型的文件关联后,当您在Windows资源管理器中单击该类型的文件时,默认将" +"会在 Bookworm 中打开该文件。" -#. Translators: the main label of a button -#: bookworm/gui/settings.py:69 +#: bookworm/gui/settings.py:71 msgid "Associate all" msgstr "关联所有格式" -#. Translators: the note of a button -#: bookworm/gui/settings.py:71 +#: bookworm/gui/settings.py:72 msgid "Use Bookworm to open all supported document formats" msgstr "使用Bookworm打开所有支持的文档格式" +#: bookworm/gui/settings.py:86 +msgid "Dissociate all supported file types" +msgstr "取消所有支持文件类型的关联" + +#: bookworm/gui/settings.py:87 +msgid "Remove previously associated file types" +msgstr "删除之前关联的文件类型" + #. Translators: the main label of a button -#: bookworm/gui/settings.py:79 -msgid "Associate files of type {format}" -msgstr "{format}文件" +#: bookworm/gui/settings.py:104 +msgid "Dissociate files of type {format}" +msgstr "取消关联 {format}" #. Translators: the note of a button -#: bookworm/gui/settings.py:81 -msgid "Associate files with {ext} extension so they always open in Bookworm" -msgstr "{ext} 在 Bookworm 中打开该类型的文件" +#: bookworm/gui/settings.py:106 +msgid "" +"Dissociate files with {ext} extension so they no longer open in Bookworm" +msgstr "{ext} 取消使用 Bookworm 打开该类型的文件" #. Translators: the main label of a button -#: bookworm/gui/settings.py:94 -msgid "Dissociate all supported file types" -msgstr "取消所有支持文件类型的关联" +#: bookworm/gui/settings.py:112 +msgid "Associate files of type {format}" +msgstr "{format}" #. Translators: the note of a button -#: bookworm/gui/settings.py:96 -msgid "Remove previously associated file types" -msgstr "删除之前关联的文件类型" +#: bookworm/gui/settings.py:114 +msgid "Associate files with {ext} extension so they always open in Bookworm" +msgstr "{ext} 使用 Bookworm 打开该类型的文件" #. Translators: the text of a message indicating successful file association -#: bookworm/gui/settings.py:113 +#: bookworm/gui/settings.py:157 msgid "Files of type {format} have been associated with Bookworm." msgstr "{format}类型已与Bookworm关联。" @@ -1701,102 +1708,102 @@ msgstr "{format}类型已与Bookworm关联。" #. Translators: the title of a message indicating successful removal of file #. association #. Translators: title of a message box -#: bookworm/gui/book_viewer/menubar.py:331 bookworm/gui/settings.py:117 -#: bookworm/gui/settings.py:135 bookworm/platforms/win32/pandoc_download.py:45 -#: bookworm/platforms/win32/tesseract_download.py:74 +#: bookworm/gui/book_viewer/menubar.py:337 bookworm/gui/settings.py:161 +#: bookworm/gui/settings.py:179 bookworm/platforms/win32/pandoc_download.py:45 +#: bookworm/platforms/win32/tesseract_download.py:76 msgid "Success" msgstr "成功" #. Translators: the text of a message indicating successful removal of file #. associations -#: bookworm/gui/settings.py:126 +#: bookworm/gui/settings.py:170 msgid "All supported file types have been set to open by default in Bookworm." msgstr "在Bookworm中,默认情况下将所有受支持的文件类型设置为打开。" #. Translators: the text of a message indicating successful removal of file #. associations -#: bookworm/gui/settings.py:131 +#: bookworm/gui/settings.py:175 msgid "All registered file associations have been removed." msgstr "已取消所有的文件关联。" #. Translators: the title of a group of controls in the #. general settings page related to the UI -#: bookworm/gui/settings.py:215 +#: bookworm/gui/settings.py:259 msgid "User Interface" msgstr "用户界面" #. Translators: the label of a combobox containing display languages. -#: bookworm/gui/settings.py:217 +#: bookworm/gui/settings.py:261 msgid "Display Language:" msgstr "显示语言:" #. Translators: the title of a group of controls shown in the #. general settings page related to spoken feedback -#: bookworm/gui/settings.py:222 +#: bookworm/gui/settings.py:266 msgid "Spoken feedback" msgstr "语音反馈" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:227 +#: bookworm/gui/settings.py:271 msgid "Speak user interface messages" msgstr "读出用户介面信息" #. Translators: the title of a group of controls shown in the #. general settings page related to miscellaneous settings -#: bookworm/gui/settings.py:232 +#: bookworm/gui/settings.py:276 msgid "Miscellaneous" msgstr "杂项" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:237 +#: bookworm/gui/settings.py:281 msgid "Play pagination sound" msgstr "播放翻页音效" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:244 +#: bookworm/gui/settings.py:288 msgid "Include page label in page title" msgstr "在页标题中包含页标签" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:251 +#: bookworm/gui/settings.py:295 msgid "Use file name instead of book title" msgstr "以文件名代替文档名称" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:258 +#: bookworm/gui/settings.py:302 msgid "Show reading progress percentage" msgstr "显示阅读进度百分比" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:265 +#: bookworm/gui/settings.py:309 msgid "Open recently opened books from the last position" msgstr "最近阅读列表中打开文档时跳转到上次阅读位置" #. Translators: the label of a checkbox to enable continuous reading -#: bookworm/gui/settings.py:272 +#: bookworm/gui/settings.py:316 msgid "" "Try to support the screen reader's continuous reading mode by automatically " "turning pages (may not work in some cases)" msgstr "自动翻页兼容屏幕阅读器的全文朗读(在某些情况下可能无效)" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:281 +#: bookworm/gui/settings.py:325 msgid "Automatically check for updates" msgstr "自动检测更新" #. Translators: the title of a group of controls shown in the #. general settings page related to file associations -#: bookworm/gui/settings.py:287 +#: bookworm/gui/settings.py:331 msgid "File Associations" msgstr "文件关联" #. Translators: the label of a button -#: bookworm/gui/settings.py:292 +#: bookworm/gui/settings.py:336 msgid "Manage File &Associations" msgstr "管理文件关联(&A)" #. Translators: the content of a message asking the user to restart -#: bookworm/gui/settings.py:322 +#: bookworm/gui/settings.py:366 msgid "" "You have changed the display language of Bookworm.\n" "For this setting to fully take effect, you need to restart the application.\n" @@ -1808,84 +1815,84 @@ msgstr "" #. Translators: the title of a message telling the user #. that the display language have been changed -#: bookworm/gui/settings.py:329 +#: bookworm/gui/settings.py:373 msgid "Language Changed" msgstr "语言已更改" #. Translators: the title of a group of controls in the #. appearance settings page related to the UI -#: bookworm/gui/settings.py:351 +#: bookworm/gui/settings.py:395 msgid "General Appearance" msgstr "普通外观" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:356 +#: bookworm/gui/settings.py:400 msgid "Maximize the application window upon startup" msgstr "启动时最大化窗口" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:363 +#: bookworm/gui/settings.py:407 msgid "Show the application's toolbar" msgstr "显示应用程序工具栏" -#: bookworm/gui/settings.py:366 +#: bookworm/gui/settings.py:410 msgid "Text Styling" msgstr "文本样式" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:371 +#: bookworm/gui/settings.py:415 msgid "Apply text styling (when available)" msgstr "使用文本样式(如果可用)" -#: bookworm/gui/settings.py:374 +#: bookworm/gui/settings.py:418 msgid "Text view margins percentage" msgstr "文本视图边距百分比" #. Translators: the title of a group of controls in the #. appearance settings page related to the font -#: bookworm/gui/settings.py:378 +#: bookworm/gui/settings.py:422 msgid "Font" msgstr "字体" #. Translators: label of a checkbox -#: bookworm/gui/settings.py:383 +#: bookworm/gui/settings.py:427 msgid "Use Open-&dyslexic font" msgstr "使用阅读障碍字体(&D)" #. Translators: label of a combobox -#: bookworm/gui/settings.py:387 +#: bookworm/gui/settings.py:431 msgid "Font Face" msgstr "字体" #. Translators: label of an static -#: bookworm/gui/settings.py:394 +#: bookworm/gui/settings.py:438 msgid "Font Size" msgstr "字体大小" #. Translators: the label of a checkbox -#: bookworm/gui/settings.py:400 +#: bookworm/gui/settings.py:444 msgid "Bold style" msgstr "加粗样式" #. Translators: label of a button -#: bookworm/gui/settings.py:460 +#: bookworm/gui/settings.py:504 msgid "Download Pandoc: The universal document converter" msgstr "下载 Pandoc:通用文档转换器" #. Translators: description of a button -#: bookworm/gui/settings.py:462 +#: bookworm/gui/settings.py:506 msgid "" "Add support for additional document formats including RTF and Word 2003 " "documents." msgstr "添加对其他文档格式的支持,包括 RTF 和 Word 2003 文档。" #. Translators: label of a button -#: bookworm/gui/settings.py:472 +#: bookworm/gui/settings.py:516 msgid "Update Pandoc (the universal document converter)" msgstr "更新 Pandoc(通用文档转换器)" #. Translators: description of a button -#: bookworm/gui/settings.py:474 +#: bookworm/gui/settings.py:518 msgid "" "Update Pandoc to the latest version to improve performance and conversion " "quality." @@ -1894,34 +1901,34 @@ msgstr "将 Pandoc 更新到最新版本以提高性能和转换质量。" #. Translators: the title of a group of controls in the #. advanced settings page #. Translators: label of a button -#: bookworm/gui/settings.py:481 bookworm/gui/settings.py:486 +#: bookworm/gui/settings.py:525 bookworm/gui/settings.py:530 msgid "Reset Settings" msgstr "重置设置" #. Translators: description of a button -#: bookworm/gui/settings.py:488 +#: bookworm/gui/settings.py:532 msgid "Reset Bookworm's settings to their defaults" msgstr "将 Bookworm 的设置重置为默认值" #. Translators: title of a progress dialog -#: bookworm/gui/settings.py:496 +#: bookworm/gui/settings.py:540 msgid "Downloading Pandoc" msgstr "下载 Pandoc" #. Translators: message of a progress dialog #. Translators: content of a progress dialog -#: bookworm/gui/settings.py:498 bookworm/ocr/ocr_dialogs.py:129 -#: bookworm/ocr/ocr_dialogs.py:544 +#: bookworm/gui/settings.py:542 bookworm/ocr/ocr_dialogs.py:141 +#: bookworm/ocr/ocr_dialogs.py:556 msgid "Getting download information..." msgstr "正在获取下载信息..." #. Translators: message of a dialog -#: bookworm/gui/settings.py:511 bookworm/ocr/ocr_dialogs.py:162 +#: bookworm/gui/settings.py:555 bookworm/ocr/ocr_dialogs.py:174 msgid "Checking for updates. Please wait..." msgstr "正在检查更新。请稍候..." #. Translators: content of a message box -#: bookworm/gui/settings.py:519 +#: bookworm/gui/settings.py:563 msgid "" "You will lose all of your custom settings.\n" "Are you sure you want to restore all settings to their default values?" @@ -1930,22 +1937,22 @@ msgstr "" "您确定要将所有设置恢复为默认值吗?" #. Translators: title of a message box -#: bookworm/gui/settings.py:523 +#: bookworm/gui/settings.py:567 msgid "Reset Settings?" msgstr "重置设置?" #. Translators: title of a message box -#: bookworm/gui/settings.py:536 bookworm/ocr/ocr_dialogs.py:149 +#: bookworm/gui/settings.py:580 bookworm/ocr/ocr_dialogs.py:161 msgid "Restart Required" msgstr "需要重新启动" #. Translators: content of a message box -#: bookworm/gui/settings.py:538 +#: bookworm/gui/settings.py:582 msgid "Bookworm will now restart to complete the installation of Pandoc." msgstr "Bookworm 现在将重新启动以完成 Pandoc 的安装。" #. Translators: content of a message box -#: bookworm/gui/settings.py:547 +#: bookworm/gui/settings.py:591 msgid "" "A new version of Pandoc is available for download.\n" "It is strongly recommended to update to the latest version for the best " @@ -1957,66 +1964,66 @@ msgstr "" "您想更新到新版本吗?" #. Translators: title of a message box -#: bookworm/gui/settings.py:551 +#: bookworm/gui/settings.py:595 msgid "Update Pandoc?" msgstr "更新 Pandoc?" #. Translators: message of a dialog -#: bookworm/gui/settings.py:560 +#: bookworm/gui/settings.py:604 msgid "Removing old Pandoc version. Please wait..." msgstr "正在删除旧版 Pandoc 请稍等..." #. Translators: content of a message box -#: bookworm/gui/settings.py:566 +#: bookworm/gui/settings.py:610 msgid "Your version of Pandoc is up to date." msgstr "您的 Pandoc 版本是最新的。" #. Translators: title of a message box -#: bookworm/gui/settings.py:568 bookworm/ocr/ocr_dialogs.py:192 +#: bookworm/gui/settings.py:612 bookworm/ocr/ocr_dialogs.py:204 msgid "No updates" msgstr "当前已是最新版" #. Translators: content of a message box -#: bookworm/gui/settings.py:575 +#: bookworm/gui/settings.py:619 msgid "Failed to check for updates. Please check your internet connection." msgstr "" "检测更新失败。\n" "请检查您的互联网连接。" #. Translators: the label of a page in the settings dialog -#: bookworm/gui/settings.py:592 +#: bookworm/gui/settings.py:636 msgid "Appearance" msgstr "外观" #. Translators: the label of a page in the settings dialog -#: bookworm/gui/settings.py:594 +#: bookworm/gui/settings.py:638 msgid "Advanced" msgstr "高级" #. Translators: the label of the apply button in a dialog -#: bookworm/gui/settings.py:651 +#: bookworm/gui/settings.py:695 msgid "Apply" msgstr "应用(&A)" -#: bookworm/gui/book_viewer/__init__.py:76 +#: bookworm/gui/book_viewer/__init__.py:86 msgid "Failed to open document" msgstr "无法打开文档" -#: bookworm/gui/book_viewer/__init__.py:77 +#: bookworm/gui/book_viewer/__init__.py:87 msgid "The document you are trying to open could not be opened in Bookworm." msgstr "该文档无法在 Bookworm 中打开。" -#: bookworm/gui/book_viewer/__init__.py:91 +#: bookworm/gui/book_viewer/__init__.py:101 msgid "Opening document, please wait..." msgstr "正在打开文档,请稍候..." #. Translators: the title of an error message -#: bookworm/gui/book_viewer/__init__.py:109 +#: bookworm/gui/book_viewer/__init__.py:119 msgid "Document not found" msgstr "文档不存在" #. Translators: the content of an error message -#: bookworm/gui/book_viewer/__init__.py:111 +#: bookworm/gui/book_viewer/__init__.py:121 msgid "" "Could not open Document.\n" "The document does not exist." @@ -2025,12 +2032,12 @@ msgstr "" "该文档不存在。" #. Translators: the title of an error message -#: bookworm/gui/book_viewer/__init__.py:123 +#: bookworm/gui/book_viewer/__init__.py:133 msgid "Document Restricted" msgstr "文档受限" #. Translators: the content of an error message -#: bookworm/gui/book_viewer/__init__.py:125 +#: bookworm/gui/book_viewer/__init__.py:135 msgid "" "Could not open Document.\n" "The document is restricted by the publisher." @@ -2040,45 +2047,45 @@ msgstr "" #. Translators: the title of a message shown #. when the format of the e-book is not supported -#: bookworm/gui/book_viewer/__init__.py:137 +#: bookworm/gui/book_viewer/__init__.py:147 msgid "Unsupported Document Format" msgstr "不支持的文档格式" #. Translators: the content of a message shown #. when the format of the e-book is not supported -#: bookworm/gui/book_viewer/__init__.py:140 +#: bookworm/gui/book_viewer/__init__.py:150 msgid "The format of the given document is not supported by Bookworm." msgstr "Bookworm不支持该文档格式。" #. Translators: the title of an error message -#: bookworm/gui/book_viewer/__init__.py:149 +#: bookworm/gui/book_viewer/__init__.py:159 msgid "Archive contains no documents" -msgstr "存档中未包含文档" +msgstr "压缩文件中未包含文档" #. Translators: the content of an error message -#: bookworm/gui/book_viewer/__init__.py:151 +#: bookworm/gui/book_viewer/__init__.py:161 msgid "" "Bookworm cannot open this archive file.\n" "The archive contains no documents." msgstr "" -"Bookworm 无法打开该存档文件。\n" -"该存档中未包含文档。" +"Bookworm 无法打开该压缩文件。\n" +"该压缩文件中未包含文档。" -#: bookworm/gui/book_viewer/__init__.py:160 +#: bookworm/gui/book_viewer/__init__.py:170 msgid "Documents" msgstr "文档" -#: bookworm/gui/book_viewer/__init__.py:161 +#: bookworm/gui/book_viewer/__init__.py:171 msgid "Multiple documents found" msgstr "发现多个文档" #. Translators: the title of an error message -#: bookworm/gui/book_viewer/__init__.py:175 +#: bookworm/gui/book_viewer/__init__.py:185 msgid "Error Opening Document" msgstr "打开文档时出错" #. Translators: the content of an error message -#: bookworm/gui/book_viewer/__init__.py:177 +#: bookworm/gui/book_viewer/__init__.py:187 msgid "" "Could not open file\n" ".Either the file has been damaged during download, or it has been corrupted " @@ -2088,12 +2095,12 @@ msgstr "" "文件以损坏。" #. Translators: the title of an error message -#: bookworm/gui/book_viewer/__init__.py:190 +#: bookworm/gui/book_viewer/__init__.py:200 msgid "Error Openning Document" msgstr "打开文档时出错" #. Translators: the content of an error message -#: bookworm/gui/book_viewer/__init__.py:192 +#: bookworm/gui/book_viewer/__init__.py:202 msgid "" "Could not open document.\n" "An unknown error occurred while loading the file." @@ -2103,7 +2110,7 @@ msgstr "" "加载文件时发生未知错误。" #. Translators: content of a message -#: bookworm/gui/book_viewer/__init__.py:204 +#: bookworm/gui/book_viewer/__init__.py:214 msgid "" "Failed to open document.\n" "Would you like to remove its entry from the 'recent documents' and 'pinned " @@ -2113,57 +2120,57 @@ msgstr "" "您想从“最近打开的文档”和“固定的文档”列表中删除对应条目吗?" #. Translators: title of a message box -#: bookworm/gui/book_viewer/__init__.py:208 +#: bookworm/gui/book_viewer/__init__.py:218 msgid "Remove from lists?" msgstr "从列表中删除?" #. Translators: the text of the status bar when no book is currently open. #. It is being used also as a label for the page content text area when no book #. is opened. -#: bookworm/gui/book_viewer/__init__.py:277 +#: bookworm/gui/book_viewer/__init__.py:287 msgid "Press (Ctrl + O) to open a document" msgstr "按 (Control + O) 打开文档" #. Translators: the label of the table-of-contents tree -#: bookworm/gui/book_viewer/__init__.py:291 +#: bookworm/gui/book_viewer/__init__.py:301 msgid "Table of Contents" msgstr "目录" -#: bookworm/gui/book_viewer/__init__.py:314 +#: bookworm/gui/book_viewer/__init__.py:324 msgid "Reading progress percentage" msgstr "阅读进度百分比" #. Translators: the label of a button in the application toolbar -#: bookworm/gui/book_viewer/__init__.py:399 +#: bookworm/gui/book_viewer/__init__.py:409 msgid "Open" msgstr "打开" #. Translators: the label of a button in the application toolbar -#: bookworm/gui/book_viewer/__init__.py:404 +#: bookworm/gui/book_viewer/__init__.py:414 msgid "Mode" msgstr "模式" #. Translators: the label of a button in the application toolbar -#: bookworm/gui/book_viewer/__init__.py:407 +#: bookworm/gui/book_viewer/__init__.py:417 msgid "Big" msgstr "大" #. Translators: the label of a button in the application toolbar -#: bookworm/gui/book_viewer/__init__.py:409 +#: bookworm/gui/book_viewer/__init__.py:419 msgid "Small" msgstr "小" #. Translators: title of a message telling the user that they entered an #. incorrect #. password for opening the book -#: bookworm/gui/book_viewer/__init__.py:454 +#: bookworm/gui/book_viewer/__init__.py:464 msgid "Incorrect Password" msgstr "密码错误" #. Translators: content of a message telling the user that they entered an #. incorrect #. password for opening the book -#: bookworm/gui/book_viewer/__init__.py:457 +#: bookworm/gui/book_viewer/__init__.py:467 msgid "" "The password you provided is incorrect.\n" "Please try again with the correct password." @@ -2172,57 +2179,57 @@ msgstr "" "请键入正确的密码再试一次。" #. Translators: spoken message when the document has been closed -#: bookworm/gui/book_viewer/__init__.py:518 +#: bookworm/gui/book_viewer/__init__.py:528 msgid "Document closed." msgstr "已关闭文档。" #. Translators: text of reading progress shown in the status bar -#: bookworm/gui/book_viewer/__init__.py:555 +#: bookworm/gui/book_viewer/__init__.py:565 msgid "{percentage} completed" msgstr "{percentage} 完成" #. Translators: label of content text control when the currently opened #. document is a single page document -#: bookworm/gui/book_viewer/__init__.py:613 +#: bookworm/gui/book_viewer/__init__.py:623 msgid "Document content" msgstr "文档内容" -#: bookworm/gui/book_viewer/__init__.py:644 +#: bookworm/gui/book_viewer/__init__.py:654 msgid "{text}: {item_type}" msgstr "{text}: {item_type}" -#: bookworm/gui/book_viewer/__init__.py:661 +#: bookworm/gui/book_viewer/__init__.py:671 msgid "No next {item}" msgstr "往下没有{item}" -#: bookworm/gui/book_viewer/__init__.py:663 +#: bookworm/gui/book_viewer/__init__.py:673 msgid "No previous {item}" msgstr "往上没有{item}" #. Translators: a message telling the user that the font size has been #. increased -#: bookworm/gui/book_viewer/__init__.py:679 +#: bookworm/gui/book_viewer/__init__.py:689 msgid "The font size has been Increased" msgstr "增大字体" #. Translators: a message telling the user that the font size has been #. decreased -#: bookworm/gui/book_viewer/__init__.py:685 +#: bookworm/gui/book_viewer/__init__.py:695 msgid "The font size has been decreased" msgstr "减小字体" #. Translators: a message telling the user that the font size has been reset -#: bookworm/gui/book_viewer/__init__.py:689 +#: bookworm/gui/book_viewer/__init__.py:699 msgid "The font size has been reset" msgstr "重置字体" -#: bookworm/gui/book_viewer/__init__.py:719 +#: bookworm/gui/book_viewer/__init__.py:729 msgid "Reading progress: {percentage}" msgstr "阅读进度百分比: {percentage}" #. Translators: the content of a dialog asking the user #. for the password to decrypt the current e-book -#: bookworm/gui/book_viewer/__init__.py:740 +#: bookworm/gui/book_viewer/__init__.py:750 msgid "" "This document is encrypted with a password.\n" "You need to provide the password in order to access its content.\n" @@ -2234,111 +2241,111 @@ msgstr "" #. Translators: the title of a dialog asking the user to enter a password to #. decrypt the e-book -#: bookworm/gui/book_viewer/__init__.py:746 +#: bookworm/gui/book_viewer/__init__.py:756 msgid "Enter Password" msgstr "输入密码" #. Translators: the label of the page content text area #. Translators: a message to announce when navigating to another page -#: bookworm/gui/book_viewer/__init__.py:784 -#: bookworm/text_to_speech/__init__.py:167 +#: bookworm/gui/book_viewer/__init__.py:794 +#: bookworm/text_to_speech/__init__.py:179 msgid "Page {page} of {total}" msgstr "第{page}页,共{total}页。" -#: bookworm/gui/book_viewer/__init__.py:869 +#: bookworm/gui/book_viewer/__init__.py:879 msgid "Opening page: {url}" msgstr "打开页面:{url}" #. Translators: the label of a list of search results -#: bookworm/gui/book_viewer/core_dialogs.py:47 +#: bookworm/gui/book_viewer/core_dialogs.py:56 msgid "Search Results" msgstr "搜索结果" #. Translators: the title of a column in the search results list showing #. an excerpt of the text of the search result -#: bookworm/gui/book_viewer/core_dialogs.py:58 +#: bookworm/gui/book_viewer/core_dialogs.py:67 msgid "Text" msgstr "文本" #. Translators: the label of a progress bar indicating the progress of the #. search process -#: bookworm/gui/book_viewer/core_dialogs.py:74 +#: bookworm/gui/book_viewer/core_dialogs.py:83 msgid "Search Progress:" msgstr "搜索进度:" #. Translators: the label of a button to close the dialog #. Translators: the label of an edit field in the search dialog -#: bookworm/gui/book_viewer/core_dialogs.py:148 +#: bookworm/gui/book_viewer/core_dialogs.py:157 msgid "Search term:" msgstr "搜索词:" #. Translators: the label of a checkbox -#: bookworm/gui/book_viewer/core_dialogs.py:154 +#: bookworm/gui/book_viewer/core_dialogs.py:163 msgid "Case sensitive" msgstr "区分大小写" #. Translators: the label of a checkbox -#: bookworm/gui/book_viewer/core_dialogs.py:156 +#: bookworm/gui/book_viewer/core_dialogs.py:165 msgid "Match whole word only" msgstr "整词匹配" #. Translators: the label of a checkbox -#: bookworm/gui/book_viewer/core_dialogs.py:158 +#: bookworm/gui/book_viewer/core_dialogs.py:167 msgid "Regular expression" msgstr "正则表达式" -#: bookworm/gui/book_viewer/core_dialogs.py:207 +#: bookworm/gui/book_viewer/core_dialogs.py:216 msgid "Page number, of {total}:" msgstr "页码,共{total}:" -#: bookworm/gui/book_viewer/core_dialogs.py:246 +#: bookworm/gui/book_viewer/core_dialogs.py:255 msgid "Element Type" msgstr "元素类型" -#: bookworm/gui/book_viewer/core_dialogs.py:251 +#: bookworm/gui/book_viewer/core_dialogs.py:260 msgid "Elements" msgstr "元素" #. Translators: title of a dialog -#: bookworm/gui/book_viewer/core_dialogs.py:327 +#: bookworm/gui/book_viewer/core_dialogs.py:336 msgid "Document Info" msgstr "文档信息" -#: bookworm/gui/book_viewer/core_dialogs.py:356 +#: bookworm/gui/book_viewer/core_dialogs.py:365 msgid "Author" msgstr "作者" -#: bookworm/gui/book_viewer/core_dialogs.py:360 +#: bookworm/gui/book_viewer/core_dialogs.py:369 msgid "Description" msgstr "描述" -#: bookworm/gui/book_viewer/core_dialogs.py:369 +#: bookworm/gui/book_viewer/core_dialogs.py:378 msgid "Number of Sections" msgstr "章节数" -#: bookworm/gui/book_viewer/core_dialogs.py:373 +#: bookworm/gui/book_viewer/core_dialogs.py:382 msgid "Number of Pages" msgstr "页数" #. Translators: the title of a column in the Tesseract language list -#: bookworm/gui/book_viewer/core_dialogs.py:376 bookworm/ocr/ocr_dialogs.py:484 +#: bookworm/gui/book_viewer/core_dialogs.py:385 bookworm/ocr/ocr_dialogs.py:496 msgid "Language" msgstr "语言" -#: bookworm/gui/book_viewer/core_dialogs.py:379 +#: bookworm/gui/book_viewer/core_dialogs.py:388 msgid "Publisher" msgstr "出版商" -#: bookworm/gui/book_viewer/core_dialogs.py:381 +#: bookworm/gui/book_viewer/core_dialogs.py:390 msgid "Created at" msgstr "创建于" -#: bookworm/gui/book_viewer/core_dialogs.py:384 +#: bookworm/gui/book_viewer/core_dialogs.py:393 msgid "Publication Date" msgstr "出版日期" #. Translators: the content of the about message -#: bookworm/gui/book_viewer/menubar.py:46 +#: bookworm/gui/book_viewer/menubar.py:52 msgid "" "{display_name}\n" "Version: {version}\n" @@ -2374,288 +2381,288 @@ msgstr "" "证。\n" "有关更多详细信息,您可以从帮助菜单中查看完整许可协议。\n" -#: bookworm/gui/book_viewer/menubar.py:58 +#: bookworm/gui/book_viewer/menubar.py:64 msgid "" "This release of Bookworm is generously sponsored by Capeds (www.capeds.net)." msgstr "此版本的 Bookworm 由 Capeds (www.capeds.net) 赞助开发。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:88 +#: bookworm/gui/book_viewer/menubar.py:94 msgid "Open...\tCtrl-O" msgstr "打开... \tCtrl-O" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:90 +#: bookworm/gui/book_viewer/menubar.py:96 msgid "New Window...\tCtrl-N" msgstr "新窗口...\tCtrl-N" -#: bookworm/gui/book_viewer/menubar.py:94 +#: bookworm/gui/book_viewer/menubar.py:100 msgid "&Pin\tCtrl-P" msgstr "固定\tCtrl-P" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:97 +#: bookworm/gui/book_viewer/menubar.py:103 msgid "&Save As Plain Text..." msgstr "另存为纯文本(&S)..." #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:102 +#: bookworm/gui/book_viewer/menubar.py:108 msgid "&Close Current Document\tCtrl-W" msgstr "关闭当前文档(&C)\tCtrl+W" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:104 +#: bookworm/gui/book_viewer/menubar.py:110 msgid "Close the currently open document" msgstr "关闭当前打开的文档" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:110 +#: bookworm/gui/book_viewer/menubar.py:116 msgid "C&lear Documents Cache..." msgstr "清除文档缓存(&L)..." #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:112 +#: bookworm/gui/book_viewer/menubar.py:118 msgid "" "Clear the document cache. Helps in fixing some issues with openning " "documents." msgstr "清除文档缓存。有助于解决打开文档的一些问题。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:120 +#: bookworm/gui/book_viewer/menubar.py:126 msgid "Pi&nned Documents" msgstr "固定的文档(&N)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:122 +#: bookworm/gui/book_viewer/menubar.py:128 msgid "Opens a list of documents you pinned." msgstr "查看固定的文档列表。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:128 -#: bookworm/gui/book_viewer/menubar.py:142 +#: bookworm/gui/book_viewer/menubar.py:134 +#: bookworm/gui/book_viewer/menubar.py:148 msgid "Clear list" msgstr "清除列表" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:130 +#: bookworm/gui/book_viewer/menubar.py:136 msgid "Clear the pinned documents list" msgstr "清除固定的文档列表" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:135 +#: bookworm/gui/book_viewer/menubar.py:141 msgid "&Recently Opened" msgstr "最近打开的文档(&D)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:137 +#: bookworm/gui/book_viewer/menubar.py:143 msgid "Opens a list of recently opened books." msgstr "查看最近打开的文档列表。" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:144 +#: bookworm/gui/book_viewer/menubar.py:150 msgid "Clear the recent books list." msgstr "清除最近打开的文档列表。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:150 +#: bookworm/gui/book_viewer/menubar.py:156 msgid "&Preferences...\tCtrl-Shift-P" msgstr "首选项(&P)... \tCtrl-Shift-P" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:152 +#: bookworm/gui/book_viewer/menubar.py:158 msgid "Configure application" msgstr "应用程序设置" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:156 +#: bookworm/gui/book_viewer/menubar.py:162 msgid "Exit" msgstr "退出(&E)" #. Translators: the title of a file dialog to browse to a document -#: bookworm/gui/book_viewer/menubar.py:207 +#: bookworm/gui/book_viewer/menubar.py:213 msgid "Select a document" msgstr "选择文档" -#: bookworm/gui/book_viewer/menubar.py:236 +#: bookworm/gui/book_viewer/menubar.py:242 msgid "Pinned" msgstr "固定" -#: bookworm/gui/book_viewer/menubar.py:240 +#: bookworm/gui/book_viewer/menubar.py:246 msgid "Unpinned" msgstr "取消固定" #. Translators: the title of a dialog showing #. the progress of book export process -#: bookworm/gui/book_viewer/menubar.py:266 +#: bookworm/gui/book_viewer/menubar.py:272 msgid "Exporting Document" msgstr "导出文档" #. Translators: the message of a dialog showing the progress of book export -#: bookworm/gui/book_viewer/menubar.py:268 +#: bookworm/gui/book_viewer/menubar.py:274 msgid "Converting document to plain text." msgstr "将文档转换为纯文本格式。" #. Translators: a message shown when the book is being exported -#: bookworm/gui/book_viewer/menubar.py:286 +#: bookworm/gui/book_viewer/menubar.py:292 msgid "Exporting Page {current} of {total}..." msgstr "正在导出第 {current} 页,共 {total} 页..." #. Translators: the title of the application preferences dialog -#: bookworm/gui/book_viewer/menubar.py:308 +#: bookworm/gui/book_viewer/menubar.py:314 msgid "{app_name} Preferences" msgstr "{app_name} 首选项" #. Translators: content of a message -#: bookworm/gui/book_viewer/menubar.py:319 +#: bookworm/gui/book_viewer/menubar.py:325 msgid "Are you sure you want to clear the documents cache?" msgstr "您确定要清除文档缓存吗?" #. Translators: title of a message box -#: bookworm/gui/book_viewer/menubar.py:321 +#: bookworm/gui/book_viewer/menubar.py:327 msgid "Clear Documents Cache?" msgstr "清除文档缓存?" #. Translators: content of a message box -#: bookworm/gui/book_viewer/menubar.py:329 +#: bookworm/gui/book_viewer/menubar.py:335 msgid "Documents cache has been cleared." msgstr "文档缓存已清除。" #. Translators: content of a message in a message box -#: bookworm/gui/book_viewer/menubar.py:338 +#: bookworm/gui/book_viewer/menubar.py:344 msgid "Clearing documents cache..." msgstr "正在清除文档缓存..." #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:382 +#: bookworm/gui/book_viewer/menubar.py:388 msgid "(No recent books)" msgstr "(无最近的文档)" -#: bookworm/gui/book_viewer/menubar.py:383 +#: bookworm/gui/book_viewer/menubar.py:389 msgid "No recent books" msgstr "没有最近阅读的文档" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:420 +#: bookworm/gui/book_viewer/menubar.py:426 msgid "Document &Info..." msgstr "文档信息(&I)..." #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:422 +#: bookworm/gui/book_viewer/menubar.py:428 msgid "Show information about number of chapters, word count..etc." msgstr "显示有关章节数、字数等信息。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:427 +#: bookworm/gui/book_viewer/menubar.py:433 msgid "&Element list...\tCtrl+F7" msgstr "元素列表...\\TCtrl+F7" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:429 +#: bookworm/gui/book_viewer/menubar.py:435 msgid "Show a list of semantic elements." msgstr "显示元素列表。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:434 +#: bookworm/gui/book_viewer/menubar.py:440 msgid "Change Reading &Mode...\tCtrl-Shift-M" msgstr "更改阅读模式(&M)...\tCtrl-Shift-M" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:436 +#: bookworm/gui/book_viewer/menubar.py:442 msgid "Change the current reading mode." msgstr "更改当前阅读模式。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:441 -#: bookworm/gui/book_viewer/menubar.py:947 +#: bookworm/gui/book_viewer/menubar.py:447 +#: bookworm/gui/book_viewer/menubar.py:953 msgid "&Render Page...\tCtrl-R" msgstr "渲染页面(&R)...\tCtrl-R" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:443 -#: bookworm/gui/book_viewer/menubar.py:948 +#: bookworm/gui/book_viewer/menubar.py:449 +#: bookworm/gui/book_viewer/menubar.py:954 msgid "View a fully rendered version of this page." msgstr "查看本页的渲染版本。" -#: bookworm/gui/book_viewer/menubar.py:485 +#: bookworm/gui/book_viewer/menubar.py:491 msgid "Rendered Page" msgstr "渲染页面" -#: bookworm/gui/book_viewer/menubar.py:502 +#: bookworm/gui/book_viewer/menubar.py:508 msgid "Available reading modes" msgstr "可用的阅读模式" -#: bookworm/gui/book_viewer/menubar.py:503 +#: bookworm/gui/book_viewer/menubar.py:509 msgid "Select Reading Mode " msgstr "选择阅读模式 " -#: bookworm/gui/book_viewer/menubar.py:528 +#: bookworm/gui/book_viewer/menubar.py:534 msgid "Element List" msgstr "元素列表" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:555 -#: bookworm/gui/book_viewer/menubar.py:937 +#: bookworm/gui/book_viewer/menubar.py:561 +#: bookworm/gui/book_viewer/menubar.py:943 msgid "&Find in Document...\tCtrl-F" msgstr "在文档中查找(&F)...\tCtrl-F" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:557 -#: bookworm/gui/book_viewer/menubar.py:938 +#: bookworm/gui/book_viewer/menubar.py:563 +#: bookworm/gui/book_viewer/menubar.py:944 msgid "Search this document." msgstr "搜索本文档。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:562 +#: bookworm/gui/book_viewer/menubar.py:568 msgid "Find &Next\tF3" msgstr "查找下一个(&N)\\TF3" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:564 +#: bookworm/gui/book_viewer/menubar.py:570 msgid "Find next occurrence." msgstr "查找下一个匹配项。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:569 +#: bookworm/gui/book_viewer/menubar.py:575 msgid "Find &Previous\tShift-F3" msgstr "查找上一个(&P)\tShift-F3" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:571 +#: bookworm/gui/book_viewer/menubar.py:577 msgid "Find previous occurrence." msgstr "查找上一个匹配项。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:576 +#: bookworm/gui/book_viewer/menubar.py:582 msgid "&Jump to Line...\tCtrl-L" msgstr "行跳转(&G)\tCtrl-L" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:578 +#: bookworm/gui/book_viewer/menubar.py:584 msgid "Jump to a line within the current page or document" msgstr "跳转到当前页面或文档中的某一行" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:583 -#: bookworm/gui/book_viewer/menubar.py:931 +#: bookworm/gui/book_viewer/menubar.py:589 +#: bookworm/gui/book_viewer/menubar.py:937 msgid "&Go To Page...\tCtrl-G" msgstr "页码跳转(&G)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:585 +#: bookworm/gui/book_viewer/menubar.py:591 msgid "Go to page" msgstr "跳转到" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:590 +#: bookworm/gui/book_viewer/menubar.py:596 msgid "&Go To Page By Label...\tCtrl-Shift-G" msgstr "标签跳转(&G)...\tCtrl-Shift-G" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:592 +#: bookworm/gui/book_viewer/menubar.py:598 msgid "Go to a page using its label" msgstr "使用标签跳转页面" -#: bookworm/gui/book_viewer/menubar.py:625 +#: bookworm/gui/book_viewer/menubar.py:631 msgid "" "You are here: {current_line}\n" "You can't go further than: {last_line}" @@ -2663,131 +2670,131 @@ msgstr "" "此处:{current_line}\n" "无法继续往后:{last_line}" -#: bookworm/gui/book_viewer/menubar.py:628 +#: bookworm/gui/book_viewer/menubar.py:634 msgid "Line number" msgstr "行号" -#: bookworm/gui/book_viewer/menubar.py:629 +#: bookworm/gui/book_viewer/menubar.py:635 msgid "Jump to line" msgstr "跳转到行" #. Translators: the title of the go to page dialog -#: bookworm/gui/book_viewer/menubar.py:642 +#: bookworm/gui/book_viewer/menubar.py:648 msgid "Go To Page" msgstr "跳转页码" -#: bookworm/gui/book_viewer/menubar.py:649 +#: bookworm/gui/book_viewer/menubar.py:655 msgid "Go To Page By Label" msgstr "按标签跳转" -#: bookworm/gui/book_viewer/menubar.py:649 +#: bookworm/gui/book_viewer/menubar.py:655 msgid "Page Label" msgstr "页标签" #. Translators: the title of the search dialog -#: bookworm/gui/book_viewer/menubar.py:657 +#: bookworm/gui/book_viewer/menubar.py:663 msgid "Search Document" msgstr "搜索文档" -#: bookworm/gui/book_viewer/menubar.py:683 +#: bookworm/gui/book_viewer/menubar.py:689 msgid "Searching For '{term}'" msgstr "搜索“{term}”" #. Translators: message to announce the number of search results #. also used as the final title of the search results dialog -#: bookworm/gui/book_viewer/menubar.py:698 +#: bookworm/gui/book_viewer/menubar.py:704 msgid "Results | {total}" msgstr "结果{total}" -#: bookworm/gui/book_viewer/menubar.py:735 +#: bookworm/gui/book_viewer/menubar.py:741 msgid "Search Result" msgstr "搜索结果" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:773 +#: bookworm/gui/book_viewer/menubar.py:779 msgid "&User guide...\tF1" msgstr "用户指南(&U)... \tF1" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:775 +#: bookworm/gui/book_viewer/menubar.py:781 msgid "View Bookworm manuals" msgstr "查看Bookworm的用户指南" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:780 +#: bookworm/gui/book_viewer/menubar.py:786 msgid "Bookworm &website..." msgstr "Bookworm 网站(&W)..." #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:782 +#: bookworm/gui/book_viewer/menubar.py:788 msgid "Visit the official website of Bookworm" msgstr "访问Bookworm的官方网站" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:787 +#: bookworm/gui/book_viewer/menubar.py:793 msgid "&License" msgstr "许可协议(&L)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:789 +#: bookworm/gui/book_viewer/menubar.py:795 msgid "View legal information about this program ." msgstr "查看有关本程序的法律许可信息。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:794 +#: bookworm/gui/book_viewer/menubar.py:800 msgid "Con&tributors" msgstr "贡献者(&T)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:796 +#: bookworm/gui/book_viewer/menubar.py:802 msgid "View a list of notable contributors to the program." msgstr "查看本程序的重要贡献者列表。" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:802 +#: bookworm/gui/book_viewer/menubar.py:808 msgid "&Restart with debug-mode enabled" msgstr "重新启动并启用调试模式(&R)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:804 +#: bookworm/gui/book_viewer/menubar.py:810 msgid "Restart the program with debug mode enabled to show errors" msgstr "重新启动本程序,并启用调试模式以显示错误" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:814 +#: bookworm/gui/book_viewer/menubar.py:820 msgid "&About Bookworm" msgstr "关于 Bookworm(&A)" #. Translators: the help text of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:816 +#: bookworm/gui/book_viewer/menubar.py:822 msgid "Show general information about this program" msgstr "显示有关该程序的信息" #. Translators: the title of the about dialog -#: bookworm/gui/book_viewer/menubar.py:849 +#: bookworm/gui/book_viewer/menubar.py:855 msgid "About {app_name}" msgstr "关于 {app_name}" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:885 +#: bookworm/gui/book_viewer/menubar.py:891 msgid "&Search" msgstr "搜索(&R)" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:887 +#: bookworm/gui/book_viewer/menubar.py:893 msgid "&Document" msgstr "文档(&D)" #. Translators: the label of an item in the application menubar -#: bookworm/gui/book_viewer/menubar.py:889 +#: bookworm/gui/book_viewer/menubar.py:895 msgid "&Help" msgstr "帮助(&H)" -#: bookworm/gui/book_viewer/menubar.py:932 +#: bookworm/gui/book_viewer/menubar.py:938 msgid "Jump to a page" msgstr "跳转到页面" -#: bookworm/gui/book_viewer/menubar.py:986 +#: bookworm/gui/book_viewer/menubar.py:992 msgid "Supported document formats" msgstr "支持的文档格式" @@ -2801,94 +2808,94 @@ msgstr "页 {}" #. Translators: content of a message in a progress dialog #: bookworm/http_tools/http_resource.py:43 -#: bookworm/platforms/win32/updater.py:196 +#: bookworm/platforms/win32/updater.py:195 msgid "Downloaded {downloaded} MB of {total} MB" msgstr "已下载 {downloaded} MB,共 {total} MB" #. Translators: the label of a page in the settings dialog #. Translators: the label of an item in the application menubar -#: bookworm/ocr/__init__.py:70 bookworm/ocr/__init__.py:89 -#: bookworm/ocr/__init__.py:92 +#: bookworm/ocr/__init__.py:75 bookworm/ocr/__init__.py:94 +#: bookworm/ocr/__init__.py:97 msgid "OCR" msgstr "OCR" #. Translators: the label of a group of controls in the reading page -#: bookworm/ocr/ocr_dialogs.py:51 bookworm/ocr/ocr_menu.py:207 +#: bookworm/ocr/ocr_dialogs.py:63 bookworm/ocr/ocr_menu.py:209 msgid "OCR Options" msgstr "识别选项" #. Translators: the title of a group of radio buttons in the OCR page #. in the application settings. -#: bookworm/ocr/ocr_dialogs.py:58 +#: bookworm/ocr/ocr_dialogs.py:70 msgid "Default OCR Engine" msgstr "默认 OCR 引擎" #. Translators: the label of a group of controls in the OCR page #. of the settings related to Tesseract OCR engine -#: bookworm/ocr/ocr_dialogs.py:65 +#: bookworm/ocr/ocr_dialogs.py:77 #: bookworm/ocr_engines/tesseract_ocr_engine/__init__.py:25 #: bookworm/ocr_engines/tesseract_ocr_engine/alt_tess.py:29 msgid "Tesseract OCR Engine" msgstr "Tesseract OCR 引擎" -#: bookworm/ocr/ocr_dialogs.py:70 +#: bookworm/ocr/ocr_dialogs.py:82 msgid "Download Tesseract OCR Engine" msgstr "下载 Tesseract OCR 引擎" -#: bookworm/ocr/ocr_dialogs.py:71 +#: bookworm/ocr/ocr_dialogs.py:83 msgid "Get a free, high-quality OCR engine that supports over 100 languages." msgstr "获取支持 100 多种语言的免费且高质量的 OCR 引擎。" #. Translators: label of a button -#: bookworm/ocr/ocr_dialogs.py:81 +#: bookworm/ocr/ocr_dialogs.py:93 msgid "Manage Tesseract OCR Languages" msgstr "管理 Tesseract OCR 语言" #. Translators: description of a button -#: bookworm/ocr/ocr_dialogs.py:83 +#: bookworm/ocr/ocr_dialogs.py:95 msgid "Add support for new languages, and /or remove installed languages." msgstr "添加对新语言的支持,和(或)删除已安装的语言。" #. Translators: label of a button -#: bookworm/ocr/ocr_dialogs.py:89 +#: bookworm/ocr/ocr_dialogs.py:101 msgid "Update Tesseract OCr Engine" msgstr "更新 Tesseract OCR 引擎" #. Translators: description of a button -#: bookworm/ocr/ocr_dialogs.py:91 +#: bookworm/ocr/ocr_dialogs.py:103 msgid "Check for and install updates for Tesseract OCR Engine" msgstr "检查并更新 Tesseract OCR 引擎" #. Translators: the label of a group of controls in the reading page #. of the settings related to image enhancement -#: bookworm/ocr/ocr_dialogs.py:97 +#: bookworm/ocr/ocr_dialogs.py:109 msgid "Image processing" msgstr "图像处理" #. Translators: the label of a checkbox -#: bookworm/ocr/ocr_dialogs.py:103 +#: bookworm/ocr/ocr_dialogs.py:115 msgid "Enable default image enhancement filters" msgstr "启用默认图像增强过滤器" #. Translators: title of a progress dialog -#: bookworm/ocr/ocr_dialogs.py:127 +#: bookworm/ocr/ocr_dialogs.py:139 msgid "Downloading Tesseract OCR Engine" msgstr "下载 Tesseract OCR 引擎" #. Translators: title of a dialog to manage Tesseract OCR engine languages -#: bookworm/ocr/ocr_dialogs.py:140 +#: bookworm/ocr/ocr_dialogs.py:152 msgid "Manage Tesseract OCR Engine Languages" msgstr "管理 Tesseract OCR 引擎的语言" #. Translators: content of a message box -#: bookworm/ocr/ocr_dialogs.py:151 +#: bookworm/ocr/ocr_dialogs.py:163 msgid "" "Bookworm will now restart to complete the installation of the Tesseract OCR " "Engine." msgstr "Bookworm 现在将重新启动以完成 Tesseract OCR 引擎的安装。" #. Translators: content of a message box -#: bookworm/ocr/ocr_dialogs.py:171 +#: bookworm/ocr/ocr_dialogs.py:183 msgid "" "A new version of Tesseract OCr engine is available for download.\n" "It is strongly recommended to update to the latest version for the best " @@ -2902,145 +2909,145 @@ msgstr "" "您想更新到新版本吗?" #. Translators: title of a message box -#: bookworm/ocr/ocr_dialogs.py:175 +#: bookworm/ocr/ocr_dialogs.py:187 msgid "Update Tesseract OCr Engine?" msgstr "是否更新 Tesseract OCr 引擎?" #. Translators: message of a dialog -#: bookworm/ocr/ocr_dialogs.py:184 +#: bookworm/ocr/ocr_dialogs.py:196 msgid "Removing old Tesseract version. Please wait..." msgstr "正在删除旧版 Tesseract 请稍等..." #. Translators: content of a message box -#: bookworm/ocr/ocr_dialogs.py:190 +#: bookworm/ocr/ocr_dialogs.py:202 msgid "Your version of Tesseract OCR engine is up to date." msgstr "您的 Tesseract OCR 引擎版本是最新的。" #. Translators: content of a message box -#: bookworm/ocr/ocr_dialogs.py:201 +#: bookworm/ocr/ocr_dialogs.py:213 msgid "Failed to check for updates for Tesseract OCr engine." msgstr "检查 Tesseract OCr 引擎更新失败。" #. Translators: title of a group of controls -#: bookworm/ocr/ocr_dialogs.py:235 +#: bookworm/ocr/ocr_dialogs.py:247 msgid "Recognition Language" msgstr "识别语言" #. Translators: the label of a combobox -#: bookworm/ocr/ocr_dialogs.py:237 +#: bookworm/ocr/ocr_dialogs.py:249 msgid "Primary recognition Language" msgstr "主要识别语言" -#: bookworm/ocr/ocr_dialogs.py:244 +#: bookworm/ocr/ocr_dialogs.py:256 msgid "Add a secondary recognition language" msgstr "新增辅助识别语言" -#: bookworm/ocr/ocr_dialogs.py:248 +#: bookworm/ocr/ocr_dialogs.py:260 msgid "Secondary recognition Language" msgstr "辅助识别语言" -#: bookworm/ocr/ocr_dialogs.py:256 +#: bookworm/ocr/ocr_dialogs.py:268 #: bookworm/structured_text/structural_elements.py:71 msgid "Image" msgstr "图片" -#: bookworm/ocr/ocr_dialogs.py:257 +#: bookworm/ocr/ocr_dialogs.py:269 msgid "Supplied Image resolution::" msgstr "提供的图像分辨率:" -#: bookworm/ocr/ocr_dialogs.py:261 +#: bookworm/ocr/ocr_dialogs.py:273 msgid "Enable image enhancements" msgstr "启用图像增强" -#: bookworm/ocr/ocr_dialogs.py:266 +#: bookworm/ocr/ocr_dialogs.py:278 msgid "Available image pre-processing filters:" msgstr "可用的图像预处理过滤器:" #. Translators: the label of a checkbox -#: bookworm/ocr/ocr_dialogs.py:281 +#: bookworm/ocr/ocr_dialogs.py:293 msgid "&Save these options until I close the current book" msgstr "保存这些选项,直到我关闭当前文档为止" -#: bookworm/ocr/ocr_dialogs.py:362 +#: bookworm/ocr/ocr_dialogs.py:374 msgid "Increase image resolution" msgstr "提高图像分辨率" -#: bookworm/ocr/ocr_dialogs.py:363 +#: bookworm/ocr/ocr_dialogs.py:375 msgid "Binarization" msgstr "二值化" -#: bookworm/ocr/ocr_dialogs.py:366 +#: bookworm/ocr/ocr_dialogs.py:378 msgid "Split two-in-one scans to individual pages" msgstr "将二合一扫描拆分到单页面" -#: bookworm/ocr/ocr_dialogs.py:369 +#: bookworm/ocr/ocr_dialogs.py:381 msgid "Combine images" msgstr "图像合并" -#: bookworm/ocr/ocr_dialogs.py:370 +#: bookworm/ocr/ocr_dialogs.py:382 msgid "Blurring" msgstr "模糊" -#: bookworm/ocr/ocr_dialogs.py:371 +#: bookworm/ocr/ocr_dialogs.py:383 msgid "Deskewing" msgstr "去偏斜" -#: bookworm/ocr/ocr_dialogs.py:372 +#: bookworm/ocr/ocr_dialogs.py:384 msgid "Erosion" msgstr "腐蚀" -#: bookworm/ocr/ocr_dialogs.py:373 +#: bookworm/ocr/ocr_dialogs.py:385 msgid "Dilation" msgstr "膨胀" -#: bookworm/ocr/ocr_dialogs.py:374 +#: bookworm/ocr/ocr_dialogs.py:386 msgid "Sharpen image" msgstr "锐化图像" -#: bookworm/ocr/ocr_dialogs.py:375 +#: bookworm/ocr/ocr_dialogs.py:387 msgid "Invert colors" msgstr "颜色反转" -#: bookworm/ocr/ocr_dialogs.py:378 +#: bookworm/ocr/ocr_dialogs.py:390 msgid "Debug" msgstr "调试" -#: bookworm/ocr/ocr_dialogs.py:397 +#: bookworm/ocr/ocr_dialogs.py:409 msgid "Installed Languages" msgstr "已安装的语言" -#: bookworm/ocr/ocr_dialogs.py:401 +#: bookworm/ocr/ocr_dialogs.py:413 msgid "Downloadable Languages" msgstr "可供下载的语言" #. Translators: label of a list control containing bookmarks -#: bookworm/ocr/ocr_dialogs.py:432 +#: bookworm/ocr/ocr_dialogs.py:444 msgid "Tesseract Languages" msgstr "Tesseract 语言" -#: bookworm/ocr/ocr_dialogs.py:445 +#: bookworm/ocr/ocr_dialogs.py:457 msgid "Download &Best Model" msgstr "下载最佳模型(&B)" -#: bookworm/ocr/ocr_dialogs.py:449 +#: bookworm/ocr/ocr_dialogs.py:461 msgid "Download &Fast Model" msgstr "下载快速模型(&F)" #. Translators: the title of a column in the Tesseract language list -#: bookworm/ocr/ocr_dialogs.py:491 +#: bookworm/ocr/ocr_dialogs.py:503 msgid "Installed" msgstr "已安装" -#: bookworm/ocr/ocr_dialogs.py:494 +#: bookworm/ocr/ocr_dialogs.py:506 msgid "Yes" msgstr "是" -#: bookworm/ocr/ocr_dialogs.py:494 +#: bookworm/ocr/ocr_dialogs.py:506 msgid "No" msgstr "否" #. Translators: content of a messagebox -#: bookworm/ocr/ocr_dialogs.py:524 +#: bookworm/ocr/ocr_dialogs.py:536 msgid "" "A version of the selected language model already exists.\n" "Are you sure you want to replace it?" @@ -3049,12 +3056,12 @@ msgstr "" "您确定要更换吗?" #. Translators: title of a progress dialog -#: bookworm/ocr/ocr_dialogs.py:542 +#: bookworm/ocr/ocr_dialogs.py:554 msgid "Downloading Language" msgstr "下载语言" #. Translators: content of a messagebox -#: bookworm/ocr/ocr_dialogs.py:567 +#: bookworm/ocr/ocr_dialogs.py:579 msgid "" "Are you sure you want to remove language:\n" "{lang}?" @@ -3063,26 +3070,26 @@ msgstr "" "{lang} 吗?" #. Translators: title of a messagebox -#: bookworm/ocr/ocr_dialogs.py:592 +#: bookworm/ocr/ocr_dialogs.py:604 msgid "Language Added" msgstr "已添加语言" #. Translators: content of a message box -#: bookworm/ocr/ocr_dialogs.py:594 +#: bookworm/ocr/ocr_dialogs.py:606 msgid "The Language Model was downloaded successfully." msgstr "该语言模型已成功下载。" #. Translators: title of a message box #. Translators: title of a messagebox -#: bookworm/ocr/ocr_dialogs.py:602 +#: bookworm/ocr/ocr_dialogs.py:614 #: bookworm/platforms/win32/pandoc_download.py:54 -#: bookworm/platforms/win32/tesseract_download.py:83 +#: bookworm/platforms/win32/tesseract_download.py:85 #: bookworm/webservices/wikiworm.py:135 msgid "Connection Error" msgstr "连接错误" #. Translators: content of a message box -#: bookworm/ocr/ocr_dialogs.py:604 +#: bookworm/ocr/ocr_dialogs.py:616 msgid "" "Failed to download language data.\n" "Please check your internet connection." @@ -3091,7 +3098,7 @@ msgstr "" "请检查您的互联网连接。" #. Translators: content of a messagebox -#: bookworm/ocr/ocr_dialogs.py:615 +#: bookworm/ocr/ocr_dialogs.py:627 msgid "" "Failed to install language data.\n" "Please try again later." @@ -3099,64 +3106,64 @@ msgstr "" "安装语言数据失败。\n" "请稍后再试。" -#: bookworm/ocr/ocr_menu.py:84 +#: bookworm/ocr/ocr_menu.py:86 msgid "Recognition Result: {image_name}" msgstr "识别结果:{image_name}" #. Translators: the label of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:119 +#: bookworm/ocr/ocr_menu.py:121 msgid "&Scan Current Page...\tF4" msgstr "扫描当前页(&S)...\tF4" #. Translators: the help text of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:121 +#: bookworm/ocr/ocr_menu.py:123 msgid "Run OCR on the current page" msgstr "扫描当前页" #. Translators: the label of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:126 +#: bookworm/ocr/ocr_menu.py:128 msgid "&Automatic OCR\tCtrl-F4" msgstr "自动OCR \tCtrl-F4" #. Translators: the help text of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:128 +#: bookworm/ocr/ocr_menu.py:130 msgid "Auto run OCR when turning pages." msgstr "翻页时自动执行OCR。" #. Translators: the label of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:134 +#: bookworm/ocr/ocr_menu.py:136 msgid "&Change OCR Options..." msgstr "更改OCR选项..." #. Translators: the help text of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:136 +#: bookworm/ocr/ocr_menu.py:138 msgid "Change OCR options" msgstr "更改OCR选项" #. Translators: the label of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:141 +#: bookworm/ocr/ocr_menu.py:143 msgid "Scan To &Text File..." msgstr "扫描到文本文档(&T)..." #. Translators: the help text of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:143 +#: bookworm/ocr/ocr_menu.py:145 msgid "Scan pages and save the text to a .txt file." msgstr "扫描页面并将文本保存至.txt文件。" #. Translators: the label of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:148 +#: bookworm/ocr/ocr_menu.py:150 msgid "Image To Text..." msgstr "图片转文字..." #. Translators: the help text of an item in the application menubar -#: bookworm/ocr/ocr_menu.py:150 +#: bookworm/ocr/ocr_menu.py:152 msgid "Run OCR on an image." msgstr "在图像上运行OCR。" #. Translators: the label of the OCR menu in the application menubar #. Event handlers #. Translators: content of a message -#: bookworm/ocr/ocr_menu.py:197 +#: bookworm/ocr/ocr_menu.py:199 msgid "" "No language for OCR is present.\n" "Please checkout Bookworm user manual to learn how to add new languages." @@ -3165,43 +3172,43 @@ msgstr "" "请查看 Bookworm 用户指南以了解如何添加新语言。" #. Translators: title for a message -#: bookworm/ocr/ocr_menu.py:201 +#: bookworm/ocr/ocr_menu.py:203 msgid "No Languages for OCR" msgstr "没有可供识别的语言" -#: bookworm/ocr/ocr_menu.py:220 +#: bookworm/ocr/ocr_menu.py:222 msgid "Canceled" msgstr "已取消(&C)" -#: bookworm/ocr/ocr_menu.py:256 +#: bookworm/ocr/ocr_menu.py:258 msgid "Running OCR, please wait..." msgstr "正在扫描,请稍候..." -#: bookworm/ocr/ocr_menu.py:266 +#: bookworm/ocr/ocr_menu.py:268 msgid "Automatic OCR is enabled" msgstr "自动OCR已启用" -#: bookworm/ocr/ocr_menu.py:268 +#: bookworm/ocr/ocr_menu.py:270 msgid "Automatic OCR is disabled" msgstr "自动OCR已停用" #. Translators: the title of a save file dialog asking the user for a filename #. to export notes to -#: bookworm/ocr/ocr_menu.py:281 +#: bookworm/ocr/ocr_menu.py:283 msgid "Save as" msgstr "另存为" #. Translators: the title of a progress dialog -#: bookworm/ocr/ocr_menu.py:298 +#: bookworm/ocr/ocr_menu.py:300 msgid "Scanning Pages" msgstr "扫描页面" #. Translators: the message of a progress dialog -#: bookworm/ocr/ocr_menu.py:300 +#: bookworm/ocr/ocr_menu.py:302 msgid "Preparing book" msgstr "准备文档" -#: bookworm/ocr/ocr_menu.py:319 +#: bookworm/ocr/ocr_menu.py:321 msgid "" "Successfully processed {total} pages.\n" "Extracted text was written to: {file}" @@ -3209,37 +3216,37 @@ msgstr "" "已成功处理 {total} 页。\n" "提取的文本被写入:{file}" -#: bookworm/ocr/ocr_menu.py:322 +#: bookworm/ocr/ocr_menu.py:324 msgid "OCR Completed" msgstr "OCR已完成" -#: bookworm/ocr/ocr_menu.py:339 +#: bookworm/ocr/ocr_menu.py:341 msgid "Portable Network Graphics" msgstr "PNG" -#: bookworm/ocr/ocr_menu.py:340 +#: bookworm/ocr/ocr_menu.py:342 msgid "JPEG images" msgstr "JPEG" -#: bookworm/ocr/ocr_menu.py:341 +#: bookworm/ocr/ocr_menu.py:343 msgid "Bitmap images" msgstr "BMP" -#: bookworm/ocr/ocr_menu.py:342 +#: bookworm/ocr/ocr_menu.py:344 msgid "Tiff graphics" msgstr "Tiff 图像" -#: bookworm/ocr/ocr_menu.py:348 +#: bookworm/ocr/ocr_menu.py:350 msgid "All supported image formats" msgstr "所有支持的图像格式" #. Translators: the title of a file dialog to browse to an image -#: bookworm/ocr/ocr_menu.py:352 +#: bookworm/ocr/ocr_menu.py:354 msgid "Choose image file" msgstr "选择图像文件" #. Translators: content of a message box -#: bookworm/ocr/ocr_menu.py:367 +#: bookworm/ocr/ocr_menu.py:369 msgid "" "Could not load image from\n" "{filename}.\n" @@ -3249,15 +3256,15 @@ msgstr "" "请确保文件存在且其中包含的数据未损坏。" #. Translators: title of a message box -#: bookworm/ocr/ocr_menu.py:372 +#: bookworm/ocr/ocr_menu.py:374 msgid "Could not load image file" msgstr "无法加载图像文件" -#: bookworm/ocr/ocr_menu.py:418 +#: bookworm/ocr/ocr_menu.py:420 msgid "Scan finished." msgstr "扫描完成。" -#: bookworm/ocr/ocr_menu.py:424 +#: bookworm/ocr/ocr_menu.py:426 msgid "OCR canceled" msgstr "取消识别" @@ -3286,7 +3293,7 @@ msgid "Windows 10 OCR" msgstr "Windows 10 OCR" #: bookworm/platforms/win32/pandoc_download.py:39 -#: bookworm/platforms/win32/tesseract_download.py:68 +#: bookworm/platforms/win32/tesseract_download.py:70 msgid "Extracting file..." msgstr "正在提取文件..." @@ -3312,11 +3319,11 @@ msgstr "" "请再试一次。" #. Translators: content of a messagebox -#: bookworm/platforms/win32/tesseract_download.py:76 +#: bookworm/platforms/win32/tesseract_download.py:78 msgid "Tesseract engine downloaded successfully" msgstr "Tesseract 引擎已成功下载" -#: bookworm/platforms/win32/tesseract_download.py:84 +#: bookworm/platforms/win32/tesseract_download.py:86 msgid "" "Could not download Tesseract OCR Engine.\n" "Please check your internet and try again." @@ -3324,7 +3331,7 @@ msgstr "" "无法下载 Tesseract 引擎\n" "请检查您的互联网连接。" -#: bookworm/platforms/win32/tesseract_download.py:95 +#: bookworm/platforms/win32/tesseract_download.py:97 msgid "" "Could not install the Tesseract OCR engine.\n" "Please try again." @@ -3334,7 +3341,7 @@ msgstr "" #. Translators: the content of a message indicating the availability of an #. update -#: bookworm/platforms/win32/updater.py:75 +#: bookworm/platforms/win32/updater.py:74 msgid "" "A new update for Bookworm has been released.\n" "Would you like to download and install it?\n" @@ -3347,25 +3354,25 @@ msgstr "" "新版本: {new}\n" #. Translators: the title of a message indicating the availability of an update -#: bookworm/platforms/win32/updater.py:82 +#: bookworm/platforms/win32/updater.py:81 msgid "Bookworm Update" msgstr "Bookworm 更新" #. Translators: the title of a message indicating the progress of downloading #. an update -#: bookworm/platforms/win32/updater.py:92 +#: bookworm/platforms/win32/updater.py:91 msgid "Downloading Update" msgstr "下载更新" #. Translators: a message indicating the progress of downloading an update #. bundle -#: bookworm/platforms/win32/updater.py:94 +#: bookworm/platforms/win32/updater.py:93 msgid "Downloading update bundle" msgstr "下载更新包" #. Translators: the content of a message indicating a failure in downloading an #. update -#: bookworm/platforms/win32/updater.py:114 +#: bookworm/platforms/win32/updater.py:113 msgid "" "A network error was occured when trying to download the update.\n" "Make sure you are connected to the internet, or try again at a later time." @@ -3374,7 +3381,7 @@ msgstr "" "确保您已连接到互联网,或稍后重试。" #. Translators: the content of a message indicating a corrupted file -#: bookworm/platforms/win32/updater.py:134 +#: bookworm/platforms/win32/updater.py:133 msgid "" "The update file has been downloaded, but it has been corrupted during " "download.\n" @@ -3384,15 +3391,15 @@ msgstr "" "您要重新下载更新吗?" #. Translators: the title of a message indicating a corrupted file -#: bookworm/platforms/win32/updater.py:139 +#: bookworm/platforms/win32/updater.py:138 msgid "Download Error" msgstr "下载错误" -#: bookworm/platforms/win32/updater.py:150 +#: bookworm/platforms/win32/updater.py:149 msgid "Extracting update bundle..." msgstr "正在提取更新包..." -#: bookworm/platforms/win32/updater.py:155 +#: bookworm/platforms/win32/updater.py:154 msgid "" "A problem has occured when installing the update.\n" "Please check the logs for more info." @@ -3400,13 +3407,13 @@ msgstr "" "安装更新时出现问题。\n" "请查看日志以获取更多信息。" -#: bookworm/platforms/win32/updater.py:158 +#: bookworm/platforms/win32/updater.py:157 msgid "Error installing update" msgstr "安装更新时出错" #. Translators: the content of a message indicating successful download of the #. update bundle -#: bookworm/platforms/win32/updater.py:167 +#: bookworm/platforms/win32/updater.py:166 msgid "" "The update has been downloaded successfully, and it is ready to be " "installed.\n" @@ -3419,14 +3426,28 @@ msgstr "" #. Translators: the title of a message indicating successful download of the #. update bundle -#: bookworm/platforms/win32/updater.py:173 +#: bookworm/platforms/win32/updater.py:172 msgid "Download Completed" msgstr "下载完成" -#: bookworm/platforms/win32/speech_engines/onecore.py:74 +#: bookworm/platforms/win32/speech_engines/onecore.py:73 msgid "One-core Synthesizer" msgstr "Windows OneCore 语音" +#: bookworm/platforms/win32/speech_engines/espeak/__init__.py:74 +msgid "eSpeak NG" +msgstr "eSpeak NG" + +#. Translators: name of the default espeak varient. +#: bookworm/platforms/win32/speech_engines/espeak/_espeak.py:442 +msgctxt "espeakVarient" +msgid "none" +msgstr "无" + +#: bookworm/platforms/win32/speech_engines/piper/__init__.py:201 +msgid "Piper Neural TTS" +msgstr "Piper Neural TTS" + #: bookworm/speechdriver/__init__.py:16 msgid "No Speech" msgstr "无语音" @@ -3476,56 +3497,56 @@ msgid "Table" msgstr "表格" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/__init__.py:94 +#: bookworm/text_to_speech/__init__.py:106 msgid "S&peech" msgstr "语音(&S)" #. Translators: the label of a page in the settings dialog -#: bookworm/text_to_speech/__init__.py:99 +#: bookworm/text_to_speech/__init__.py:111 msgid "Reading" msgstr "阅读" #. Translators: the label of a page in the settings dialog #. Translators: the label of a group of controls in the #. speech settings page related to voice selection -#: bookworm/text_to_speech/__init__.py:101 -#: bookworm/text_to_speech/__init__.py:112 -#: bookworm/text_to_speech/tts_gui.py:137 +#: bookworm/text_to_speech/__init__.py:113 +#: bookworm/text_to_speech/__init__.py:124 +#: bookworm/text_to_speech/tts_gui.py:140 msgid "Voice" msgstr "语音" -#: bookworm/text_to_speech/__init__.py:109 +#: bookworm/text_to_speech/__init__.py:121 msgid "Back" msgstr "返回" -#: bookworm/text_to_speech/__init__.py:110 +#: bookworm/text_to_speech/__init__.py:122 msgid "Play" msgstr "朗读" -#: bookworm/text_to_speech/__init__.py:111 +#: bookworm/text_to_speech/__init__.py:123 msgid "Forward" msgstr "向前" -#: bookworm/text_to_speech/__init__.py:202 +#: bookworm/text_to_speech/__init__.py:214 msgid "End of document." msgstr "文档结束。" -#: bookworm/text_to_speech/__init__.py:223 +#: bookworm/text_to_speech/__init__.py:235 msgid "End of section: {chapter}." msgstr "章节末尾: {chapter}。" #. Translators: spoken message at the end of the document -#: bookworm/text_to_speech/__init__.py:256 +#: bookworm/text_to_speech/__init__.py:268 msgid "End of document" msgstr "文档结束" #. Translators: the title of a message telling the user that no TTS voice found -#: bookworm/text_to_speech/__init__.py:409 +#: bookworm/text_to_speech/__init__.py:422 msgid "No TTS Voices" msgstr "无TTS引擎" #. Translators: a message telling the user that no TTS voice found -#: bookworm/text_to_speech/__init__.py:411 +#: bookworm/text_to_speech/__init__.py:424 msgid "" "A valid Text-to-speech voice was not found for the current speech engine.\n" "Text-to-speech functionality will be disabled." @@ -3534,19 +3555,24 @@ msgstr "" "TTS功能将被禁用。" #. Translators: a message telling the user that the TTS voice has been changed -#: bookworm/text_to_speech/__init__.py:429 +#: bookworm/text_to_speech/__init__.py:442 msgid "" "Bookworm has noticed that the currently configured Text-to-speech voice " -"speaks a language different from that of this book.\n" +"speaks a language different from that of this document.\n" "Do you want to temporary switch to another voice that speaks a language " -"similar to the language of the currently opened document?" +"similar to the language of the currently opened document?\n" +"\n" +"Voice language: {voice_lang}\n" +"Document language: {document_lang}" msgstr "" -"Bookworm发现当前语音引擎的语言与本文档的语言不一致,是否暂时切换到与本文档相" -"似的另一个语音引擎?" +"Bookworm发现当前语音引擎的语言与文档的语言不一致,是否暂时切换到与本文档语言" +"相似的另一个语音引擎?\n" +"语音语言: {voice_lang}\n" +"文档语言: {document_lang}" #. Translators: the title of a message telling the user that the TTS voice has #. been changed -#: bookworm/text_to_speech/__init__.py:436 +#: bookworm/text_to_speech/__init__.py:455 msgid "Incompatible TTS Voice Detected" msgstr "检测到不兼容的TTS语音引擎" @@ -3566,176 +3592,176 @@ msgid "Express" msgstr "Express" #. Translators: the label of a group of controls in the reading page -#: bookworm/text_to_speech/tts_gui.py:48 +#: bookworm/text_to_speech/tts_gui.py:51 msgid "Reading Options" msgstr "阅读选项" #. Translators: the title of a group of radio buttons in the reading page #. in the application settings related to how to read. -#: bookworm/text_to_speech/tts_gui.py:54 +#: bookworm/text_to_speech/tts_gui.py:57 msgid "When Pressing Play:" msgstr "开始朗读时:" #. Translators: the label of a radio button -#: bookworm/text_to_speech/tts_gui.py:59 +#: bookworm/text_to_speech/tts_gui.py:62 msgid "Read the entire book" msgstr "整本阅读" #. Translators: the label of a radio button -#: bookworm/text_to_speech/tts_gui.py:61 +#: bookworm/text_to_speech/tts_gui.py:64 msgid "Read the current section" msgstr "阅读当前章节" #. Translators: the label of a radio button -#: bookworm/text_to_speech/tts_gui.py:63 +#: bookworm/text_to_speech/tts_gui.py:66 msgid "Read the current page" msgstr "阅读当前页" #. Translators: the title of a group of radio buttons in the reading page #. in the application settings related to where to start reading from. -#: bookworm/text_to_speech/tts_gui.py:71 +#: bookworm/text_to_speech/tts_gui.py:74 msgid "Start reading from:" msgstr "从以下位置开始阅读:" #. Translators: the label of a radio button -#: bookworm/text_to_speech/tts_gui.py:75 +#: bookworm/text_to_speech/tts_gui.py:78 msgid "Cursor position" msgstr "光标位置" -#: bookworm/text_to_speech/tts_gui.py:75 +#: bookworm/text_to_speech/tts_gui.py:78 msgid "Beginning of page" msgstr "页面起始处" #. Translators: the label of a group of controls in the reading page #. of the settings related to behavior during reading aloud -#: bookworm/text_to_speech/tts_gui.py:79 +#: bookworm/text_to_speech/tts_gui.py:82 msgid "During Reading Aloud" msgstr "朗读过程中" -#: bookworm/text_to_speech/tts_gui.py:84 +#: bookworm/text_to_speech/tts_gui.py:87 msgid "Speak page number" msgstr "读出页码" #. Translators: the label of a checkbox -#: bookworm/text_to_speech/tts_gui.py:91 +#: bookworm/text_to_speech/tts_gui.py:94 msgid "Announce the end of sections" msgstr "读出章节结束" #. Translators: the label of a checkbox -#: bookworm/text_to_speech/tts_gui.py:98 +#: bookworm/text_to_speech/tts_gui.py:101 msgid "Ask to switch to a voice that speaks the language of the current book" msgstr "切换到与当前文档语言一致的语音" #. Translators: the label of a checkbox -#: bookworm/text_to_speech/tts_gui.py:105 +#: bookworm/text_to_speech/tts_gui.py:108 msgid "Highlight spoken text" msgstr "高亮显示朗读内容" #. Translators: the label of a checkbox -#: bookworm/text_to_speech/tts_gui.py:112 +#: bookworm/text_to_speech/tts_gui.py:115 msgid "Select spoken text" msgstr "选中朗读内容" #. Translators: the label of a combobox containing a list of tts engines -#: bookworm/text_to_speech/tts_gui.py:140 +#: bookworm/text_to_speech/tts_gui.py:143 msgid "Speech Engine:" msgstr "语音引擎:" #. Translators: the label of a button that opens a dialog to change the speech #. engine -#: bookworm/text_to_speech/tts_gui.py:145 +#: bookworm/text_to_speech/tts_gui.py:148 msgid "Change..." msgstr "更改(&C)..." #. Translators: the label of a combobox containing a list of tts voices -#: bookworm/text_to_speech/tts_gui.py:148 +#: bookworm/text_to_speech/tts_gui.py:151 msgid "Select Voice:" msgstr "语音:" #. Translators: the label of the speech rate slider -#: bookworm/text_to_speech/tts_gui.py:151 +#: bookworm/text_to_speech/tts_gui.py:154 msgid "Speech Rate:" msgstr "语速:" #. Translators: the label of the voice pitch slider -#: bookworm/text_to_speech/tts_gui.py:157 +#: bookworm/text_to_speech/tts_gui.py:160 msgid "Voice Pitch:" -msgstr "音调" +msgstr "音调:" #. Translators: the label of the speech volume slider -#: bookworm/text_to_speech/tts_gui.py:163 +#: bookworm/text_to_speech/tts_gui.py:166 msgid "Speech Volume:" msgstr "音量:" #. Translators: the label of a group of controls in the speech #. settings page related to speech pauses -#: bookworm/text_to_speech/tts_gui.py:170 +#: bookworm/text_to_speech/tts_gui.py:173 msgid "Pauses" msgstr "停顿" #. Translators: the label of an edit field -#: bookworm/text_to_speech/tts_gui.py:173 +#: bookworm/text_to_speech/tts_gui.py:176 msgid "Additional Pause At Sentence End (Ms)" msgstr "句末停顿 (毫秒)" #. Translators: the label of an edit field -#: bookworm/text_to_speech/tts_gui.py:178 +#: bookworm/text_to_speech/tts_gui.py:181 msgid "Additional Pause At Paragraph End (Ms)" msgstr "段末停顿 (毫秒)" #. Translators: the label of an edit field -#: bookworm/text_to_speech/tts_gui.py:183 +#: bookworm/text_to_speech/tts_gui.py:186 msgid "End of Page Pause (ms)" msgstr "页末停顿 (毫秒)" #. Translators: the label of an edit field -#: bookworm/text_to_speech/tts_gui.py:192 +#: bookworm/text_to_speech/tts_gui.py:195 msgid "End of Section Pause (ms)" msgstr "章、节末停顿 (毫秒)" -#: bookworm/text_to_speech/tts_gui.py:236 +#: bookworm/text_to_speech/tts_gui.py:239 msgid "Speech Engine" msgstr "语音引擎" #. Translators: the title of a dialog to edit a voice profile -#: bookworm/text_to_speech/tts_gui.py:285 +#: bookworm/text_to_speech/tts_gui.py:288 msgid "Voice Profile: {profile}" msgstr "语音配置{profile}" #. Translators: the label of a combobox to select a voice profile -#: bookworm/text_to_speech/tts_gui.py:312 +#: bookworm/text_to_speech/tts_gui.py:315 msgid "Select Voice Profile:" msgstr "选择语音配置:" #. Translators: the label of a button to activate a voice profile -#: bookworm/text_to_speech/tts_gui.py:318 +#: bookworm/text_to_speech/tts_gui.py:321 msgid "&Activate" msgstr "激活(&A)" #. Translators: the label of a button to create a new voice profile -#: bookworm/text_to_speech/tts_gui.py:324 +#: bookworm/text_to_speech/tts_gui.py:327 msgid "&New Profile..." msgstr "新建配置(&N)..." #. Translators: the entry of the active voice profile in the voice profiles #. list -#: bookworm/text_to_speech/tts_gui.py:358 +#: bookworm/text_to_speech/tts_gui.py:361 msgid "{profile} (active)" msgstr "{profile} (激活)" #. Translators: the label of an edit field to enter the voice profile name -#: bookworm/text_to_speech/tts_gui.py:408 +#: bookworm/text_to_speech/tts_gui.py:411 msgid "Profile Name:" msgstr "配置名称:" #. Translators: the title of a dialog to enter the name of a new voice profile -#: bookworm/text_to_speech/tts_gui.py:410 +#: bookworm/text_to_speech/tts_gui.py:413 msgid "New Voice Profile" msgstr "新语音配置" #. Translators: the content of a message notifying the user #. user of the existence of a voice profile with the same name -#: bookworm/text_to_speech/tts_gui.py:422 +#: bookworm/text_to_speech/tts_gui.py:425 msgid "" "A voice profile with the same name already exists. Please select another " "name." @@ -3743,7 +3769,7 @@ msgstr "具有相同名称的语音配置已存在。请换一个其他名称。 #. Translators: the content of a message telling the user that the voice #. profile he is removing is the active one -#: bookworm/text_to_speech/tts_gui.py:448 +#: bookworm/text_to_speech/tts_gui.py:451 msgid "" "Voice profile {profile} is the active profile.\n" "Please deactivate it first by clicking 'Deactivate Active Voice Profile` " @@ -3754,13 +3780,13 @@ msgstr "" #. Translators: the title of a message telling the user that #. it is not possible to remove this voice profile -#: bookworm/text_to_speech/tts_gui.py:455 +#: bookworm/text_to_speech/tts_gui.py:458 msgid "Cannot Remove Profile" msgstr "无法删除配置" #. Translators: the title of a message to confirm the removal of the voice #. profile -#: bookworm/text_to_speech/tts_gui.py:461 +#: bookworm/text_to_speech/tts_gui.py:464 msgid "" "Are you sure you want to remove voice profile {profile}?\n" "This cannot be undone." @@ -3771,102 +3797,102 @@ msgstr "" #. Translators: the title of a message to confirm the removal of a voice #. profile -#: bookworm/text_to_speech/tts_gui.py:466 +#: bookworm/text_to_speech/tts_gui.py:469 msgid "Remove Voice Profile?" msgstr "删除语音配置?" #. Translators: the label of a combobox -#: bookworm/text_to_speech/tts_gui.py:489 +#: bookworm/text_to_speech/tts_gui.py:492 msgid "Select Speech Engine:" msgstr "选择语音引擎:" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:518 +#: bookworm/text_to_speech/tts_gui.py:521 msgid "&Play\tF5" msgstr "朗读(&P) \tF5" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:520 +#: bookworm/text_to_speech/tts_gui.py:523 msgid "Start reading aloud" msgstr "开始朗读" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:525 +#: bookworm/text_to_speech/tts_gui.py:528 msgid "Pa&use/Resume\tF6" msgstr "暂停/恢复(&U) \tF6" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:527 +#: bookworm/text_to_speech/tts_gui.py:530 msgid "Pause/Resume reading aloud" msgstr "暂停/继续朗读" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:532 +#: bookworm/text_to_speech/tts_gui.py:535 msgid "&Stop\tF7" msgstr "停止(&S) \tF7" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:534 +#: bookworm/text_to_speech/tts_gui.py:537 msgid "Stop reading aloud" msgstr "停止朗读" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:539 +#: bookworm/text_to_speech/tts_gui.py:542 msgid "&Rewind\tAlt-LeftArrow" msgstr "快退(&R) Alt-Left" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:541 +#: bookworm/text_to_speech/tts_gui.py:544 msgid "Skip to previous paragraph" msgstr "跳到上一段" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:546 +#: bookworm/text_to_speech/tts_gui.py:549 msgid "&Fast Forward\tAlt-RightArrow" msgstr "快进(&F) \tAlt-Right" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:548 +#: bookworm/text_to_speech/tts_gui.py:551 msgid "Skip to next paragraph" msgstr "跳到下一段" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:553 +#: bookworm/text_to_speech/tts_gui.py:556 msgid "&Voice Profiles\tCtrl-Shift-V" msgstr "语音配置(&V) \tCtrl-Shift-V" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:555 +#: bookworm/text_to_speech/tts_gui.py:558 msgid "Manage voice profiles." msgstr "管理语音配置。" #. Translators: the label of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:560 +#: bookworm/text_to_speech/tts_gui.py:563 msgid "&Deactivate Active Voice Profile" msgstr "停用语音配置(&D)" #. Translators: the help text of an item in the application menubar -#: bookworm/text_to_speech/tts_gui.py:562 +#: bookworm/text_to_speech/tts_gui.py:565 msgid "Deactivate the active voice profile." msgstr "停用激活的语音配置。" #. Translators: a message that is announced when the speech is paused -#: bookworm/text_to_speech/tts_gui.py:624 +#: bookworm/text_to_speech/tts_gui.py:627 msgid "Paused" msgstr "已暂停" #. Translators: a message that is announced when the speech is resumed -#: bookworm/text_to_speech/tts_gui.py:628 +#: bookworm/text_to_speech/tts_gui.py:631 msgid "Resumed" msgstr "已恢复" #. Translators: a message that is announced when the speech is stopped -#: bookworm/text_to_speech/tts_gui.py:638 +#: bookworm/text_to_speech/tts_gui.py:641 msgid "Stopped" msgstr "已停止" #. Translators: the title of the voice profiles dialog -#: bookworm/text_to_speech/tts_gui.py:643 +#: bookworm/text_to_speech/tts_gui.py:646 msgid "Voice Profiles" msgstr "语音配置" diff --git a/bookworm/shell.py b/bookworm/shell.py index d1d5020f..ddd4c3e9 100644 --- a/bookworm/shell.py +++ b/bookworm/shell.py @@ -3,6 +3,6 @@ from bookworm.platforms import PLATFORM if PLATFORM == "win32": - from bookworm.platforms.win32.shell import shell_disintegrate, shell_integrate + from bookworm.platforms.win32.shell import shell_disintegrate, shell_integrate, is_file_type_associated elif PLATFORM == "linux": from bookworm.platforms.linux.shell import shell_disintegrate, shell_integrate diff --git a/requirements-app.txt b/requirements-app.txt index 67a346a7..e55d2053 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -36,7 +36,7 @@ msoffcrypto-tool==5.0.0 neosynth==3.2.0;sys_platform=="win32" numpy==1.26.4 odfpy==1.4.1 -opencv-python-headless==4.5.5.62 +opencv-python-headless==4.8.1.78 peewee==3.17.5 Pillow==10.3.0 platform-utils==1.5.1 diff --git a/tasks.py b/tasks.py index 61b2a89d..67720aa8 100644 --- a/tasks.py +++ b/tasks.py @@ -545,6 +545,69 @@ def update_version_info(c): print("Updated version information") +@task +@make_env +def gen_update_info_file(c): + """ + Generate or update the `update_info.json` file with the latest version details, + including download URLs and SHA1 hashes for x86 and x64 builds. + """ + from bookworm import app + from bookworm.utils import generate_sha1hash + + print("Generating update information file...") + + # Get the version info and determine the release channel + version_info = app.get_version_info(app.version) + channel = version_info.get("pre_type", "") # Stable version if no pre_type + + # Define base URLs and file paths for x86 and x64 builds + base_url = f"https://github.com/blindpandas/bookworm/releases/download/{app.version}" + x86_file = f"{app.display_name}-{app.version}-x86-update.bundle" + x64_file = f"{app.display_name}-{app.version}-x64-update.bundle" + x86_download_url = f"{base_url}/{x86_file}" + x64_download_url = f"{base_url}/{x64_file}" + + artifacts_folder = PROJECT_ROOT / "scripts" + x86_bundle_path = artifacts_folder / x86_file + x64_bundle_path = artifacts_folder / x64_file + + # Generate SHA1 hash or use default if file does not exist + x86_sha1hash = generate_sha1hash(x86_bundle_path) if x86_bundle_path.exists() else "example_x86_sha1hash" + x64_sha1hash = generate_sha1hash(x64_bundle_path) if x64_bundle_path.exists() else "example_x64_sha1hash" + + # Construct the update info dictionary + update_info = { + channel or "": { # Ensure stable version uses an empty string key + "version": app.version, + "x86_download": x86_download_url, + "x64_download": x64_download_url, + "x86_sha1hash": x86_sha1hash, + "x64_sha1hash": x64_sha1hash, + } + } + +# update_info_file = artifacts_folder / "update_info.json" + update_info_file = PROJECT_ROOT / "update_info.json" + + # Read the existing data if the file exists, otherwise start with an empty dictionary + try: + with update_info_file.open("r", encoding="utf-8") as f: + existing_data = json.load(f) + except (FileNotFoundError, json.JSONDecodeError): + print("Warning: No valid update_info.json file found. Creating a new one.") + existing_data = {} + + # Update the existing data with the new update information + existing_data.update(update_info) + + # Write the updated data back to the JSON file + with update_info_file.open("w", encoding="utf-8") as f: + json.dump(existing_data, f, indent=2, sort_keys=True) + + print(f"Update information file generated at {update_info_file}") + + def _add_pip_install_args(cmd, context): return "{cmd} --timeout {timeout} --retries {retries}".format( cmd=cmd, @@ -662,9 +725,15 @@ def freeze(c): with c.cd(str(PROJECT_ROOT / "scripts" / "builder")): if app.get_version_info()["pre_type"] is None: print( - "The current build is a final release. Turnning on python optimizations..." + "Final release detected. Python optimizations are currently disabled " + "to ensure assert statements and runtime checks are preserved." + " This is a temporary measure, and we plan to enable optimizations in future versions." ) - os.environ["PYTHONOPTIMIZE"] = "2" + # TODO: Python optimization mode is commented out to prevent removal of assert statements + # in production builds. Assert statements are crucial for ensuring runtime checks, + # and omitting them could lead to unexpected behavior or failures. + # To revisit: Determine how to handle optimizations without impacting critical runtime checks. + # os.environ["PYTHONOPTIMIZE"] = "2" c.run( f"pyinstaller Bookworm.spec --clean -y --distpath {c['build_folder'].parent}", hide=False, diff --git a/tests/test_otau.py b/tests/test_otau.py index c3dd7614..63936676 100644 --- a/tests/test_otau.py +++ b/tests/test_otau.py @@ -9,7 +9,7 @@ def test_is_not_valid_identifier(): def test_is_valid_identifier(): - valid_identifiers = ('', 'a', 'b', 'dev') + valid_identifiers = ('', 'a', 'b', 'rc') for identifier in valid_identifiers: channel = UpdateChannel(identifier)