-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Added LangUtils support. #1693
Added LangUtils support. #1693
Conversation
Update upstream.
# Conflicts: # src/main/resources/plugin.yml
Interesting. I tried this a while ago with #1549 but it never got finished. I assume other parts of the code can use this for translations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we need both repositories?
What is the difference
Also, I am not a keen fan of reflection. Isn't there a way how to access plugin directly without reflection? |
Because I was in China, there was a high delay in visiting GitHub, so I used another domestic VCS repositorie, but it seems that there was also a high delay in visiting gitee from abroad...... |
@BONNe Do you think this is ok to merge? |
I do not see obvious issues with it. However, someone will need to take care of explaining this:
If there are different LanguageHelper plugins, we could run into issues when people used incorrect one and complain why they do not work. |
Ahhhh, I accidentally clicked to close! ! ! |
Sorry, my English is very bad. This is because I have seen other plug-ins called "LangUtils" elsewhere, but their functions are completely different! Therefore, a judgment to determine whether the "class" exists is added. |
Hmm, now I am more confused than previously. The code you added means that there is a lot of LangUtils plugins that comes from |
What I mean is that the name of some plugins in Plugin.yml is "LangUtils". Yes it is. . . . You are right to say that, the original author of LangUtils, LangUtils of the Nyaacat community, are all from com.meowj.langutils.lang. |
We'll need to list at least one that we are compatible with in the docs. I assume the root one is this one? https://github.com/NyaaCat/LanguageUtils Can you provide other links? |
Please do not include https://github.com/NyaaCat/LanguageUtils in the document because it is not compatible with BentoBox. Currently only https://github.com/apachezy/LangUtils is fully compatible with BentoBox, because it implements more game object name translation. |
@@ -82,6 +82,8 @@ private void openPanel(User user, String ivPanelName) { | |||
|
|||
private PanelItem getPanelItem(DamageCause c, User user) { | |||
PanelItemBuilder pib = new PanelItemBuilder(); | |||
// todo: Please consider adding translation fields for each entry | |||
// of "DamageCause" in the language file in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made #1705
I'm good with this. If @BONNe is good, then we merge. |
Yes, I am good with it |
I added a hook to BentoBox to support LangUtils. If I have any problems with my work, please correct me.
LangUtils can be used to localize the names of items, entities, enchants, etc.
Since the original author and NyaaCat Community are not actively updating, I'm reconstructing LangUtils.
My LangUtils project address is:
https://github.com/apachezy/LangUtils