Skip to content

Commit 164ed36

Browse files
authored
Merge pull request #5371 from tverney/localize-messages
refactor(amazonqFeatureDev): add i18n support for messaging from package.nls.json
2 parents 1b1ef53 + 657b3f8 commit 164ed36

File tree

14 files changed

+175
-138
lines changed

14 files changed

+175
-138
lines changed

packages/.vscodeignore.packages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
!types/**
2020
!package.json
2121
!package.nls.json
22+
!package.nls.*.json
2223

2324
!quickStart**
2425
!README.**
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Amazon q /dev: i18n support for messaging"
4+
}

packages/amazonq/scripts/build/copyFiles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ const tasks: CopyTask[] = [
3131
}),
3232

3333
{ target: path.join('../core', 'resources'), destination: path.join('..', 'resources') },
34-
{ target: path.join('../core', 'package.nls.json'), destination: path.join('..', 'package.nls.json') },
34+
{
35+
target: path.join('../core', 'package.nls.json'),
36+
destination: path.join('..', 'package.nls.json'),
37+
},
3538
{ target: 'test/unit/amazonqGumby/resources' },
3639

3740
// Vue

packages/amazonq/test/e2e/amazonq/featureDev.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { verifyTextOrder } from './framework/text'
1010
import { registerAuthHook, using } from 'aws-core-vscode/test'
1111
import { loginToIdC } from './utils/setup'
1212
import { Messenger } from './framework/messenger'
13-
import { FollowUpTypes, examples, newTaskChanges, sessionClosed } from 'aws-core-vscode/amazonqFeatureDev'
13+
import { FollowUpTypes, examples } from 'aws-core-vscode/amazonqFeatureDev'
1414
import { ChatItem } from '@aws/mynah-ui'
1515
import { sleep } from 'aws-core-vscode/shared'
1616

@@ -239,14 +239,14 @@ describe('Amazon Q Feature Dev', function () {
239239

240240
it('clicks new task', async () => {
241241
tab.clickButton(FollowUpTypes.NewTask)
242-
await waitForText(newTaskChanges)
243-
assert.deepStrictEqual(tab.getChatItems().pop()?.body, newTaskChanges)
242+
await waitForText('What change would you like to make?')
243+
assert.deepStrictEqual(tab.getChatItems().pop()?.body, 'What change would you like to make?')
244244
})
245245

246246
it('click close session', async () => {
247247
tab.clickButton(FollowUpTypes.CloseSession)
248-
await waitForText(sessionClosed)
249-
assert.deepStrictEqual(tab.getPlaceholder(), sessionClosed)
248+
await waitForText('Your session is now closed.')
249+
assert.deepStrictEqual(tab.getPlaceholder(), 'Your session is now closed.')
250250
})
251251
}
252252
}

packages/core/package.nls.json

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,56 @@
265265
"AWS.amazonq.learnMore": "Learn More About Amazon Q",
266266
"AWS.amazonq.codewhisperer.title": "Amazon Q",
267267
"AWS.amazonq.toggleCodeSuggestion": "Toggle Auto-Suggestions",
268-
"AWS.amazonq.toggleCodeScan": "Toggle Auto-Scans"
268+
"AWS.amazonq.toggleCodeScan": "Toggle Auto-Scans",
269+
"AWS.amazonq.featureDev.error.conversationIdNotFoundError": "Conversation id must exist before starting code generation",
270+
"AWS.amazonq.featureDev.error.contentLengthError": "The folder you selected is too large for me to use as context. Please choose a smaller folder to work on. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/software-dev.html#quotas\" target=\"_blank\">Amazon Q Developer documentation.</a>",
271+
"AWS.amazonq.featureDev.error.illegalStateTransition": "Illegal transition between states, restart the conversation",
272+
"AWS.amazonq.featureDev.error.prepareRepoFailedError": "Sorry, I ran into an issue while trying to upload your code. Please try again.",
273+
"AWS.amazonq.featureDev.error.promptRefusalException": "I'm sorry, I can't generate code for your request. Please make sure your message and code files comply with the <a href=\"https://aws.amazon.com/machine-learning/responsible-ai/policy/\">AWS Responsible AI Policy.</a>",
274+
"AWS.amazonq.featureDev.error.zipFileError": "The zip file is corrupted",
275+
"AWS.amazonq.featureDev.error.planIterationLimitError": "Sorry, you've reached the quota for number of iterations on an implementation plan. You can generate code for this task or discuss a new plan. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/software-dev.html#quotas\">Amazon Q Developer documentation</a>.",
276+
"AWS.amazonq.featureDev.error.codeIterationLimitError": "Sorry, you've reached the quota for number of iterations on code generation. You can insert this code in your files or discuss a new plan. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/software-dev.html#quotas\" target=\"_blank\">Amazon Q Developer documentation.</a>",
277+
"AWS.amazonq.featureDev.error.tabIdNotFoundError": "I'm sorry, I'm having technical difficulties at the moment. Please try again.",
278+
"AWS.amazonq.featureDev.error.approachPhase.denyListedError": "I'm sorry, I'm having trouble generating a plan. Please try again.",
279+
"AWS.amazonq.featureDev.error.approachPhase.default": "I'm sorry, I ran into an issue while trying to approach the problem. Please try again.",
280+
"AWS.amazonq.featureDev.error.codeGen.denyListedError": "I'm sorry, I'm having trouble generating your code and can't continue at the moment. Please try again later, and share feedback to help me improve.",
281+
"AWS.amazonq.featureDev.error.codeGen.default": "I'm sorry, I ran into an issue while trying to generate your code. Please try again.",
282+
"AWS.amazonq.featureDev.error.codeGen.timeout": "Code generation did not finish within the expected time",
283+
"AWS.amazonq.featureDev.error.workspaceFolderNotFoundError": "I couldn't find a workspace folder. Open a workspace, and then open a new chat tab and enter /dev to start discussing your code task with me.",
284+
"AWS.amazonq.featureDev.error.selectedFolderNotInWorkspaceFolderError": "The folder you chose isn't in your open workspace folder. You can add this folder to your workspace, or choose a folder in your open workspace.",
285+
"AWS.amazonq.featureDev.error.userMessageNotFoundError": "It looks like you didn't provide an input. Please enter your message in the text bar.",
286+
"AWS.amazonq.featureDev.error.monthlyLimitReached": "You've reached the monthly quota for the Amazon Q agent for software development. You can try again next month. For more information on usage limits, see the <a href=\"https://aws.amazon.com/q/developer/pricing/\" target=\"_blank\">Amazon Q Developer pricing page</a>.",
287+
"AWS.amazonq.featureDev.error.technicalDifficulties": "I'm sorry, I'm having technical difficulties and can't continue at the moment. Please try again later, and share feedback to help me improve.",
288+
"AWS.amazonq.featureDev.error.throttling": "I'm sorry, I'm experiencing high demand at the moment and can't generate your code. This attempt won't count toward usage limits. Please try again.",
289+
"AWS.amazonq.featureDev.error.submitFeedback": "'submitFeedback' command was called programmatically, but its not registered.",
290+
"AWS.amazonq.featureDev.error.approachNewTab": "There has been a problem generating an approach. Please open a conversation in a new tab",
291+
"AWS.amazonq.featureDev.pillText.awaitMessage": "This may take a few minutes. I will send a notification when it's complete if you navigate away from this panel, but please keep the tab open.",
292+
"AWS.amazonq.featureDev.pillText.modifyDefaultSourceFolder": "Choose another folder in your workspace",
293+
"AWS.amazonq.featureDev.pillText.newPlan": "Discuss a new plan",
294+
"AWS.amazonq.featureDev.pillText.newTask": "Work on new task",
295+
"AWS.amazonq.featureDev.pillText.generateCode": "Generate code",
296+
"AWS.amazonq.featureDev.pillText.generatingCode": "Generating code ...",
297+
"AWS.amazonq.featureDev.pillText.generatingPlan": "Generating plan ...",
298+
"AWS.amazonq.featureDev.pillText.requestingChanges": "Requesting changes ...",
299+
"AWS.amazonq.featureDev.pillText.insertCode": "Insert code",
300+
"AWS.amazonq.featureDev.pillText.sendFeedback": "Send feedback",
301+
"AWS.amazonq.featureDev.pillText.selectFiles": "Select files for context",
302+
"AWS.amazonq.featureDev.pillText.retry": "Retry",
303+
"AWS.amazonq.featureDev.pillText.reauthenticate": "Follow instructions to re-authenticate ...",
304+
"AWS.amazonq.featureDev.pillText.closeSession": "Close session",
305+
"AWS.amazonq.featureDev.pillText.selectOption": "Select an option above to proceed",
306+
"AWS.amazonq.featureDev.pillText.unableGenerateChanges": "Unable to generate any file changes",
307+
"AWS.amazonq.featureDev.pillText.provideFeedback": "Provide feedback to regenerate",
308+
"AWS.amazonq.featureDev.answer.generateSuggestion": "Would you like to generate a suggestion for this? You’ll review a file diff before inserting into your project.",
309+
"AWS.amazonq.featureDev.answer.howPlanCanBeImproved": "How can this plan be improved?",
310+
"AWS.amazonq.featureDev.answer.qGeneratedCode": "The Amazon Q Developer Agent for software development has generated code for you to review",
311+
"AWS.amazonq.featureDev.answer.howCodeCanBeImproved": "How can the code be improved?",
312+
"AWS.amazonq.featureDev.answer.approachCreation": "Ok, let me create a plan. This may take a few minutes.",
313+
"AWS.amazonq.featureDev.answer.updateCode": "Code has been updated. Would you like to work on another task?",
314+
"AWS.amazonq.featureDev.answer.sessionClosed": "Your session is now closed.",
315+
"AWS.amazonq.featureDev.answer.newTaskChanges": "What change would you like to make?",
316+
"AWS.amazonq.featureDev.placeholder.chatInputDisabled": "Chat input is disabled",
317+
"AWS.amazonq.featureDev.placeholder.additionalImprovements": "Provide input on additional improvements",
318+
"AWS.amazonq.featureDev.placeholder.feedback": "Feedback, comments ...",
319+
"AWS.amazonq.featureDev.placeholder.describe": "Describe your task or issue in as much detail as possible"
269320
}

0 commit comments

Comments
 (0)