Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/betajp' into releasejp
- Loading branch information
Showing
507 changed files
with
503,362 additions
and
245,730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Normalize line endings in t2t files | ||
e6a639bfe237ff7f98c4cbec2094a34ac4b879db |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vs | ||
bin | ||
obj | ||
*.sln |
8 changes: 8 additions & 0 deletions
8
extras/controllerClient/examples/example_csharp/NVAccess.NVDA.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
Oops, something went wrong.