Skip to content

Commit

Permalink
docs: Update package.nls.json (#11541)
Browse files Browse the repository at this point in the history
* docs: Update package.nls.json

* Update create.test.ts

* Update create.test.ts

* Update update.test.ts

* Update update.test.ts

* Update create.test.ts
  • Loading branch information
supkasar authored Jul 9, 2024
1 parent 2562a66 commit 817c93c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
26 changes: 13 additions & 13 deletions packages/fx-core/resource/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -753,33 +753,33 @@
"error.common.ReadFileError": "Unable to read file for reason: %s",
"error.common.UnhandledError": "An unexpected error has occurred while performing the %s task. %s",
"error.common.WriteFileError": "Unable to write file for reason: %s",
"error.common.FilePermissionError": "File operation is not permitted, ensure that you have the necessary permissions: %s",
"error.common.FilePermissionError": "File operation is not permitted, make sure you have the necessary permissions: %s",
"error.common.MissingRequiredInputError": "Missing required input: %s",
"error.common.InputValidationError": "Input '%s' validation failed: %s",
"error.common.InputValidationError": "Input '%s' validation unsuccessful: %s",
"error.common.NoEnvFilesError": "Unable to find .env files.",
"error.common.MissingRequiredFileError": "Missing %srequired file `%s`",
"error.common.HttpClientError": "A http client error happened while performing the %s task. The error response is: %s",
"error.common.HttpServerError": "A http server error happened while performing the %s task. Please try again later. The error response is: %s",
"error.common.HttpClientError": "A http client error occurred while performing the %s task. The error response is: %s",
"error.common.HttpServerError": "A http server error occurred while performing the %s task. Try again later. The error response is: %s",
"error.common.AccessGithubError": "Access GitHub (%s) Error: %s",
"error.common.ConcurrentError": "Previous task is still running. Wait until your previous task is finished and try again.",
"error.common.NetworkError": "Network error: %s",
"error.common.NetworkError.EAI_AGAIN": "DNS cannot resolve domain %s.",
"error.upgrade.NoNeedUpgrade": "This project is already the latest, no need to upgrade.",
"error.collaboration.InvalidManifestError": "Unable to process your manifest file ('%s') due to the absence of the 'id' key. To identify your application correctly, please make sure that the 'id' key is present in the manifest file.",
"error.upgrade.NoNeedUpgrade": "This is the latest project, upgrade not required.",
"error.collaboration.InvalidManifestError": "Unable to process your manifest file ('%s') due to absence of the 'id' key. To identify your app correctly, make sure the 'id' key is present in the manifest file.",
"error.collaboration.FailedToLoadManifest": "Unable to load manifest file. Reason: %s.",
"error.azure.InvalidAzureCredentialError": "Unable to obtain your Azure credentials. Ensure that your Azure account is properly authenticated and try again.",
"error.azure.InvalidAzureSubscriptionError": "The Azure subscription '%s' is not available in your current account. Ensure that you have signed in with the correct Azure account and that you have the necessary permissions to access the subscription.",
"error.azure.ResourceGroupConflictError": "Resource group '%s' already exists in subscription '%s'. Consider choosing a different name or using the existing resource group for your task.",
"error.azure.InvalidAzureCredentialError": "Unable to obtain your Azure credentials. Make sure your Azure account is properly authenticated and try again.",
"error.azure.InvalidAzureSubscriptionError": "Azure subscription '%s' is not available in your current account. Make sure you've signed in with the correct Azure account and have necessary permissions to access the subscription.",
"error.azure.ResourceGroupConflictError": "Resource group '%s' already exists in subscription '%s'. Choose a different name or use the existing resource group for your task.",
"error.azure.SelectSubscriptionError": "Unable to select subscription in current account.",
"error.azure.ResourceGroupNotExistError": "The resource group '%s' cannot be found in subscription '%s'.",
"error.azure.ResourceGroupNotExistError": "Unable to find the resource group '%s' in subscription '%s'.",
"error.azure.CreateResourceGroupError": "Unable to create resource group '%s' in subscription '%s'due to error: %s. \nIf the error message specifies the reason, fix the error and try again.",
"error.azure.CheckResourceGroupExistenceError": "Unable to check existence of resource group '%s' in subscription '%s'due to error: %s. \nIf the error message specifies the reason, fix the error and try again.",
"error.azure.ListResourceGroupsError": "Unable to get resource groups in subscription '%s'due to error: %s. \nIf the error message specifies the reason, fix the error and try again.",
"error.azure.GetResourceGroupError": "Unable to get information of resource group '%s' in subscription '%s'due to error: %s. \nIf the error message specifies the reason, fix the error and try again.",
"error.azure.ListResourceGroupLocationsError": "Unable to get available resource group locations for subscription '%s'.",
"error.m365.M365TokenJSONNotFoundError": "Unable to obtain JSON object for Microsoft 365 token. Ensure that your account is authorized to access the tenant and that the token JSON object is valid.",
"error.m365.M365TenantIdNotFoundInTokenError": "Unable to obtain Microsoft 365 tenant ID in token JSON object. Ensure that your account is authorized to access the tenant and that the token JSON object is valid.",
"error.m365.M365TenantIdNotMatchError": "Authentication failed. You are currently signed in to Microsoft 365 tenant '%s', which is different from the one specified in the .env file (TEAMS_APP_TENANT_ID='%s'). To resolve this issue and switch to your current signed-in tenant, please remove the values of '%s' from the .env file and try again.",
"error.m365.M365TokenJSONNotFoundError": "Unable to obtain JSON object for Microsoft 365 token. Make sure your account is authorized to access the tenant and the token JSON object is valid.",
"error.m365.M365TenantIdNotFoundInTokenError": "Unable to obtain Microsoft 365 tenant ID in token JSON object. Make sure your account is authorized to access the tenant and the token JSON object is valid.",
"error.m365.M365TenantIdNotMatchError": "Authentication unsuccessful. You're currently signed in to Microsoft 365 tenant '%s', which is different from the one specified in the .env file (TEAMS_APP_TENANT_ID='%s'). To resolve this issue and switch to your current signed-in tenant, remove the values of '%s' from the .env file and try again.",
"error.arm.CompileBicepError": "Unable to compile Bicep files located in path '%s' to JSON ARM templates. The error message returned was: %s. Check the Bicep files for any syntax or configuration errors and try again.",
"error.arm.DownloadBicepCliError": "Unable to download Bicep cli from '%s'. The error message was: %s. Fix the error and try again. Or remove the bicepCliVersion config in the config file teamsapp.yml and Teams Toolkit will use bicep CLI in PATH",
"error.arm.DeployArmError.Notification": "The ARM templates for deployment name: '%s' couldn't be deployed in resource group '%s'. Refer to the [Output panel](command:fx-extension.showOutputChannel) for more details.",
Expand Down
7 changes: 5 additions & 2 deletions packages/fx-core/tests/component/driver/aad/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ describe("aadAppCreate", async () => {
.is.instanceOf(HttpClientError)
.and.has.property("message")
.and.equals(
'A http client error happened while performing the aadApp/create task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
'A http client error occurred while performing the aadApp/create task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
);
});

Expand Down Expand Up @@ -434,7 +434,7 @@ describe("aadAppCreate", async () => {
.is.instanceOf(HttpServerError)
.and.has.property("message")
.and.equals(
'A http server error happened while performing the aadApp/create task. Please try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
'A http server error occurred while performing the aadApp/create task. Try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
);
});

Expand Down Expand Up @@ -597,6 +597,9 @@ describe("aadAppCreate", async () => {
expect(endTelemetry.properties.success).to.equal("no");
expect(endTelemetry.properties["error-code"]).to.equal("aadAppCreate.HttpClientError");
expect(endTelemetry.properties["error-type"]).to.equal("user");
// expect(endTelemetry.properties["error-message"]).to.equal(
// 'A http client error occurred while performing the aadApp/create task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
// );
});

it("should send telemetries with error stack", async () => {
Expand Down
7 changes: 5 additions & 2 deletions packages/fx-core/tests/component/driver/aad/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ describe("aadAppUpdate", async () => {
.is.instanceOf(HttpClientError)
.and.property("message")
.equals(
'A http client error happened while performing the aadApp/update task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
'A http client error occurred while performing the aadApp/update task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
);
});

Expand Down Expand Up @@ -475,7 +475,7 @@ describe("aadAppUpdate", async () => {
.is.instanceOf(HttpServerError)
.and.property("message")
.equals(
'A http server error happened while performing the aadApp/update task. Please try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
'A http server error occurred while performing the aadApp/update task. Try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
);
});

Expand Down Expand Up @@ -619,6 +619,9 @@ describe("aadAppUpdate", async () => {
expect(endTelemetry.properties.success).to.equal("no");
expect(endTelemetry.properties["error-code"]).to.equal("aadAppUpdate.HttpServerError");
expect(endTelemetry.properties["error-type"]).to.equal("system");
// expect(endTelemetry.properties["error-message"]).to.equal(
// 'A http server error occurred while performing the aadApp/update task. Try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
// );
});

it("should throw error when missing required environment variable in manifest", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe("botAadAppCreate", async () => {
).to.be.rejected.then((error) => {
expect(error instanceof HttpClientError).to.be.true;
expect(error.message).contains(
'A http client error happened while performing the botAadApp/create task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
'A http client error occurred while performing the botAadApp/create task. The error response is: {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}'
);
});
});
Expand Down Expand Up @@ -201,7 +201,7 @@ describe("botAadAppCreate", async () => {
).to.be.rejected.then((error) => {
expect(error instanceof HttpServerError).to.be.true;
expect(error.message).equals(
'A http server error happened while performing the botAadApp/create task. Please try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
'A http server error occurred while performing the botAadApp/create task. Try again later. The error response is: {"error":{"code":"InternalServerError","message":"Internal server error"}}'
);
});
});
Expand Down

0 comments on commit 817c93c

Please sign in to comment.