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

Problem with a path in the language file #1707

Closed
apachezy opened this issue Mar 12, 2021 · 2 comments
Closed

Problem with a path in the language file #1707

apachezy opened this issue Mar 12, 2021 · 2 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug

Comments

@apachezy
Copy link
Contributor

apachezy commented Mar 12, 2021

Description

Describe the bug

  • This path in all locales file: commands.admin.purge.days-or-more
commands:
  admin:
    purge:
      parameters: "[days]" 
      description: "purge islands abandoned for more than [days]"
      days-or-more: "Must be at least 1 day or more"  # <<<
  • AdminPurgeCommand#execute (line 75) used the path: commands.admin.purge.days-one-or-more
Integer days = Integer.parseInt(args.get(0));
if (days < 1) {
    user.sendMessage("commands.admin.purge.days-one-or-more");  // <<<
    return false;
}

Which one is correct?

Expected behavior

Execute the command: /asadmin purge 0
Will get: "commands.admin.purge.days-one-or-more"

@Poslovitch
Copy link
Member

It should be using commands.admin.purge.days-one-or-more.

@Poslovitch
Copy link
Member

I'm on it.

@Poslovitch Poslovitch self-assigned this Mar 12, 2021
@Poslovitch Poslovitch added Status: In progress Working on the issue. Type: Bug labels Mar 12, 2021
@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Mar 12, 2021
tastybento pushed a commit that referenced this issue Mar 13, 2021
* Improved zh-CN.yml

* Delete an error.

* days-one-or-more #1707

Co-authored-by: zhangYi <apachezy@hotmail.com>
Poslovitch pushed a commit that referenced this issue Mar 13, 2021
* Improved zh-CN.yml

* Delete an error.

* days-one-or-more #1707

* Patch NO.1

Co-authored-by: zhangYi <apachezy@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants