Skip to content

Commit e451517

Browse files
dhasani23David Hasani
and
David Hasani
authored
fix(amazonq): remove single quotes from messages (#4316)
* fix(amazonq): remove single quotes from messages * add changelog entry --------- Co-authored-by: David Hasani <davhasan@amazon.com>
1 parent fc661d6 commit e451517

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Amazon Q Code Transformation: ensure full error message shown in notifications"
4+
}

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
235235
val reason = failureReason ?: message("codemodernizer.notification.info.modernize_failed.unknown_failure_reason") // should not happen
236236
notifyStickyInfo(
237237
message("codemodernizer.notification.info.modernize_failed.title"),
238-
message("codemodernizer.notification.info.modernize_failed.description", reason),
238+
reason,
239239
project,
240240
listOf(displayFeedbackNotificationAction())
241241
)

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerSession.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ class CodeModernizerSession(
318318
val failureReason = result.jobDetails?.reason() ?: message("codemodernizer.notification.warn.unknown_start_failure")
319319
return CodeModernizerJobCompletedResult.JobFailed(jobId, failureReason)
320320
} else if (!passedBuild) {
321-
val failureReason = result.jobDetails?.reason() ?: message("codemodernizer.notification.warn.unknown_build_failure")
321+
val failureReason = result.jobDetails?.reason() ?: message("codemodernizer.notification.warn.maven_failed.content")
322322
return CodeModernizerJobCompletedResult.JobFailedInitialBuild(jobId, failureReason)
323323
} else {
324324
val failureReason = result.jobDetails?.reason() ?: message("codemodernizer.notification.warn.unknown_status_response")

plugins/toolkit/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@ codemodernizer.chat.message.button.view_summary=View summary
541541
codemodernizer.chat.message.error_request=Request failed
542542
codemodernizer.chat.message.follow_up.new_transformation=Start a new transformation
543543
codemodernizer.chat.message.local_build_begin=I'm building your module. This can take up to 10 minutes, depending on the size of your module.
544-
codemodernizer.chat.message.local_build_failed=Sorry, I couldn't run the Maven clean install command to build your module.
544+
codemodernizer.chat.message.local_build_failed=Sorry, I could not run the Maven clean install command to build your module.
545545
codemodernizer.chat.message.local_build_success=I was able to build your project and will start transforming your code soon.
546-
codemodernizer.chat.message.result.fail=Sorry, I couldn't complete the transformation. Try starting the transformation again.
546+
codemodernizer.chat.message.result.fail=Sorry, I could not complete the transformation. Try starting the transformation again.
547547
codemodernizer.chat.message.result.partially_success=I upgraded part of your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
548548
codemodernizer.chat.message.result.success=I successfully upgraded your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated.
549549
codemodernizer.chat.message.result.zip_too_large=Sorry, your project size exceeds the Amazon Q Code Transformation upload limit of 1GB.
@@ -555,9 +555,9 @@ codemodernizer.chat.message.transform_stopping=I'm stopping your transformation.
555555
codemodernizer.chat.message.validation.check_eligible_projects=I'm checking for open projects that are eligible for Code Transformation.
556556
codemodernizer.chat.message.validation.check_passed=I can upgrade your Java {0} module. To start the transformation, I need some information from you. Choose the module you want to upgrade and the target code version to upgrade to. Then, choose **Confirm**.\n\nIf you don't see the module you want to transform, you might need to configure your project so I can find it. Go to **File** and then **Project Structure** and make sure the correct JDK is selected in the SDK field.
557557
codemodernizer.chat.message.validation.error.more_info=For more information, see the [Amazon Q documentation]({0}).
558-
codemodernizer.chat.message.validation.error.no_pom=Sorry, I couldn't find a module that I can upgrade. I couldn't find a pom.xml file in any of your open projects. Currently, I can only upgrade Java 8 or Java 11 projects built on Maven.
559-
codemodernizer.chat.message.validation.error.other=Sorry, I couldn't find a module that I can upgrade. Currently, I can only upgrade Java 8 or Java 11 projects built on Maven.
560-
codemodernizer.chat.message.validation.error.unsupported_java_version=Sorry, I couldn't find a module that I can upgrade. Currently, I can only upgrade Java 8 or Java 11 modules built on Maven. If you have a Java 8 or Java 11 module in your workspace, you might need to configure your project so I can find it. Go to **File** and then **Project Structure** and make sure the correct JDK is selected in the SDK field.
558+
codemodernizer.chat.message.validation.error.no_pom=Sorry, I could not find a module that I can upgrade. I could not find a pom.xml file in any of your open projects. Currently, I can only upgrade Java 8 or Java 11 projects built on Maven.
559+
codemodernizer.chat.message.validation.error.other=Sorry, I could not find a module that I can upgrade. Currently, I can only upgrade Java 8 or Java 11 projects built on Maven.
560+
codemodernizer.chat.message.validation.error.unsupported_java_version=Sorry, I could not find a module that I can upgrade. Currently, I can only upgrade Java 8 or Java 11 modules built on Maven. If you have a Java 8 or Java 11 module in your workspace, you might need to configure your project so I can find it. Go to **File** and then **Project Structure** and make sure the correct JDK is selected in the SDK field.
561561
codemodernizer.chat.prompt.label.module=Module
562562
codemodernizer.chat.prompt.label.target_version=Target JDK version
563563
codemodernizer.chat.prompt.stop_transform=Stop transformation
@@ -590,43 +590,40 @@ codemodernizer.notification.info.modernize_complete.content=Amazon Q upgraded yo
590590
codemodernizer.notification.info.modernize_complete.title=Transform Complete
591591
codemodernizer.notification.info.modernize_complete.view_diff=View diff
592592
codemodernizer.notification.info.modernize_complete.view_summary=View transformation summary
593-
codemodernizer.notification.info.modernize_failed.connection_failed=Amazon Q couldn't complete the transformation. Try starting the transformation again. \n {0}
594-
codemodernizer.notification.info.modernize_failed.description=Amazon Q couldn't complete the transformation. Try starting the transformation again. \n {0}
593+
codemodernizer.notification.info.modernize_failed.connection_failed=Amazon Q could not complete the transformation. Try starting the transformation again. {0}
595594
codemodernizer.notification.info.modernize_failed.title=Transformation failed
596-
codemodernizer.notification.info.modernize_failed.unknown_failure_reason=unknown reason
595+
codemodernizer.notification.info.modernize_failed.unknown_failure_reason=Unknown failure reason
597596
codemodernizer.notification.info.modernize_ongoing.view_status=View status
598597
codemodernizer.notification.info.modernize_partial_complete.content=Amazon Q upgraded part of your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
599598
codemodernizer.notification.info.modernize_partial_complete.title=Transformation partially successful!
600599
codemodernizer.notification.info.transformation_resume.content=Amazon Q was unable to resume polling for the job you started before closing the project.
601600
codemodernizer.notification.info.transformation_resume.title=Unable to resume polling for job updates.
602-
codemodernizer.notification.info.transformation_start_stopping.as_no_response=Amazon Q couldn't stop the transformation.
601+
codemodernizer.notification.info.transformation_start_stopping.as_no_response=Amazon Q could not stop the transformation.
603602
codemodernizer.notification.info.transformation_start_stopping.content=Amazon Q is stopping your transformation. This might take a few seconds.
604-
codemodernizer.notification.info.transformation_start_stopping.failed_content=Amazon Q couldn't stop the transformation.
603+
codemodernizer.notification.info.transformation_start_stopping.failed_content=Amazon Q could not stop the transformation.
605604
codemodernizer.notification.info.transformation_start_stopping.failed_title=Error stopping transformation
606605
codemodernizer.notification.info.transformation_start_stopping.title=Transformation stopping
607606
codemodernizer.notification.info.transformation_stop.content=You cancelled the transformation. To start a new transformation, return to the Q - Transform chat tab.
608607
codemodernizer.notification.info.transformation_stop.title=Transformation cancelled
609608
codemodernizer.notification.info.view_troubleshooting_guide=View troubleshooting guide
610609
codemodernizer.notification.warn.invalid_project.description.reason.invalid_jdk_versions=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
611610
codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
612-
codemodernizer.notification.warn.invalid_project.description.reason.no_valid_files=None of your open modules are supported by Amazon Q Code Transformation. Amazon Q couldn't find a pom.xml file in any of your open modules. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
611+
codemodernizer.notification.warn.invalid_project.description.reason.no_valid_files=None of your open modules are supported by Amazon Q Code Transformation. Amazon Q could not find a pom.xml file in any of your open modules. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
613612
codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in=Amazon Q cannot start the transformation as you are not logged in with Identity Center or Builder ID. Also ensure that you are not using IntelliJ version 232.8660.185 and that you are not developing on a remote host (uncommon).
614613
codemodernizer.notification.warn.invalid_project.description.reason.remote_backend=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven, and cannot upgrade projects running on a remote host.
615-
codemodernizer.notification.warn.invalid_project.description.reason.unknown=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
616-
codemodernizer.notification.warn.maven_failed.content=Amazon Q couldn't run the Maven clean install command to build your module.
614+
codemodernizer.notification.warn.maven_failed.content=Amazon Q could not run the Maven clean install command to build your module.
617615
codemodernizer.notification.warn.maven_failed.title=Amazon Q Code Transform unable to zip dependencies
618616
codemodernizer.notification.warn.on_resume.unknown_status_response.content=We received data from Amazon Q in a format that the plugin cannot handle. You may need to update the plugin and then try again.
619617
codemodernizer.notification.warn.on_resume.unknown_status_response.title=Unable to resume job
620618
codemodernizer.notification.warn.submit_feedback=Submit feedback
621-
codemodernizer.notification.warn.unable_to_start_job=Amazon Q couldn't begin the transformation. Try starting the transformation again.
622-
codemodernizer.notification.warn.unknown_build_failure=Your application failed to build due to an unknown error.
623-
codemodernizer.notification.warn.unknown_start_failure=Your application failed to start due to an unknown error.
624-
codemodernizer.notification.warn.unknown_status_response=We received data from Amazon Q in a format that the plugin cannot handle. You may need to update the plugin and then try again.
625-
codemodernizer.notification.warn.view_diff_failed.content=Amazon Q couldn't download and parse the diff with your upgraded code. Try downloading it again.
619+
codemodernizer.notification.warn.unable_to_start_job=Amazon Q could not begin the transformation. Try starting the transformation again. {0}
620+
codemodernizer.notification.warn.unknown_start_failure=Amazon Q could not begin the transformation. Try starting the transformation again.
621+
codemodernizer.notification.warn.unknown_status_response=Amazon Q could not complete the transformation. Try starting the transformation again.
622+
codemodernizer.notification.warn.view_diff_failed.content=Amazon Q could not download and parse the diff with your upgraded code. Try downloading it again.
626623
codemodernizer.notification.warn.view_diff_failed.title=Failed to download and parse diff
627624
codemodernizer.notification.warn.view_summary_failed.content=Unable to display the transformation summary due to an error.
628625
codemodernizer.notification.warn.view_summary_failed.title=Unable to display transformation summary
629-
codemodernizer.notification.warn.zip_creation_failed=we were unable to zip the selected module as {0}.
626+
codemodernizer.notification.warn.zip_creation_failed=Amazon Q could not zip the selected module and begin the transformation. Try starting the transformation again. {0}
630627
codemodernizer.notification.warn.zip_creation_failed.reasons.unknown=An unexpected error occurred
631628
codemodernizer.notification.warn.zip_too_large.content=Sorry, your project size exceeds the Amazon Q Code Transformation upload limit of 1GB.
632629
codemodernizer.notification.warn.zip_too_large.title=Project size exceeds 1GB limit

0 commit comments

Comments
 (0)