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

Translate help strings #293

Closed
ghost opened this issue Dec 1, 2015 · 12 comments
Closed

Translate help strings #293

ghost opened this issue Dec 1, 2015 · 12 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Dec 1, 2015

I want to change all AUTHMERELOADED help.
Because I come from China...
I can help you translate.
thank
Like this.
/authme help [query] : View help
/authme help [查询] : 查看帮助
/authme register : Register a player
/authme register <玩家> <密码> : 注册一个玩家
/authme unregister : Unregister a player
/authme unregister <玩家> : 反注册一个玩家

@sgdc3
Copy link
Member

sgdc3 commented Dec 1, 2015

Ah! Sorry I misunderstood your request ;)

@ghost
Copy link
Author

ghost commented Dec 1, 2015

It's nothing.But i not need it immediately.This can come slowly

@Xephi
Copy link
Contributor

Xephi commented Dec 2, 2015

It will be added into translation message in the future, it's a new feature imported from an another project that doesn't support translation :p stay tuned :)

@ljacqu
Copy link
Member

ljacqu commented Dec 2, 2015

What would be nice if a lot is translatable is that it defaults to English if the message isn't present. Currently an error message appears, which isn't very useful for the typical user.

@sgdc3 sgdc3 added this to the 5.3 Beta milestone Jan 13, 2016
@ljacqu ljacqu self-assigned this Feb 6, 2016
@sgdc3 sgdc3 changed the title Change the AUTHMERELOADED help Translate the AUTHMERELOADED help Mar 31, 2016
@sgdc3 sgdc3 changed the title Translate the AUTHMERELOADED help Translate help strings Mar 31, 2016
@ljacqu ljacqu removed their assignment Apr 15, 2016
@ljacqu
Copy link
Member

ljacqu commented Jun 25, 2016

A few thoughts on this. I don't think it's a good idea to introduce new MessageKey entries for each and every help section as this will be huge. I'd much rather see this use some sort of dynamic keys.

Right now when /help is fired we map the labels to a CommandDescription and read the description, permission, etc. from there. If we look at two command descriptions as an example:

// for /email
    .labels("email")
    .description("Email command")
    .detailedDescription("The AuthMeReloaded Email command base.")

// for /authme unregister
    .parent(AUTHME_BASE)
    .labels("unregister", "unreg", "unr")
    .description("Unregister a player")
    .detailedDescription("Unregister the specified player.")
    .withArgument("player", "Player name", false)
    .permission(AdminPermission.UNREGISTER)

We always have the labels: "email" for /email, "authme unregister" for /authme unregister (when visiting the parent as well). This allows us to have sections in some message file (the existing messages_x.yml files, or rather new ones?):

help:
    email:
       description: 'Translated description for /email'
       detailedDescription: 'blabla'
    authme:
        unregister:
            description: 'Translated description for /authme unregster'

Or maybe the block style is nicer (they correspond to the same structure in YAML):

help:
   email:
       description: 'Translated description'
   authme.unregister:
       description: 'Translation for /authme unregister'

Could also have some form of help.common or common (if help messages go in a separate file) to make titles like "Permission" translatable. This would of course not be dynamic.

One open question is how to define arguments, whether their key should be based on their name, so e.g. help.authme.unregister.argument.player or if it should be a list without names (so help.authme.unregister.argument[0]).

@TerZer
Copy link

TerZer commented Jul 2, 2016

Then this will be added?

@ljacqu
Copy link
Member

ljacqu commented Jul 2, 2016

scheduled for 5.3

@TerZer
Copy link

TerZer commented Jul 2, 2016

When it will come?

@ljacqu
Copy link
Member

ljacqu commented Jul 2, 2016

We don't have a date set for 5.3 yet, but since this is an often requested feature I'll see to it that we start on it sooner rather than later ;) You can turn on notifications for this thread on the right-hand side of the page so you'll be kept up-to-date as stuff happens.

@TerZer
Copy link

TerZer commented Jul 2, 2016

Ok, but do it quick, because I very in need of this, pls :)

@Kixot14
Copy link

Kixot14 commented Aug 29, 2016

customization maniacs...

I also have this disorder :(

...must control everything!

@ljacqu ljacqu self-assigned this Oct 9, 2016
@ljacqu ljacqu modified the milestones: 5.2, 5.3 Beta Oct 9, 2016
@ljacqu
Copy link
Member

ljacqu commented Oct 9, 2016

Hello all (@xyblues @TerZer @Kixot14), translatable help is now available with build nr. 1412 and above http://ci.xephi.fr/job/AuthMeReloaded/ On the next startup it will automatically create a help_en.yml file or similar.

Please check this and provide feedback whether it works as you'd expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants