Skip to content

Commit

Permalink
fix(ToolsRedirect): avoid hard-redirecting category pages (qiuwenbaik…
Browse files Browse the repository at this point in the history
…e#1683)

* fix(ToolsRedirect): avoid hard-redirecting category pages
  • Loading branch information
WaitSpringQW authored Jan 28, 2025
1 parent a3218e1 commit c11fb53
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
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

0 comments on commit c11fb53

Please sign in to comment.