Localizing files
authorRobert Sesek <rsesek@bluestatic.org>
Fri, 2 Dec 2005 21:59:01 +0000 (21:59 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Fri, 2 Dec 2005 21:59:01 +0000 (21:59 +0000)
13 files changed:
includes/paths.php
includes/repository.php
includes/svnlib.php
templates/default/blame.tpl
templates/default/browse.tpl
templates/default/browse_node.tpl
templates/default/diff.tpl
templates/default/file_change.tpl
templates/default/header.tpl
templates/default/index.tpl
templates/default/log.tpl
templates/default/log_node.tpl
templates/default/view.tpl

index 82ce43bbaf1690c03f65630b671bf45f6b11e4a9..cab45614b974a12ee9956794b9894a768f0f9da3 100644 (file)
@@ -52,7 +52,7 @@ class Paths
                
                if ($type < 1 OR $type > 2)
                {
-                       $viewsvn->trigger->error('invalid path management type');
+                       $viewsvn->trigger->error($viewsvn->lang->string('Invalid path management type specified in [includes/config.php]'));
                }
                
                $this->type = (int)$type;
@@ -113,18 +113,18 @@ class Paths
                        }
                        else
                        {
-                               $viewsvn->trigger->error('server does not support type 2 management');
+                               $viewsvn->trigger->error($viewsvn->lang->string('Your server does not support type-2 path management'));
                        }
                }
                
                if (!$path)
                {
-                       $viewsvn->trigger->error('invalid path sent');
+                       $viewsvn->trigger->error($viewsvn->lang->string('Invalid path sent'));
                }
                
                if (!$viewsvn->repos->verify($this->fetch_repos($path), $this->fetch_path($path)))
                {
-                       $viewsvn->trigger->error('invalid path');
+                       $viewsvn->trigger->error($viewsvn->lang->string('The path specified could not be verified'));
                }
                
                return $path;
index 4b8325bf93c428acd24c846f0edaf36f8a374d75..9bb938f7c0d67695730bcd0c390007fa6a23a8dd 100644 (file)
@@ -92,7 +92,7 @@ class Repository
                
                if (count($this->repositories) < 1)
                {
-                       $viewsvn->trigger->error('no valid repositories');
+                       $viewsvn->trigger->error($viewsvn->lang->string('There are no valid repositories'));
                }
        }
        
@@ -123,7 +123,7 @@ class Repository
                
                if (!in_array($repository, $this->fetch_list()))
                {
-                       $viewsvn->trigger->error('invalid repository name');
+                       $viewsvn->trigger->error($viewsvn->lang->string('Invalid repository name specified'));
                }
                
                if ($this->container)
index 3c2f04982229e1bb6c95a4f92d23d961b2f6410a..d629d6e2f0af6628366584499661c78576841db4 100644 (file)
@@ -63,12 +63,12 @@ class SVNLib
                
                if (!$access)
                {
-                       $viewsvn->trigger->error('svn binary could not be found');
+                       $viewsvn->trigger->error($viewsvn->lang->string('The SVN binary could not be located'));
                }
                
                if (!preg_match('#^svn, version (.*?)\)$#i', trim($access[0])))
                {
-                       $viewsvn->trigger->error('svn binary does not pass test');
+                       $viewsvn->trigger->error($viewsvn->lang->string('The SVN binary does not appear to be valid (it failed our tests)'));
                }
        }
        
