Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert messages to nls format #419

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Conversation

awisniew90
Copy link
Contributor

No description provided.

Copy link
Member

@scottkurz scottkurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see why we ended up "repeating ourselves" in the case where we issue a Trace and then basically the same error message.

In some cases we might end up using a much shorter trace msg with no worries about being in common.

Just curious, if you wanted to do grab the message in English and trace it, is there an easy way to do that with the NLS API? Or would you end up having to go load the properties file "manually" (with File read APIs) ? Just curious.

It seems a shame to have the redundancy but if we end up "breaking the link" it wouldn't look as bad.

@@ -29,6 +29,7 @@ Import-Package: org.eclipse.core.commands,
org.eclipse.jdt.launching,
org.eclipse.jem.util.emf.workbench,
org.eclipse.osgi.service.debug,
org.eclipse.osgi.util;version="1.1.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we'd want to avoid tying to a specific version unless there's a special need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this stackoverflow answer, it doesnt look like we'd be able to lookup messages outside the current locale.
https://stackoverflow.com/questions/21334606/using-eclipse-externalized-strings-how-to-get-a-string-in-language-xyz

I think moving forward we'd be less aligned with the messages printed in trace and the user facing messages (tracing being less formal or shorter, like you said).

@awisniew90
Copy link
Contributor Author

@dmuelle - Last time you had reviewed these messages, we did not have them consolidated in an nls props file. This PR does that, and we found a few messages that we had missed in the last ID review. Specifically, the last 7 messages here (line 78 and on): https://github.com/OpenLiberty/liberty-tools-eclipse/pull/419/files#diff-bc509bee7031fd55ada2ddb5421c7c609abbb0b4f8ccac213f15dfad7ed9c4a8

Would you be able to review those final 7 as well?

Copy link
Member

@dmuelle dmuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID review- lmk if you have any questions. Thanks!

# NLS_MESSAGEFORMAT_VAR

# DebugModeHandler
multiple_server_env=More than one server.env file was found for project {0}. Unable to determine which server.env file to use.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
multiple_server_env=More than one server.env file was found for project {0}. Unable to determine which server.env file to use.
multiple_server_env=More than one server.env file was found for the {0} project. Unable to determine which server.env file to use.


# DevModeOperations
start_no_project_found=An error was detected when the start request was processed. The object that represents the selected project was not found.
start_already_issued=The start request was already issued on project {0}. Use the stop action before you select the start action.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
start_already_issued=The start request was already issued on project {0}. Use the stop action before you select the start action.
start_already_issued=The start request was already issued on the {0} project. Use the stop action before you select the start action.

# DevModeOperations
start_no_project_found=An error was detected when the start request was processed. The object that represents the selected project was not found.
start_already_issued=The start request was already issued on project {0}. Use the stop action before you select the start action.
start_general_error=An error was detected during the start request on project {0}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
start_general_error=An error was detected during the start request on project {0}.
start_general_error=An error was detected during the start request on the {0} project.

start_general_error=An error was detected during the start request on project {0}.

start_container_no_project_found=An error was detected when the start in container request was processed. The object that represents the selected project was not found.
start_container_already_issued=The start in container request was already issued on project {0}. Use the stop action before you select the start action.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
start_container_already_issued=The start in container request was already issued on project {0}. Use the stop action before you select the start action.
start_container_already_issued=The start in container request was already issued on the {0} project. Use the stop action before you select the start action.


start_container_no_project_found=An error was detected when the start in container request was processed. The object that represents the selected project was not found.
start_container_already_issued=The start in container request was already issued on project {0}. Use the stop action before you select the start action.
start_container_general_error=An error was detected during the start in container request on project {0}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
start_container_general_error=An error was detected during the start in container request on project {0}.
start_container_general_error=An error was detected during the start in container request on the {0} project.

java_resolution_error=Unable to resolve the Java installation path by using configuration {0}. Using the workspace Java installation.

# LaunchConfigurationDelegateLauncher
launch_config_error=An error was detected when configuration was launched {0}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is {0} here? the error or the config?

# ExplorerMenuHandler
project_not_valid=The project is not valid. Be sure to select a project first.
menu_command_retrieve_error=Unable to retrieve menu command.
menu_command_process_error=Unable to process menu command {0} on project {1}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
menu_command_process_error=Unable to process menu command {0} on project {1}.
menu_command_process_error=Unable to process menu the {0} command on the {1} project.

menu_command_process_error=Unable to process menu command {0} on project {1}.

# CommandBuilder
maven_exec_not_found=Could not find Maven executable or wrapper.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what Could not find Maven executable or wrapper? Add a subject to the sentence if possible

gradle_exec_not_found=Could not find Gradle executable or wrapper.

# Project
determine_java_project_error=Unable to determine if project {0} is a Java project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
determine_java_project_error=Unable to determine if project {0} is a Java project.
determine_java_project_error=Unable to determine if the {0} project is a Java project.


# Project
determine_java_project_error=Unable to determine if project {0} is a Java project.
liberty_nature_add_error=Error querying and adding Liberty nature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
liberty_nature_add_error=Error querying and adding Liberty nature.
liberty_nature_add_error=An error occurred with querying and adding the Liberty nature.

@awisniew90
Copy link
Contributor Author

Thanks @dmuelle - changed made and ready for re-review 👍

Copy link
Member

@dmuelle dmuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few more minor edits

Signed-off-by: Adam Wisniewski <[email protected]>
@awisniew90
Copy link
Contributor Author

@dmuelle - all good now 👍

Copy link
Member

@dmuelle dmuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@scottkurz scottkurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scottkurz scottkurz merged commit f531671 into OpenLiberty:main Jul 26, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants