Skip to content

Commit

Permalink
version 2023.5.2
Browse files Browse the repository at this point in the history
updated the github workflow to include the release info in a json file.
added a script to update version in the buildVars.py automatically if it as not been changed but is confirmed in a commit. this can be used manually, or automatically with a post commit hook.
updated sconstruct to generate the required json file for the add-on store.
updated buildVars to be compatible with the new sconstruct.
now *.json files are ignored.
updated the beep class to use "constants" for the beep panning.
added turkish language.
  • Loading branch information
davidacm committed May 2, 2023
1 parent 5d4a98a commit 3e3a4c8
Show file tree
Hide file tree
Showing 9 changed files with 391 additions and 75 deletions.
47 changes: 36 additions & 11 deletions .github/workflows/upload-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
permissions:
contents: write
name: Upload on new tags

on:
push:
tags:
['*']
workflow_dispatch:

jobs:
buildAndUpload:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3.1.2
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
cache: 'pip'

- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
sudo apt install gettext
- name: Add add-on version
run: |
import re
Expand All @@ -30,17 +36,36 @@ jobs:
f.seek(0)
f.write(text)
f.truncate()
shell: python
shell: python

- name: Build add-on
run: scons
- name: Calculate sha256
run: sha256sum *.nvda-addon >> changelog.md

