User:Bbbush/tools/fwn-pre-translate.pl

use strict; my @IssueNumber; my @anchor; while(<>) { if(/^= /) { @IssueNumber = /(\d+)/; die "已经处理过了！\n" unless not /新闻周刊/; } if(/^=/) { s/Fedora Weekly News Issue (\d+)/Fedora 新闻周刊第 \1 期/; s/Announcements/公告/; s/Ask Fedora/Fedora 有问有答/; s/Planet Fedora/Fedora 博客聚集/; s/Fedora Daily Package Weekly Video Summary/每周视频总结/; s/Daily Package/每日软件包/; s/Marketing/营销/; s/Developments/开发/; s/Maintainers/维护者/; s/Translation/翻译/; s/Infrastructure/基础设施/; s/Security Week/安全周刊/; s/Advisories and Updates/更新/; s/Security Advisories/安全更新/; s/Events and Meetings/事件和会议/; } if(/^\[\[/) ]{ @anchor = /Anchor\((.*)\)/; }
 * 1) !/usr/bin/perl

print;

if(/^= /) { print "欢迎阅览 Fedora 新闻周刊第 @IssueNumber 期，记载自 2007-MM-dd 起一周事件. 本页永久链接为 http://fedoraproject.org/wiki/zh_CN/FWN/Issue@IssueNumber\n\n"; print "本周的主要内容有：\n\n"; print "要参与我们或给出反馈，请访问  . \n"; } if(/^== /) { print "原文请查看  \n"; @anchor = ; } }