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

fix(ToolsRedirect): avoid hard-redirecting category pages #1683

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dist/ToolsRedirect/ToolsRedirect.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ToolsRedirect/modules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const ToolsRedirect = {
void self
.bulkEdit(
pagenames,
getMessage('createtext').replace('$1', wgPageName),
getMessage(IS_CATEGORY ? 'createtext' : 'createtext-category').replace('$1', wgPageName),
getMessage('createsummary').replace('$1', wgPageName)
)
.then(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/ToolsRedirect/modules/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const setMessages = (): void => {
'toolsredirect-tabcreateall': '全部创建',
'toolsredirect-createloading': '请稍候,正在自动创建重定向……',
'toolsredirect-createtext': '#REDIRECT [[$1]]',
'toolsredirect-createtext-category': '{{分类重定向|$1}}',
'toolsredirect-createsummary': '编辑工具:自动创建重定向到[[$1]]',
'toolsredirect-errcycleredirect': '无法自动修复:发现循环重定向',
'toolsredirect-refresh': '刷新',
Expand All @@ -51,6 +52,7 @@ const setMessages = (): void => {
'toolsredirect-tabcreateall': '全部創建',
'toolsredirect-createloading': '請稍候,正在自動創建重新導向……',
'toolsredirect-createtext': '#REDIRECT [[$1]]',
'toolsredirect-createtext-category': '{{分类重定向|$1}}',
'toolsredirect-createsummary': '編輯工具:自動創建重新導向到[[$1]]',
'toolsredirect-errcycleredirect': '無法自動修復:發現循環重新導向',
'toolsredirect-refresh': '刷新',
Expand Down
1 change: 1 addition & 0 deletions src/ToolsRedirect/modules/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type MessageKey =
| 'toolsredirect-tabcreateall'
| 'toolsredirect-createloading'
| 'toolsredirect-createtext'
| 'toolsredirect-createtext-category'
| 'toolsredirect-createsummary'
| 'toolsredirect-errcycleredirect'
| 'toolsredirect-refresh';
Expand Down