- uses: actions/upload-artifact@v3
with:
name: packaged_addon
path: |
./*.nvda-addon
./*.json
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- uses: actions/checkout@v3
- name: download releases files
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R

- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
*.nvda-addon
body_path: changelog.md
prerelease: ${{ endsWith(github.ref, '-dev') }}
packaged_addon/*.nvda-addon
packaged_addon/*.json
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ addon/doc/en/
*.py[co]
*.nvda-addon
.sconsign.dblite
*.code-workspace
*.code-workspace
*.json
28 changes: 28 additions & 0 deletions addon/doc/tr/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# NVDA Konuşma Geçmişi

Bu, ilk olarak 2012'de Tyler Spivey tarafından oluşturulan NVDA için Clip Copy eklentisinin güncellenmiş bir versiyonudur.
Orijinal eklenti E.G, f12'de çok yaygın komutlar kullanıldığından, orijinal kısayollar diğer uygulamalarla çakışma gösterebileceğinden tuş vuruşları güncellendi.

## özellikler:

* En son konuşulan metni panoya kopyalama komutu.
* NVDA tarafından konuşulan en son 500 öğeyi inceleme yeteneği.
* NVDA tarafından konuşulan en güncel öğeleri içeren bir iletişim kutusu gösterir. Öğeleri inceleyebilir, çoklu seçim yapabilir ve geçerli öğeyi veya seçilen öğeleri kopyalayabilirsiniz.

## Kullanım:
* NVDA tarafından konuşulan en son öğeleri gözden geçirin: NVDA + shift + f11 (önceki öğe) veya NVDA + shift + f12 (sonraki öğe) tuşlarına basın.
* NVDA tarafından okunan son öğeyi veya geçerli gözden geçirilen öğeyi kopyalayın: NVDA + kontrol + f12.
* NVDA tarafından konuşulan en güncel öğeleri içeren bir iletişim kutusu gösterir: NVDA + alt + f12

### Konuşma geçmişi öğeleri.

Bu iletişim kutusunda, NVDA tarafından konuşulan en son öğelere, en son öğe en başta olmak üzere odaklanacaksınız. Yukarı ve aşağı ok tuşlarını kullanarak öğeler arasında gezinebilirsiniz. Her öğe yalnızca 100 karakter gösterecektir, ancak çok satırlı bir metin düzenleme alanında sekme tuşuna basarak tüm içeriği görebilirsiniz. Bu öğeler, NVDA tarafından konuşulan yeni öğelerle güncellenmeyecektir. Öğe listesini güncellemek istiyorsanız, bu iletişim kutusunu yeniden başlatmanız veya "geçmişi yenile" düğmesine basmanız gerekir.

Arama düzenleme alanında tüm öğeleri arayabilirsiniz. Birkaç harf veya kelime yazın ve ardından enter tuşuna basın. Öğe listesi, aramanıza göre güncellenecektir. Aramayı temizlemek için, arama düzenleme alanındaki metni temizlemeniz ve enter tuşuna basmanız yeterlidir. Ayrıca, arama alanındaysanız arama yapılır ve alan odağı kaybeder.
Örneğin: sekmeye basarak veya başka bir kontrole başka bir şekilde odaklanarak.
Kopyala düğmesini kullanarak mevcut seçili öğeleri kopyalayabilirsiniz. Bu, seçilen tüm öğeleri içeren alanda gösterilen tüm metni kopyalayacaktır.
Ayrıca, "Tümünü kopyala" düğmesi ile mevcut tüm öğeleri kopyalayabilirsiniz. Bu, yalnızca listede gösterilen mevcut öğeleri kopyalayacaktır, her biri yeni bir satırla ayrılacaktır. Herhangibir şey aradıysanız, bu düğme yalnızca bulunan öğeleri kopyalayacaktır.

Birden fazla öğe seçmek istiyorsanız, Windows seçme tuşlarının aynısını kullanın.
Örneğin: shift + yukarı ve aşağı ok tuşlarını bitişik seçim yapmak için, kontrol + Aşağı/yukarı ok bitişik olmayan seçimleri yapmak için.
Bu iletişim kutusunu kapatmak için Escape veya kapat düğmesine basın.
23 changes: 9 additions & 14 deletions addon/globalPlugins/speechHistoryExplorer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ class AppConfig:

# a static class for ease of beeping tones. This may be used to change beeps to wave sounds.
class beep:
def left(freq=220, duration=100):
tones.beep(freq, duration, 100, 0)

def right(freq=220, duration=100):
tones.beep(freq, duration, 0, 100)

def center(freq=1500, duration=120):
tones.beep(freq, duration)
center, left, right = (100, 100), (100, 0), (0, 100)
def beep(direction=(100,100), freq=220, length=100):
tones.beep(freq, length, *direction)


class GlobalPlugin(globalPluginHandler.GlobalPlugin):
Expand Down Expand Up @@ -77,7 +72,7 @@ def script_copyLast(self, gesture):
if AF.trimWhitespaceFromEnd:
text = text.rstrip()
if api.copyToClip(text) and AF.beepWhenPerformingActions:
beep.center()
beep.beep(beep.center, 1500, 120)

@script(
# Translators: Documentation string for previous speech history Explorer item script
Expand All @@ -89,9 +84,9 @@ def script_prevString(self, gesture):
if self.history_pos > len(self._history) - 1:
if AF.beepWhenPerformingActions:
if AF.beepPanning:
beep.left()
beep.beep(beep.left)
else:
beep.center(220, 100)
beep.beep()
self.history_pos -= 1
self.oldSpeak(self._history[self.history_pos])

Expand All @@ -105,9 +100,9 @@ def script_nextString(self, gesture):
if self.history_pos < 0:
if AF.beepWhenPerformingActions:
if AF.beepPanning:
beep.right()
beep.beep(beep.right)
else:
beep.center(220, 100)
beep.beep()
self.history_pos += 1
self.oldSpeak(self._history[self.history_pos])

Expand Down Expand Up @@ -367,7 +362,7 @@ def onCopy(self,evt):
t = self.currentTextElement.GetValue()
if t:
if api.copyToClip(t):
tones.beep(1500, 120)
tones.beep(duration=120)

def onCopyAll(self, evt):
t = self.itemsToString(range(0, len(self.searchHistory)))
Expand Down
98 changes: 98 additions & 0 deletions addon/locale/tr/LC_MESSAGES/nvda.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
msgid ""
msgstr ""
"Project-Id-Version: Konuşma Geçmişi Gezgini 2023.3\n"
"POT-Creation-Date: 2023-04-27 14:41+0300\n"
"PO-Revision-Date: 2023-04-27 14:56+0300\n"
"Last-Translator: Umut KORKMAZ <umutkork@gmail.com>\n"
"Language-Team: Umut KORKMAZ <umutkork@gmail.com>\n"
"Language: tr_TR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.2.2\n"
"X-Poedit-Basepath: ../../../globalPlugins\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: .\n"

#: speechHistoryExplorer/__init__.py:47 speechHistoryExplorer/__init__.py:151
msgid "Speech History Explorer"
msgstr "Konuşma Geçmişi Gezgini"

#: speechHistoryExplorer/__init__.py:66
msgid ""
"Copy the currently selected speech history Explorer item to the clipboard, "
"which by default will be the most recently spoken text by NVDA."
msgstr ""
"Seçili olan konuşma geçmişi Gezgini öğesini panoya kopyalar, varsayılan "
"olarak NVDA tarafından en son konuşulan metin olacaktır."

#: speechHistoryExplorer/__init__.py:80
msgid "Review the previous item in NVDA's speech history."
msgstr "NVDA'nın konuşma geçmişindeki bir önceki öğeyi gözden geçirir."

#: speechHistoryExplorer/__init__.py:96
msgid "Review the next item in NVDA's speech history."
msgstr "NVDA'nın konuşma geçmişindeki bir sonraki öğeyi gözden geçirir."

#: speechHistoryExplorer/__init__.py:112
msgid "Opens a dialog showing all most recent items spoken by NVDA"
msgstr ""
"NVDA tarafından konuşulan en son tüm öğeleri gösteren bir iletişim kutusu "
"açar"

#: speechHistoryExplorer/__init__.py:156
msgid ""
"&Maximum number of history entries (requires NVDA restart to take effect)"
msgstr ""
"Gösterilecek &maksimum giriş sayısı (etkinleştirilebilmesi için NVDA'nın "
"yeniden başlatılması gerekir)"

#: speechHistoryExplorer/__init__.py:159
msgid "Trim whitespace from &start when copying text"
msgstr "Metni kopyalarken baştaki boşluklarıke&s"

#: speechHistoryExplorer/__init__.py:162
msgid "Trim whitespace from &end when copying text"
msgstr "Metni kopyalarken sondaki boşlukları k&es"

#: speechHistoryExplorer/__init__.py:165
msgid "Beep when performing actions"
msgstr "Eylemleri gerçekleştirirken bip sesi çıkart"

#: speechHistoryExplorer/__init__.py:168
msgid "Beep left or right when no more older or newer elements are available"
msgstr ""
"Daha eski öğe yoksa soldan, daha yeni öğe yoksa sağdan bip sesi çıkart"

#: speechHistoryExplorer/__init__.py:207
msgid "Speech history items"
msgstr "Konuşma geçmişi öğeleri"

#: speechHistoryExplorer/__init__.py:231
msgid "&Search"
msgstr "&Ara"

#: speechHistoryExplorer/__init__.py:239
msgid "History list"
msgstr "Geçmiş listesi"

#: speechHistoryExplorer/__init__.py:265
msgid "&Copy item"
msgstr "&Öğeyi kopyala"

#: speechHistoryExplorer/__init__.py:281
msgid "Copy &all"
msgstr "&Tümünü kopyala"

#: speechHistoryExplorer/__init__.py:285
msgid "C&lean history"
msgstr "&Geçmişi temizle"

#: speechHistoryExplorer/__init__.py:289
msgid "&Refresh history"
msgstr "Geçmişi &yenile"

#: speechHistoryExplorer/__init__.py:293
msgid "C&lose"
msgstr "&Kapat"
18 changes: 17 additions & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Use the settings panel for the add-on to increase or decrease the maximum number of stored history entries, and decide whether whitespace should be trimmed from the start or end of text.
Use NVDA's Input Gestures dialog to change the supplied keystrokes."""),
# version
"addon_version" : "2022.2-dev",
"addon_version" : "2023.5.2",
# Author(s)
"addon_author" : u"Tyler Spivey, James Scholes, David CM <dhf360@gmail.com>",
# URL for the add-on documentation support
Expand All @@ -35,6 +35,12 @@
"addon_lastTestedNVDAVersion" : "2023.1",
# Add-on update channel (default is stable or None)
"addon_updateChannel" : None,
# Add-on license such as GPL 2
"addon_license": "GPL 2",
# URL for the license document the ad-on is licensed under
"addon_licenseURL": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
# URL for the add-on repository where the source code can be found
"addon_sourceURL": "https://github.com/davidacm/SpeechHistoryExplorer",
}

from os import path
Expand All @@ -49,3 +55,13 @@
# Files that will be ignored when building the nvda-addon file
# Paths are relative to the addon directory, not to the root directory of your addon sources.
excludedFiles = []

# Base language for the NVDA add-on
baseLanguage = "en"

# Markdown extensions for add-on documentation
# Most add-ons do not require additional Markdown extensions.
# If you need to add support for markup such as tables, fill out the below list.
# Extensions string must be of the form "markdown.extensions.extensionName"
# e.g. "markdown.extensions.tables" to add tables.
markdownExtensions = []
Loading

0 comments on commit 3e3a4c8

Please sign in to comment.