[Home]WikiPatches/AddNavbarTranslation

UseModWiki | WikiPatches | RecentChanges | Preferences

Add translation for keywords: HomePage and RecentChanges:

--- wiki.pl	2003-09-11 20:21:02.000000000 +0800
+++ wiki.pl.translate	2003-12-12 00:03:46.093750000 +0800
@@ -1093,6 +1093,8 @@
 sub ScriptLink {
   my ($action, $text) = @_;
 
+  $text = T('RecentChanges') if ($text eq $RCName);
+  $text = T('HomePage') if ($text eq $HomePage);
   return "<a href=\"$ScriptName" . &ScriptLinkChar() . "$action\">$text</a>";
 }
 
@@ -1106,6 +1108,8 @@
 sub GetPageLinkText {
   my ($id, $name) = @_;
 
+  $name = T('RecentChanges') if ($name eq $RCName);
+  $name = T('HomePage') if ($name eq $HomePage);
   $id =~ s|^/|$MainPage/|;
   if ($FreeLinks) {
     $id = &FreeToNormal($id);
@@ -1287,6 +1291,7 @@
   my $embed = &GetParam('embed', $EmbedWiki);
   my $altText = T('[Home]');
 
+  $title = T('HomePage') if ($title eq $HomePage);
   $result = &GetHttpHeader('');
   if ($FreeLinks) {
     $title =~ s/_/ /g;   # Display as spaces

--- Johnson

Why not just set $HomePage and $RCName? I don't understand the purpose of this patch yet. -- MarkusLude


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited August 12, 2007 1:39 am by MarkusLude (diff)
Search: