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

Qute type-safe messages - default bundle name strategy #2 #31514

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Mar 1, 2023

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

LGTM, minor typo found

@mkouba mkouba force-pushed the qute-default-bundle-name-strategy-02 branch from 28c3b67 to ad802b2 Compare March 1, 2023 15:03
@michalvavrik
Copy link
Member

So AppMessages will default to msg because it is top level class, but index is nested so it will default to Controller_index. To me, it is not intuitive. I also think using lowercase index is not practical as lint rules are not very flexible - how much user will really type it this way. Anyway, user can change it with @MessageBundle#value(), so it's just my opinion.

@mkouba
Copy link
Contributor Author

mkouba commented Mar 1, 2023

So AppMessages will default to msg because it is top level class, but index is nested so it will default to Controller_index. To me, it is not intuitive.

I agree. On the other side, we do a similar thing with @CheckedTemplate already.

I also think using lowercase index is not practical as lint rules are not very flexible - how much user will really type it this way.

We just take the simple name of the message bundle interface as is; i.e. no conversion is performed.

Anyway, user can change it with @MessageBundle#value(), so it's just my opinion.

Exactly.

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

🙈 The PR is closed and the preview is expired.

@quarkus-bot
Copy link

quarkus-bot bot commented Mar 1, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@mkouba mkouba merged commit b701076 into quarkusio:main Mar 2, 2023
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Mar 2, 2023
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