User:AlexT/regex
This page contains regex match and replace I used in translating English pages to zh-hans pages on this wiki.
Last updated: May 25, 2023
This work is licensed under a Creative Commons Attribution 4.0 International License.
Item page
PURPOSE | FIND | REPLACE |
---|---|---|
Class link | \[\[(Scout|Soldier|Pyro|Demoman|Heavy|Engineer|Medic|Sniper|Spy)\]\] | {{cl|$1}} |
All Classes | [[Classes|All classes]] | [[Classes/zh-hans|全兵种]] |
Update link | [[Smissmas 2022]] | {{update link|Smissmas 2022}} |
Publicity blurb | \'\'\'(.+)\'\'\' publicity blurb | '''{{item name|$1}}'''的宣传语 |
Add language link | \[\[([A-Za-z0-9]+)\|([A-Za-z0-9]+)\]\] | [[$1/zh-hans|$2]] |
Translate styles (only works with 2 styles) | This item has .+ \[\[styles\]\], named .(.+). and .(.+).\. | 该物品拥有两种[[styles/zh-hans|{{common strings|styles}}]]:{{item name|$1}}和{{item name|$2}}。 |
intro | The '''(.+)''' [ai][rs][e]? a \[\[Steam .orkshop\|community-created\]\] \[\[Cosmetic items\|cosmetic item\]\] for t?h?e? ?(.+)\. | ''{{item name|$1}}($1)'''是一件[[Steam Workshop/zh-hans|社区制作]]的$2专用[[cosmetic items/zh-hans|饰品]]。 |
Change intro if all classes | [[Classes|all classes]]专用 | [[Classes/zh-hans|全兵种]]通用 |
Contribution | T?h?e? ?(.+) w[ea][rs][e]? \[https:\/\/(.+) contributed\] to the Steam Workshop. | {{item name|$1}}是[https://$2 投稿]于Steam创意工坊的作品。 |
Headings | == Painted variants == | == {{common strings|painted variants}} == |
== Styles == | == {{common strings|Styles}} == | |
== See also == | == {{common strings|see also}} == | |
== Update history == | == {{common strings|update history}} == | |
== Gallery == | == {{common strings|gallery}} == | |
Workshop thumbnail | Steam Workshop thumbnail for the (.+)\. | {{item name|$1}}的创意工坊缩略图 |
First update | \* T?h?e? ?(.+) w[ea][rs][e]? added to the game\. | * {{item name|$1}}被添加至游戏。 |
Auto itemlink | \[\[([^|\[\]\\]+)\]\] | {{item link|$1}} |
Taunt intro | The ...(.+)... is a \[\[Steam Workshop\|community-created\]\] \[\[Taunts#Special taunts\|special taunt\]\] for t?h?e? ?(.+)\. | ''{{item name|$1}}($1)'''是一个[[Steam Workshop/zh-hans#Special taunts|社区制作]]的$2可用的[[taunts/zh-hans|特殊嘲讽]]。 |
heading | == Trivia == | == {{common strings|trivia}} == |
Concept art | Concept art for the (.+)\. | {{item name|$1}}的概念设计图 |
Update page
PURPOSE | FIND | REPLACE |
---|---|---|
Title | === Team Fortress 2 === | === 军团要塞2 === |
Headings | == Undocumented changes == | == 未记载变动 == |
== References == | == {{common strings|References}} == | |
Links | \[\[([^|\[\]\\]+)\|([^|\[\]]+)\]\] | [[$1/zh-hans|$2]] |
Seasons for medals | Season (\d+) | 第$1季 |
Punctuation for series of medals | , | 、 |
Connection word for the last medals | 、and | 以及 |
Localization files | * Updated the [[Localization files|localization files]] | * 更新了[[localization files/zh-hans|本地化文件]]。 |
* Updated the [[localization files]] | * 更新了[[localization files/zh-hans|本地化文件]]。 |