@@ -445,6 +445,8 @@ class SVNCommon
        */
        function fetch_prev_rev($path, $current)
        {
+               global $viewsvn;
+               
                $revs = $this->fetch_revs($path);
                
                if ($current == 'HEAD')
@@ -455,7 +457,7 @@ class SVNCommon
                $index = array_search($current, $revs['revs']);
                if ($current === false)
                {
-                       $message->trigger->error('revision ' . $current . ' is not in ' . $path);
+                       $message->trigger->error(sprintf($viewsvn->lang->string('Revision r%1$s is not in path %2$s'), $current, $path));
                }
                
                if (isset($revs['revs'][ $index + 1 ]))
@@ -554,19 +556,19 @@ class SVNCommon
                        {
                                case 'A':
                                        $class = 'file_add';
-                                       $tooltip = 'Added';
+                                       $tooltip = $viewsvn->lang->string('Added');
                                        break;
                                case 'D':
                                        $class = 'file_delete';
-                                       $tooltip = 'Deleted';
+                                       $tooltip = $viewsvn->lang->string('Deleted');
                                        break;
                                case 'M':
                                        $class = 'file_modify';
-                                       $tooltip = 'Modified';
+                                       $tooltip = $viewsvn->lang->string('Modified');
                                        break;
                                case 'R':
                                        $class = 'file_replace';
-                                       $tooltip = 'Replaced';
+                                       $tooltip = $viewsvn->lang->string('Replaced');
                                        break;
                        }
                        
index da99c3adc823a213845ed2cd49f40f40e437614d..7c0758b5a4be507dec478611c16d55479bb36497 100644 (file)
@@ -3,20 +3,20 @@ $doctype
 <head>
 $headinclude
        <link rel="stylesheet" href="$viewsvn->path/templates/default/diff.css" media="screen" />
-       <title>Blame</title>
+       <title>{@"Blame"}</title>
 </head>
 
 $header
 
-<a href="$viewsvn->path/$link[log]">View Log</a>
+<a href="$viewsvn->path/$link[log]">{@"View Log"}</a>
 
 <if condition="$show['head']">
-       - <a href="$viewsvn->path/$link[gohead]">Go to HEAD</a>
-       - <a href="$viewsvn->path/$link[diffhead]">Diff to HEAD</a>
+       - <a href="$viewsvn->path/$link[gohead]">{@"Go to HEAD"}</a>
+       - <a href="$viewsvn->path/$link[diffhead]">{@"Diff to HEAD"}</a>
 </if>
 
 <if condition="$show['prev']">
-       - <a href="$viewsvn->path/$link[diffprev]">Diff to PREV</a>
+       - <a href="$viewsvn->path/$link[diffprev]">{@"Diff to PREV"}</a>
 </if>
 
 <div class="head" style="border-width: 1px">$navbar</div>
index 2f74bc3943e38bad169f2594fadcd6ce4cccd055..14167dac38c2d619d7421bec1b8e7978b176bb46 100644 (file)
@@ -2,17 +2,17 @@ $doctype
 <html lang="##LANG##" xml:lang="##XML-LANG##">
 <head>
 $headinclude
-       <title>ViewSVN - Browse</title>
+       <title>{@"ViewSVN - Browse"}</title>
 </head>
 
 $header
 
-<div class="head">Revision Information</div>
+<div class="head">{@"Revision Information"}</div>
 <div class="content">
-       <div><strong>Revision:</strong> $revinfo[rev]</div>
-       <div><strong>Author:</strong> $revinfo[author]</div>
-       <div><strong>Date:</strong> $revinfo[date] $revinfo[timezone]</div>
-       <div><strong>Message:</strong> $revinfo[message_clean]</div>
+       <div><strong>{@"Revision"}:</strong> $revinfo[rev]</div>
+       <div><strong>{@"Author"}:</strong> $revinfo[author]</div>
+       <div><strong>{@"Date"}:</strong> $revinfo[date] $revinfo[timezone]</div>
+       <div><strong>{@"Message"}:</strong> $revinfo[message_clean]</div>
 </div>
 
 <div class="head" style="border-width: 0px 1px 1px 1px">
@@ -20,15 +20,15 @@ $header
        
        <span style="font-weight: normal">
                (
-               <a href="$viewsvn->path/$link[log]">View Log</a>
+               <a href="$viewsvn->path/$link[log]">{@"View Log"}</a>
                
                <if condition="$show['head']">
-                       - <a href="$viewsvn->path/$link[gohead]">Go to HEAD</a>
-                       - <a href="$viewsvn->path/$link[diffhead]">Diff to HEAD</a>
+                       - <a href="$viewsvn->path/$link[gohead]">{@"Go to HEAD"}</a>
+                       - <a href="$viewsvn->path/$link[diffhead]">{@"Diff to HEAD"}</a>
                </if>
                
                <if condition="$show['prev']">
-                       - <a href="$viewsvn->path/$link[diffprev]">Diff to PREV</a>
+                       - <a href="$viewsvn->path/$link[diffprev]">{@"Diff to PREV"}</a>
                </if>
                )
        </span>
index a2bdab7b713e02219d99c650c8c26a4f5e541ed3..0e37e84087766600a2d6a052ab5af394a425ef03 100644 (file)
@@ -5,7 +5,7 @@
                <a href="$viewsvn->path/$view">$item</a>
        </if>
        <span class="nodelink">
-               <if condition="!$show['directory']"><a href="$viewsvn->path/$blame">Blame</a> - </if>
-               <a href="$viewsvn->path/$log">View Log</a>
+               <if condition="!$show['directory']"><a href="$viewsvn->path/$blame">{@"Blame"}</a> - </if>
+               <a href="$viewsvn->path/$log">{@"View Log"}</a>
        </span>
 </div>
\ No newline at end of file
index 34696cd1f7dcbd660d4ae8c7f37f1bf44b0d5883..93c37b3b4a17c25ed257313c408b4d36d403adf7 100644 (file)
@@ -4,7 +4,7 @@ $doctype
 $headinclude
        <link rel="stylesheet" href="$viewsvn->path/templates/default/diff.css" media="screen" />
        <link rel="stylesheet" href="$viewsvn->path/templates/default/file.css" media="screen" />
-       <title>Diff</title>
+       <title>{@"Diff"}</title>
 </head>
 
 $header
@@ -14,18 +14,18 @@ $header
        
        <span style="font-weight: normal">
        (
-       <if condition="$show['fullchangeset']"><a href="$viewsvn->path/$link[changeset]">View Full Changeset</a> -</if>
-       <a href="$viewsvn->path/$link[log]">View Log</a>
+       <if condition="$show['fullchangeset']"><a href="$viewsvn->path/$link[changeset]">{@"View Full Changeset"}</a> -</if>
+       <a href="$viewsvn->path/$link[log]">{@"View Log"}</a>
        )
        </span>
 </div>
 <div class="content">
-       <div><strong>Revision:</strong> $log[rev]</div>
-       <div><strong>Author:</strong> $log[author]</div>
-       <div><strong>Date:</strong> $log[date] $log[timezone]</div>
-       <div><strong>Message:</strong> $log[message_clean]</div>
+       <div><strong>{@"Revision"}:</strong> $log[rev]</div>
+       <div><strong>{@"Author"}:</strong> $log[author]</div>
+       <div><strong>{@"Date"}:</strong> $log[date] $log[timezone]</div>
+       <div><strong>{@"Message"}:</strong> $log[message_clean]</div>
 </div>
-<div class="subhead" style="border-width: 0px 1px 0px 1px">File Changes</div>
+<div class="subhead" style="border-width: 0px 1px 0px 1px">{@"File Changes"}</div>
 <div class="content">
 $files
 </div>
index 3f8b6f9ff937fb1c607dedad53a36a39398a74af..be37414884f18e4ac898efbd6966ac7d3a1601d2 100644 (file)
@@ -1 +1 @@
-       <div><div class="file_bit + $class" title="$tooltip"></div> <a href="$viewsvn->path/$link[file]">$file[file]</a> <if condition="$show['from']"><em>(from <a href="$viewsvn->path/$link[from]">$file[from]</a>)</em></if></div>
+       <div><div class="file_bit + $class" title="$tooltip"></div> <a href="$viewsvn->path/$link[file]">$file[file]</a> <if condition="$show['from']"><em>({@"from"} <a href="$viewsvn->path/$link[from]">$file[from]</a>)</em></if></div>
index 856a8458fc171be4866a1c386e6ff8ec7521a612..d554927d79163bd2192c050c2a12a22a586bf51b 100644 (file)
@@ -6,7 +6,7 @@
        <td style="text-align: right">
                <if condition="$show['reposchooser']">
                <form name="jumper" method="post" action="$viewsvn->path/repository.php">
-                       Repository: <select name="repository">
+                       {@"Repository"}: <select name="repository">
                        $options
                        </select>
                        
index df48904d6be94dd3f52364f8c0b87a7f22041289..2a7531f019fc2004df081eb6c1369eb2a52cfa1b 100644 (file)
@@ -2,13 +2,13 @@ $doctype
 <html lang="##LANG##" xml:lang="##XML-LANG##">
 <head>
 $headinclude
-       <title>ViewSVN - Repositories</title>
+       <title>{@"ViewSVN - Repositories"}</title>
 </head>
 
 $header
 
 <div style="width: 500px">
-       <div class="head">Repositories</div>
+       <div class="head">{@"Repositories"}</div>
        <div class="content">
                <ul class="list">
 $nodes
index b22428e278b42ed1263b9a116ca0e27448a665f1..ad9c521cf5ebe14d2dada19a8d0603295b50efe8 100644 (file)
@@ -2,7 +2,7 @@ $doctype
 <html lang="##LANG##" xml:lang="##XML-LANG##">
 <head>
 $headinclude
-       <title>ViewSVN - Log</title>
+       <title>{@"ViewSVN - Log"}</title>
 </head>
 
 $header
index 80d4faa004e0572802e1e1e4be34abadc90f5014..267578af655e4ced8bd7cf2aa3bd55a146ed9182 100644 (file)
@@ -1,10 +1,10 @@
 <div class="subhead" style="border-width: 0px 1px 0px 1px">
        r$log[rev] ($log[author])
        $log[date] $log[timezone]
-       - <a href="$viewsvn->path/$link[view]">View</a>
-       <if condition="!$isdir">- <a href="$viewsvn->path/$link[blame]">Blame</a></if>
-       <if condition="$show['diffhead']">- <a href="$viewsvn->path/$link[diffhead]">Diff to HEAD</a></if>
-       <if condition="$show['diffprev']">- <a href="$viewsvn->path/$link[diffprev]">Diff to PREV</a></if>
+       - <a href="$viewsvn->path/$link[view]">{@"View"}</a>
+       <if condition="!$isdir">- <a href="$viewsvn->path/$link[blame]">{@"Blame"}</a></if>
+       <if condition="$show['diffhead']">- <a href="$viewsvn->path/$link[diffhead]">{@"Diff to HEAD"}</a></if>
+       <if condition="$show['diffprev']">- <a href="$viewsvn->path/$link[diffprev]">{@"Diff to PREV"}</a></if>
 </div>
 <div class="content" style="padding: 4px">
 $log[message_clean]
index 20f215bfd3b414666df0f4057cd9c78cc247403d..37bc24f132d4f079a24d9a571d36baf58b9880aa 100644 (file)
@@ -2,17 +2,17 @@ $doctype
 <html lang="##LANG##" xml:lang="##XML-LANG##">
 <head>
 $headinclude
-       <title>View</title>
+       <title>{@"View"}</title>
 </head>
 
 $header
 
-<div class="head">Revision Information</div>
+<div class="head">{@"Revision Information"}</div>
 <div class="content">
-       <div><strong>Revision:</strong> $logmsg[rev]</div>
-       <div><strong>Author:</strong> $logmsg[author]</div>
-       <div><strong>Date:</strong> $logmsg[date] $logmsg[timezone]</div>
-       <div><strong>Message:</strong> $logmsg[message_clean]</div>
+       <div><strong>{@"Revision"}:</strong> $logmsg[rev]</div>
+       <div><strong>{@"Author"}:</strong> $logmsg[author]</div>
+       <div><strong>{@"Date"}:</strong> $logmsg[date] $logmsg[timezone]</div>
+       <div><strong>{@"Message"}:</strong> $logmsg[message_clean]</div>
 </div>
 
 <div class="head" style="border-width: 0px 1px 0px 1px">
@@ -20,14 +20,14 @@ $navbar
        
        <span style="font-weight: normal">
        (
-       <a href="$viewsvn->path/$link[log]">View Log</a>
+       <a href="$viewsvn->path/$link[log]">{@"View Log"}</a>
        <if condition="$show['head']">
-               - <a href="$viewsvn->path/$link[gohead]">Go to HEAD</a>
-               - <a href="$viewsvn->path/$link[diffhead]">Diff to HEAD</a>
+               - <a href="$viewsvn->path/$link[gohead]">{@"Go to HEAD"}</a>
+               - <a href="$viewsvn->path/$link[diffhead]">{@"Diff to HEAD"}</a>
        </if>
        
        <if condition="$show['prev']">
-               - <a href="$viewsvn->path/$link[diffprev]">Diff to PREV</a>
+               - <a href="$viewsvn->path/$link[diffprev]">{@"Diff to PREV"}</a>
        </if>
        )
        </span>