Skip to content

Commit 6234be6

Browse files
author
David Hasani
committed
update strings
1 parent 89b3588 commit 6234be6

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ const val DOWNLOAD_PROXY_WILDCARD_ERROR: String = "Dangling meta character '*' n
6767
const val DOWNLOAD_SSL_HANDSHAKE_ERROR: String = "Unable to execute HTTP request: javax.net.ssl.SSLHandshakeException"
6868
const val INVALID_ARTIFACT_ERROR: String = "Invalid artifact"
6969
val patchDescriptions = mapOf(
70-
"Prepare minimal upgrade to Java 17" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks.",
70+
"Prepare minimal upgrade to Java 17" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 17.",
71+
"Prepare minimal upgrade to Java 21" to "This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 21.",
7172
"Popular Enterprise Specifications and Application Frameworks upgrade" to "This diff patch covers the set of upgrades for Jakarta EE 10, Hibernate 6.2, " +
7273
"and Micronaut 3.",
7374
"HTTP Client Utilities, Apache Commons Utilities, and Web Frameworks" to "This diff patch covers the set of upgrades for Apache HTTP Client 5, Apache " +

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ fun buildUserInputSkipTestsFlagChatContent(): CodeTransformChatMessageContent =
323323
formItems = listOf(selectSkipTestsFlagFormItem),
324324
type = CodeTransformChatMessageType.FinalizedAnswer,
325325
)
326-
fun buildUserInputOneOrMultipleDiffsChatIntroContent(): CodeTransformChatMessageContent =
326+
fun buildUserInputOneOrMultipleDiffsChatIntroContent(version: String): CodeTransformChatMessageContent =
327327
CodeTransformChatMessageContent(
328-
message = message("codemodernizer.chat.message.one_or_multiple_diffs"),
328+
message = message("codemodernizer.chat.message.one_or_multiple_diffs", version.substring(4)), // extract "17" / "21" from "JDK_17" / "JDK_21"
329329
type = CodeTransformChatMessageType.FinalizedAnswer,
330330
)
331331
fun buildUserInputOneOrMultipleDiffsFlagChatContent(): CodeTransformChatMessageContent =

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,9 @@ class CodeTransformChatController(
400400
codeModernizerManager.codeTransformationSession?.let {
401401
it.sessionContext.customBuildCommand = customBuildCommand
402402
}
403+
val targetJdkVersion = codeModernizerManager.codeTransformationSession?.sessionContext?.targetJavaVersion?.name ?: ""
403404
codeTransformChatHelper.run {
404-
addNewMessage(buildUserInputOneOrMultipleDiffsChatIntroContent())
405+
addNewMessage(buildUserInputOneOrMultipleDiffsChatIntroContent(targetJdkVersion))
405406
addNewMessage(buildUserInputOneOrMultipleDiffsFlagChatContent())
406407
}
407408
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,8 @@ codemodernizer.chat.message.button.view_diff=View diff
620620
codemodernizer.chat.message.button.view_failure_build_log=View Failure Build Log
621621
codemodernizer.chat.message.button.view_summary=View summary
622622
codemodernizer.chat.message.changes_applied=I applied the changes to your project.
623-
# TODO: update Strings for Java 21 support
624-
codemodernizer.chat.message.choose_objective=I can help you with the following tasks:\n- Upgrade your Java 8 and Java 11 codebases to Java 17, or upgrade Java 17 code with up to date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS.\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion".
623+
# TODO: make sure all Strings work for Java 21
624+
codemodernizer.chat.message.choose_objective=I can help you with the following tasks:\n- Upgrade your Java 8, Java 11, and Java 17 codebases to Java 17 or Java 21.\n- Upgrade Java 17 or Java 21 code with up-to-date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS.\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion".
625625
codemodernizer.chat.message.choose_objective_placeholder=Enter "language upgrade" or "sql conversion"
626626
codemodernizer.chat.message.download_failed_client_instructions_expired=Your transformation is not available anymore. Your code and transformation summary are deleted 24 hours after the transformation completes. Please try starting the transformation again.
627627
codemodernizer.chat.message.download_failed_invalid_artifact=Sorry, I was unable to find your {0}. Artifacts are deleted after 24 hours. Please try starting the transformation again.
@@ -651,7 +651,7 @@ codemodernizer.chat.message.hil.user_rejected=I'll continue upgrading your modul
651651
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.
652652
codemodernizer.chat.message.local_build_failed=Sorry, I couldn't run the Maven clean install command to build your module.
653653
codemodernizer.chat.message.local_build_success=I was able to build your module and will start uploading your code.
654-
codemodernizer.chat.message.one_or_multiple_diffs=If you'd like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:\n\n\ - Minimal Compatible Library Upgrade to Java 17: Dependencies to the minimum compatible versions in Java 17, including Springboot, JUnit, and PowerMockito.\n\n\ - Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.\n\n\ - HTTP Client Utilities Web Frameworks: HTTP client libraries, Apache Commons utilities, and Struts frameworks.\n\n\ - Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper.\n\n\ - Miscellaneous Processing Documentation: Diverse set spanning ORMs, XML processing, and API documentation like Swagger to SpringDoc/OpenAPI.\n\n\ - Deprecated API replacement, dependency upgrades, and formatting: Replaces deprecated APIs, makes additional dependency version upgrades, and formats code changes.
654+
codemodernizer.chat.message.one_or_multiple_diffs=If you would like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:\n\n\ - Minimal Compatible Library Upgrade to Java {0}: Dependencies to the minimum compatible versions in Java {0}, including Springboot, JUnit, and PowerMockito.\n\n\ - Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.\n\n\ - HTTP Client Utilities Web Frameworks: HTTP client libraries, Apache Commons utilities, and Struts frameworks.\n\n\ - Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper.\n\n\ - Miscellaneous Processing Documentation: Diverse set spanning ORMs, XML processing, and API documentation like Swagger to SpringDoc/OpenAPI.\n\n\ - Deprecated API replacement, dependency upgrades, and formatting: Replaces deprecated APIs, makes additional dependency version upgrades, and formats code changes.
655655
codemodernizer.chat.message.one_or_multiple_diffs_form.multiple_diffs=Multiple diffs
656656
codemodernizer.chat.message.one_or_multiple_diffs_form.one_diff=One diff
657657
codemodernizer.chat.message.one_or_multiple_diffs_form.response=Okay, I will create {0} with my proposed changes.
@@ -684,7 +684,7 @@ codemodernizer.chat.message.upload_failed_ssl_error=Sorry, I was unable to uploa
684684
codemodernizer.chat.message.upload_failed_url_expired=Sorry, I couldn't upload your project to begin the transformation. The Amazon S3 pre-signed URL used to upload your code expired after 30 minutes. This might have been caused by delays introduced by intermediate services in your network infrastructure.\n\nCheck your network configuration for services that might be causing delays. If the issue persists, you might need to allow list the following Amazon S3 bucket: 'amazonq-code-transformation-us-east-1-c6160f047e0.s3.amazonaws.com'.
685685
codemodernizer.chat.message.validation.check_eligible_modules=Checking for eligible modules...
686686
codemodernizer.chat.message.validation.check_passed=I can upgrade your Java 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 do not see the module you want to transform, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and language level. In the Modules tab, set the correct module JDK and language level.
687-
codemodernizer.chat.message.validation.error.downgrade_attempt=I cannot transform a module from Java 21 to Java 17.
687+
codemodernizer.chat.message.validation.error.downgrade_attempt=I don't support transforming a module from Java 21 to Java 17.
688688
codemodernizer.chat.message.validation.error.invalid_sct=It looks like the .sct file you provided isn't valid. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS.
689689
codemodernizer.chat.message.validation.error.invalid_source_db=I can only convert SQL for migrations from an Oracle source database. The provided .sct file indicates another source database for this migration.
690690
codemodernizer.chat.message.validation.error.invalid_target_db=I can only convert SQL for migrations to Aurora PostgreSQL or Amazon RDS for PostgreSQL target databases. The provided .sct file indicates another target database for this migration.

0 commit comments

Comments
 (0)