Skip to content

Commit

Permalink
fix IndexError autotranslate (pop)
Browse files Browse the repository at this point in the history
  • Loading branch information
alekssamos committed Aug 30, 2020
1 parent a740d39 commit 7700dab
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Binary file modified .sconsign.dblite
Binary file not shown.
4 changes: 2 additions & 2 deletions addon/doc/en/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="../style.css" media="screen">
<title>Yandex translator for NVDA 2020.02.26</title>
<title>Yandex translator for NVDA 2020.02.27</title>
</head>
<body>
<h1>Дополнение Яндекс.Переводчик для NVDA</h1>
<p><a href="https://github.com/alekssamos/YandexTranslate/releases/download/v2020.02.26/YandexTranslate-2020.02.26.nvda-addon">Скачать версию 2020.02.26</a></p>
<p><a href="https://github.com/alekssamos/YandexTranslate/releases/download/v2020.02.27/YandexTranslate-2020.02.27.nvda-addon">Скачать версию 2020.02.27</a></p>
<p>После установки зайдите в NVDA меню, Параметры, Жесты ввода, назначте удобные вам сочетания клавиш для YandexTranslate.</p>
<p>Переводит выделенный фрагмент текста или текст из буфера обмена.</p>
<p>Настроить можно в NVDA меню, Сервис, Настройки Yandex Translate.</p>
Expand Down
2 changes: 1 addition & 1 deletion addon/doc/en/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Дополнение Яндекс.Переводчик для NVDA

[Скачать версию 2020.02.26](https://github.com/alekssamos/YandexTranslate/releases/download/v2020.02.26/YandexTranslate-2020.02.26.nvda-addon)
[Скачать версию 2020.02.27](https://github.com/alekssamos/YandexTranslate/releases/download/v2020.02.27/YandexTranslate-2020.02.27.nvda-addon)

После установки зайдите в NVDA меню, Параметры, Жесты ввода, назначте удобные вам сочетания клавиш для YandexTranslate.

Expand Down
3 changes: 2 additions & 1 deletion addon/globalPlugins/yandexTranslate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ def autoTranslateHandler(status, request):
t = [s for s in request["text"]] # need copy of the list
for item in speechSequence:
if isinstance(item, str):
translatedSpeechSequence.append(t.pop(0))
try: translatedSpeechSequence.append(t.pop(0))
except IndexError: pass
else:
translatedSpeechSequence.append(item)
return speak(translatedSpeechSequence, *args, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions addon/locale/ru/manifest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
summary = "Yandex translator for NVDA"
description = """Translates text using service Yandex Translate."""
summary = "Яндекс переводчик для NVDA"
description = """Переводит текст с помощью сервиса Яндекс Переводчик."""
2 changes: 1 addition & 1 deletion addon/manifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ summary = "Yandex translator for NVDA"
description = """Translates text using service Yandex Translate."""
author = "alekssamos <[email protected]>"
url = https://github.com/alexsamos/yandextranslate
version = 2020.02.26
version = 2020.02.27
docFileName = None
minimumNVDAVersion = 2019.3
lastTestedNVDAVersion = 2020.2
Expand Down

0 comments on commit 7700dab

Please sign in to comment.