Skip to content

Commit 657b3f8

Browse files
committed
refactor(amazonqFeatureDev): include more messages in nls package
1 parent e0dfd3b commit 657b3f8

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

packages/core/package.nls.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,21 +288,26 @@
288288
"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.",
289289
"AWS.amazonq.featureDev.error.submitFeedback": "'submitFeedback' command was called programmatically, but its not registered.",
290290
"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.",
291292
"AWS.amazonq.featureDev.pillText.modifyDefaultSourceFolder": "Choose another folder in your workspace",
292293
"AWS.amazonq.featureDev.pillText.newPlan": "Discuss a new plan",
293294
"AWS.amazonq.featureDev.pillText.newTask": "Work on new task",
294295
"AWS.amazonq.featureDev.pillText.generateCode": "Generate code",
295296
"AWS.amazonq.featureDev.pillText.generatingCode": "Generating code ...",
296297
"AWS.amazonq.featureDev.pillText.generatingPlan": "Generating plan ...",
298+
"AWS.amazonq.featureDev.pillText.requestingChanges": "Requesting changes ...",
297299
"AWS.amazonq.featureDev.pillText.insertCode": "Insert code",
298300
"AWS.amazonq.featureDev.pillText.sendFeedback": "Send feedback",
299301
"AWS.amazonq.featureDev.pillText.selectFiles": "Select files for context",
300302
"AWS.amazonq.featureDev.pillText.retry": "Retry",
301303
"AWS.amazonq.featureDev.pillText.reauthenticate": "Follow instructions to re-authenticate ...",
302304
"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",
303307
"AWS.amazonq.featureDev.pillText.provideFeedback": "Provide feedback to regenerate",
304308
"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.",
305309
"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",
306311
"AWS.amazonq.featureDev.answer.howCodeCanBeImproved": "How can the code be improved?",
307312
"AWS.amazonq.featureDev.answer.approachCreation": "Ok, let me create a plan. This may take a few minutes.",
308313
"AWS.amazonq.featureDev.answer.updateCode": "Code has been updated. Would you like to work on another task?",

packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -422,25 +422,21 @@ export class FeatureDevController {
422422
getLogger().info(logWithConversationId(session.conversationId))
423423

424424
// lock the UI/show loading bubbles
425-
this.messenger.sendAsyncEventProgress(
426-
tabID,
427-
true,
428-
`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.`
429-
)
425+
this.messenger.sendAsyncEventProgress(tabID, true, i18n('AWS.amazonq.featureDev.pillText.awaitMessage'))
430426

431427
try {
432428
this.messenger.sendAnswer({
433-
message: 'Requesting changes ...',
429+
message: i18n('AWS.amazonq.featureDev.pillText.requestingChanges'),
434430
type: 'answer-stream',
435431
tabID,
436432
})
437-
this.messenger.sendUpdatePlaceholder(tabID, 'Generating code ...')
433+
this.messenger.sendUpdatePlaceholder(tabID, i18n('AWS.amazonq.featureDev.pillText.generatingCode'))
438434
await session.send(message)
439435
const filePaths = session.state.filePaths ?? []
440436
const deletedFiles = session.state.deletedFiles ?? []
441437
if (filePaths.length === 0 && deletedFiles.length === 0) {
442438
this.messenger.sendAnswer({
443-
message: 'Unable to generate any file changes',
439+
message: i18n('AWS.amazonq.featureDev.pillText.unableGenerateChanges'),
444440
type: 'answer',
445441
tabID: tabID,
446442
})
@@ -451,7 +447,7 @@ export class FeatureDevController {
451447
this.retriesRemaining(session) > 0
452448
? [
453449
{
454-
pillText: 'Retry',
450+
pillText: i18n('AWS.amazonq.featureDev.pillText.retry'),
455451
type: FollowUpTypes.Retry,
456452
status: 'warning',
457453
},
@@ -493,7 +489,7 @@ export class FeatureDevController {
493489
followUps: this.getFollowUpOptions(session?.state.phase),
494490
tabID: tabID,
495491
})
496-
this.messenger.sendUpdatePlaceholder(tabID, 'Select an option above to proceed')
492+
this.messenger.sendUpdatePlaceholder(tabID, i18n('AWS.amazonq.featureDev.pillText.selectOption'))
497493
} finally {
498494
// Finish processing the event
499495
this.messenger.sendAsyncEventProgress(tabID, false, undefined)
@@ -504,7 +500,7 @@ export class FeatureDevController {
504500
if (!this.isAmazonQVisible) {
505501
const open = 'Open chat'
506502
const resp = await vscode.window.showInformationMessage(
507-
'The Amazon Q Developer Agent for software development has generated code for you to review',
503+
i18n('AWS.amazonq.featureDev.answer.qGeneratedCode'),
508504
open
509505
)
510506
if (resp === open) {

0 commit comments

Comments
 (0)