Skip to content

Commit d86a973

Browse files
committed
Change format of l10n keys
1 parent 825fb65 commit d86a973

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# command descriptions: command-description_{command}
1+
# command descriptions: {command}_description
22
# |--------------------------------------------------------------------------------------------------|
33

4-
# parameter descriptions: parameter-description_{command}_{parameter}
4+
# parameter descriptions: {command}_parameter-description_{parameter}
55
# |--------------------------------------------------------------------------------------------------|
66

77
# common parameters
@@ -11,101 +11,101 @@
1111
1212
# /gh issue
1313

14-
command-description_gh-issue =
14+
gh-issue_description =
1515
Get a link to a GitHub issue.
1616
17-
parameter-description_gh-issue_reference =
17+
gh-issue_parameter-description_reference =
1818
Issue to look up (`owner/repo#123` or `#123`). Use `/gh login` to get autocomplete.
1919
20-
parameter-description_gh-issue_visibility =
20+
gh-issue_parameter-description_visibility =
2121
{-parameter-description_visibility}
2222
2323
# /gh pr
2424

25-
command-description_gh-pr =
25+
gh-pr_description =
2626
Get a link to a GitHub pull request.
2727
28-
parameter-description_gh-pr_reference =
28+
gh-pr_parameter-description_reference =
2929
Pull request to look up (`owner/repo#123` or `#123`). Use `/gh login` to get autocomplete.
3030
31-
parameter-description_gh-pr_visibility =
31+
gh-pr_parameter-description_visibility =
3232
{-parameter-description_visibility}
3333
3434
# /gh commit
3535

36-
command-description_gh-commit =
36+
gh-commit_description =
3737
Get a link to a GitHub commit.
3838
39-
parameter-description_gh-commit_reference =
39+
gh-commit_parameter-description_reference =
4040
Commit SHA to look up (`owner/repo@sha` or `@sha`). Use `/gh login` to get autocomplete.
4141
42-
parameter-description_gh-commit_visibility =
42+
gh-commit_parameter-description_visibility =
4343
{-parameter-description_visibility}
4444
4545
# /gh repo
4646

47-
command-description_gh-repo =
47+
gh-repo_description =
4848
Get a link to a GitHub repository.
4949
50-
parameter-description_gh-repo_repo =
50+
gh-repo_parameter-description_repo =
5151
Repository to look up (`owner/repo`). Use `/gh login` to get autocomplete.
5252
53-
parameter-description_gh-repo_visibility =
53+
gh-repo_parameter-description_visibility =
5454
{-parameter-description_visibility}
5555
5656
# /gh user
5757

58-
command-description_gh-user =
58+
gh-user_description =
5959
Get a link to a GitHub user.
6060
61-
parameter-description_gh-repo_user =
61+
gh-user_parameter-description_user =
6262
Username to look up. Use `/gh login` to get autocomplete.
6363
64-
parameter-description_gh-user_visibility =
64+
gh-user_parameter-description_visibility =
6565
{-parameter-description_visibility}
6666
6767
# /gh login
6868

69-
command-description_gh-login =
69+
gh-login_description =
7070
Authorize GitHub Utils to make requests on behalf of your GitHub account.
7171
7272
# /gh logout
7373

74-
command-description_gh-logout =
74+
gh-logout_description =
7575
Remove your GitHub account from GitHub Utils.
7676
7777
# /gh status
7878

79-
command-description_gh-status =
79+
gh-status_description =
8080
Show information about GitHub Utils.
8181
82-
parameter-description_gh-status_visibility =
82+
gh-status_parameter-description_visibility =
8383
{-parameter-description_visibility}
8484
8585
# /gh search
8686

87-
command-description_gh-search =
87+
gh-search_description =
8888
Search for things on GitHub.
8989
9090
# /gh search files
9191

92-
command-description_gh-search-files =
92+
gh-search-files_description =
9393
Search for files in a repository by name.
9494
95-
parameter-description_gh-search-files_repo =
95+
gh-search-files_parameter-description_repo =
9696
Repository to search in (`owner/repo`).
9797
98-
parameter-description_gh-search-files_query =
98+
gh-search-files_parameter-description_query =
9999
Filename to search for.
100100
101-
parameter-description_gh-search-files_ref =
101+
gh-search-files_parameter-description_ref =
102102
Branch name, tag name, or commit to search in. Defaults to the default branch of the repo.
103103
104-
parameter-description_gh-search-files_exact =
104+
gh-search-files_parameter-description_exact =
105105
If true, use exact search; otherwise use fuzzy search.
106106
107-
parameter-description_gh-search-files_limit =
107+
gh-search-files_parameter-description_limit =
108108
Maximum number of results to show.
109109
110-
parameter-description_gh-search-files_visibility =
110+
gh-search-files_parameter-description_visibility =
111111
{-parameter-description_visibility}

bot/src/ghutils/utils/l10n.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
def command_description_id(command: str):
1313
command = _format_identifier(command)
14-
return f"command-description_{command}"
14+
return f"{command}_description"
1515

1616

1717
def command_description(command: str):
@@ -21,7 +21,7 @@ def command_description(command: str):
2121
def parameter_description_id(command: str | None, parameter: str):
2222
command = _format_identifier(command or "common")
2323
parameter = _format_identifier(parameter)
24-
return f"parameter-description_{command}_{parameter}"
24+
return f"{command}_parameter-description_{parameter}"
2525

2626

2727
def parameter_description(command: str | None, parameter: str):

0 commit comments

Comments
 (0)