Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/betajp' into releasejp
Browse files Browse the repository at this point in the history
  • Loading branch information
nishimotz committed Apr 2, 2024
2 parents a163063 + c28245f commit e3fcc57
Show file tree
Hide file tree
Showing 507 changed files with 503,362 additions and 245,730 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
@@ -0,0 +1,2 @@
# Normalize line endings in t2t files
e6a639bfe237ff7f98c4cbec2094a34ac4b879db
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -49,7 +49,7 @@
/projectDocs/community/ @nvaccess/userDocs
/projectDocs/testing/ @nvaccess/userDocs @nvaccess/developers
/projectDocs/issues/ @nvaccess/userDocs @nvaccess/developers
readme.md @nvaccess/userDocs @nvaccess/developers
/readme.md @nvaccess/userDocs @nvaccess/developers
security.md @nvaccess/userDocs @nvaccess/developers
CODE_OF_CONDUCT.md @nvaccess/userDocs @nvaccess/developers
.github/CONTRIBUTING.md @nvaccess/userDocs @nvaccess/developers
20 changes: 6 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -19,12 +19,6 @@ See https://github.com/nvaccess/nvda/blob/master/.github/CONTRIBUTING.md.

### Known issues with pull request:

### Change log entries:
New features
Changes
Bug fixes
For Developers

### Code Review Checklist:

<!--
Expand All @@ -38,22 +32,20 @@ A detailed explanation of this checklist is available here:
https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTemplateExplanationAndExamples.md#code-review-checklist
-->

- [ ] Pull Request description:
- description is up to date
- change log entries
- [ ] Testing:
- Unit tests
- System (end to end) tests
- Manual testing
- [ ] API is compatible with existing add-ons.
- [ ] Documentation:
- Change log entry
- User Documentation
- Developer / Technical Documentation
- Context sensitive help for GUI changes
- [ ] Testing:
- Unit tests
- System (end to end) tests
- Manual testing
- [ ] UX of all users considered:
- Speech
- Braille
- Low Vision
- Different web browsers
- Localization in other languages / culture than English
- [ ] API is compatible with existing add-ons.
- [ ] Security precautions taken.
9 changes: 7 additions & 2 deletions .gitignore
Expand Up @@ -2,6 +2,10 @@ source/synthDrivers/jtalk
source/synthDrivers/nvdajp_jtalk.py
*.mo
source/comInterfaces/*.py
!source/comInterfaces/__init__.py
# These are manually generated and updated, so don't delete them
!source/comInterfaces/UIAutomationClient.py
!source/comInterfaces/_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py
*.log
source/userConfig
build
Expand All @@ -27,8 +31,8 @@ dlldata.c
.sconsign.dblite
user_docs/*/*.html
user_docs/*/*.css
user_docs/*/keyCommands.t2t
user_docs/build.t2tConf
# TODO remove when migrating from t2t to md as markdown files will be committed.
user_docs/*/*.md
extras/controllerClient/x86/nvdaController.h
extras/controllerClient/x64
extras/controllerClient/arm64
Expand All @@ -43,6 +47,7 @@ uninstaller/UAC.nsh
tests/unit/nvda.ini
tests/system/settingsCache/*
!tests/system/settingsCache/2020.4/*.txt
source/locale/en/LC_MESSAGES/nvda.po
source/locale/*/cldr.dic
.vscode
.vs
Expand Down
14 changes: 14 additions & 0 deletions .vsconfig
@@ -0,0 +1,14 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset",
"Microsoft.VisualStudio.Component.VC.Llvm.Clang",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64EC",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.ATL.ARM64"
]
}
14 changes: 3 additions & 11 deletions appveyor-jp.yml
@@ -1,4 +1,4 @@
os: Visual Studio 2019
os: Visual Studio 2022
version: "{branch}-{build}"

skip_tags: true
Expand All @@ -11,21 +11,17 @@ branches:
clone_depth: 1

environment:
PY_PYTHON: 3.7-32
PY_PYTHON: 3.11-32

init:
- ps: Set-WinSystemLocale ja-JP
- ps: Start-Sleep -s 10
- ps: Restart-Computer
- ps: Start-Sleep -s 10
- ps: |
$pythonVersion = (py --version)
echo $pythonVersion
- set PATH=%PATH%;C:\MinGW;C:\MinGW\bin;C:\MinGW\msys\1.0

install:
- set RELEASE=1
- set VERSION=2023.3.4jp
- set VERSION=2024.1jp
- set UPDATEVERSIONTYPE=nvdajp
- for /F "usebackq" %%t in (`jptools\nowdate.cmd`) do set NOWDATE=%%t
- ps: |
Expand Down Expand Up @@ -64,10 +60,6 @@ build_script:
- jpchar\tests.cmd

before_test:
- ps: Set-WinSystemLocale en-US
- ps: Start-Sleep -s 10
- ps: Restart-Computer
- ps: Start-Sleep -s 10
- ps: appveyor\scripts\tests\beforeTests.ps1
- ps: appveyor\scripts\installNVDA.ps1

Expand Down
7 changes: 5 additions & 2 deletions appveyor.yml
Expand Up @@ -2,7 +2,7 @@
# Many more options available, see docs:
# https://www.appveyor.com/docs/appveyor-yml/

os: Visual Studio 2019
os: Visual Studio 2022
version: "{branch}-{build}"

branches:
Expand All @@ -20,14 +20,17 @@ init:
"INIT, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append
environment:
PY_PYTHON: 3.7-32
PY_PYTHON: 3.11-32
secure_authenticode_pass:
secure: Way+hJyhbiLG/cmCo4+dHHzS5DiSvk/45o6frnIQ27GBX6nVDsh7jwQ7fSnqxBRP
secure_ssh_pass:
secure: Iql/RhSathGacONacsyr6gis+rjL75UFZ/R+nPAJpo3asAzQSQQd8hfxq0iv8+Th
mozillaSymsAuthToken:
secure: p37Fxo78fsRdmR8v8TPz978QvVaqvbjdIBzFe8ZOpX0FUprm46rkhd374QM1CqMO
symstore: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe
crowdinProjectID: 598017
crowdinAuthToken:
secure: E3084gj4JeMZKvZIOLIhqZefuSo/tj7iYPt4yK0geOI/eQgmPvoXt37Xq0KwvXzvZiJny4AsMj1rKMTVxio8EG8KA0YsYYuy+WV1wpFRIn25zGQS+DZ/yycL75SmTWfr

install:
- ps: |
Expand Down
89 changes: 89 additions & 0 deletions appveyor/crowdinSync.py
@@ -0,0 +1,89 @@
# A part of NonVisual Desktop Access (NVDA)
# based on file from https://github.com/jcsteh/osara
# Copyright (C) 2023-2024 NV Access Limited, James Teh
# This file may be used under the terms of the GNU General Public License, version 2 or later.
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html


import argparse
import os

import requests


AUTH_TOKEN = os.getenv("crowdinAuthToken", "").strip()
if not AUTH_TOKEN:
raise ValueError("crowdinAuthToken environment variable not set")
PROJECT_ID = os.getenv("crowdinProjectID", "").strip()
if not PROJECT_ID:
raise ValueError("crowdinProjectID environment variable not set")


def request(
path: str,
method=requests.get,
headers: dict[str, str] | None = None,
**kwargs
) -> requests.Response:
if headers is None:
headers = {}
headers["Authorization"] = f"Bearer {AUTH_TOKEN}"
r = method(
f"https://api.crowdin.com/api/v2/{path}",
headers=headers,
**kwargs
)
# Convert errors to exceptions, but print the response before raising.
try:
r.raise_for_status()
except requests.exceptions.HTTPError:
print(r.json())
raise
return r


def projectRequest(path: str, **kwargs) -> requests.Response:
return request(f"projects/{PROJECT_ID}/{path}", **kwargs)


def uploadSourceFile(crowdinFileID: int, localFilePath: str) -> None:
fn = os.path.basename(localFilePath)
print(f"Uploading {localFilePath} to Crowdin temporary storage as {fn}")
with open(localFilePath, "rb") as f:
r = request(
"storages",
method=requests.post,
headers={"Crowdin-API-FileName": fn},
data=f
)
storageID = r.json()["data"]["id"]
print(f"Updating file {crowdinFileID} on Crowdin with storage ID {storageID}")
r = projectRequest(
f"files/{crowdinFileID}",
method=requests.put,
json={"storageId": storageID}
)
revisionId = r.json()["data"]["revisionId"]
print(f"Updated to revision {revisionId}")


def main():
parser = argparse.ArgumentParser(
description="Syncs translations with Crowdin."
)
commands = parser.add_subparsers(dest="command", required=True)
uploadCommand = commands.add_parser(
"uploadSourceFile",
help="Upload a source file to Crowdin."
)
uploadCommand.add_argument("crowdinFileID", type=int, help="The Crowdin file ID.")
uploadCommand.add_argument("localFilePath", help="The path to the local file.")
args = parser.parse_args()
if args.command == "uploadSourceFile":
uploadSourceFile(args.crowdinFileID, args.localFilePath)
else:
raise ValueError(f"Unknown command: {args.command}")


if __name__ == "__main__":
main()
6 changes: 6 additions & 0 deletions appveyor/scripts/deployScript.ps1
@@ -1,6 +1,11 @@
$ErrorActionPreference = "Stop";
if (!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:versionType) {
# Not a try build.
if ($env:APPVEYOR_REPO_BRANCH -eq "beta") {
# Upload files to Crowdin for translation
py -m pip install --no-warn-script-location requests
py appveyor\crowdinSync.py uploadSourceFile 2 output\nvda.pot 2>&1
}
# Notify our server.
$exe = Get-ChildItem -Name output\*.exe
$hash = (Get-FileHash "output\$exe" -Algorithm SHA1).Hash.ToLower()
Expand All @@ -27,6 +32,7 @@ if (!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:versionType) {
cat deploy.json | ssh nvaccess@deploy.nvaccess.org nvdaAppveyorHook

# Upload symbols to Mozilla.
py -m pip install --upgrade --no-warn-script-location pip
py -m pip install --no-warn-script-location requests
Try {
py appveyor\mozillaSyms.py
Expand Down
2 changes: 1 addition & 1 deletion appveyor/scripts/tests/unitTests.ps1
@@ -1,6 +1,6 @@
$outDir = (Resolve-Path .\testOutput\unit\)
$unitTestsXml = "$outDir\unitTests.xml"
.\rununittests.bat --with-xunit --xunit-file="$unitTestsXml"
.\rununittests.bat --output-file "$unitTestsXml"
if($LastExitCode -ne 0) {
Set-AppveyorBuildVariable "testFailExitCode" $LastExitCode
Add-AppveyorMessage "FAIL: Unit tests. See test results for more information."
Expand Down
3 changes: 1 addition & 2 deletions appx/sconscript
Expand Up @@ -61,8 +61,7 @@ else: # not for submission, just side-loadable
signExec=env['signExec'] if env['certTimestampServer'] else None

# Files from NVDA's distribution that cannot be included in the appx due to policy or security restrictions
excludedDistFiles=[
'nvda_eoaProxy.exe',
excludedDistFiles = [
'nvda_slave.exe',
'nvda_noUIAccess.exe',
'lib/IAccessible2Proxy.dll',
Expand Down
46 changes: 46 additions & 0 deletions extras/controllerClient/examples/example_c.c
@@ -0,0 +1,46 @@
// Copyright(C) 2006-2023 NV Access Limited, Leonard de Ruijter
// This file is covered by the GNU Lesser General Public License, version 2.1.
// See the file license.txt for more details.

#define UNICODE
#include <windows.h>
#include <stdio.h>
#include "nvdaController.h"

error_status_t __stdcall onMarkReached(const wchar_t* name) {
wprintf(L"Reached SSML mark with name %s\n", name);
return ERROR_SUCCESS;
}

int main(int argc, char *argv[]) {
long res = nvdaController_testIfRunning();
if (res != 0) {
MessageBox(0, L"Error communicating with NVDA", L"Error", 0);
return 1;
}
for (int i = 0; i < 4; i++) {
nvdaController_speakText(L"This is a test speech message");
nvdaController_brailleMessage(L"This is a test braille message");
Sleep(1000);
}
wchar_t* ssml = (
L"<speak>"
L"This is one sentence. "
L"<mark name=\"test\" />"
L"<prosody pitch=\"200%\">This sentence is pronounced with higher pitch.</prosody>"
L"<mark name=\"test2\" />"
L"This is a third sentence. "
L"<mark name=\"test3\" />"
L"This is a fourth sentence. We will stay silent for a second after this one."
L"<break time=\"1000ms\" />"
L"<mark name=\"test4\" />"
L"This is a fifth sentence. "
L"<mark name=\"test5\" />"
L"</speak>"
);
nvdaController_setOnSsmlMarkReachedCallback(&onMarkReached);
nvdaController_speakSsml(ssml, SYMBOL_LEVEL_UNCHANGED, SPEECH_PRIORITY_NORMAL, FALSE);
nvdaController_setOnSsmlMarkReachedCallback(NULL);
nvdaController_brailleMessage(L"Test completed!");
return 0;
}
4 changes: 4 additions & 0 deletions extras/controllerClient/examples/example_csharp/.gitignore
@@ -0,0 +1,4 @@
.vs
bin
obj
*.sln
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

</Project>

0 comments on commit e3fcc57

Please sign in to comment.