From b4f96e30dc361c6f911c7a96693a29d45f19f4c5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 2 Dec 2005 21:59:01 +0000 Subject: [PATCH] Localizing files --- includes/paths.php | 8 ++++---- includes/repository.php | 4 ++-- includes/svnlib.php | 16 +++++++++------- templates/default/blame.tpl | 10 +++++----- templates/default/browse.tpl | 20 ++++++++++---------- templates/default/browse_node.tpl | 4 ++-- templates/default/diff.tpl | 16 ++++++++-------- templates/default/file_change.tpl | 2 +- templates/default/header.tpl | 2 +- templates/default/index.tpl | 4 ++-- templates/default/log.tpl | 2 +- templates/default/log_node.tpl | 8 ++++---- templates/default/view.tpl | 20 ++++++++++---------- 13 files changed, 59 insertions(+), 57 deletions(-) diff --git a/includes/paths.php b/includes/paths.php index 82ce43b..cab4561 100644 --- a/includes/paths.php +++ b/includes/paths.php @@ -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; diff --git a/includes/repository.php b/includes/repository.php index 4b8325b..9bb938f 100644 --- a/includes/repository.php +++ b/includes/repository.php @@ -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) diff --git a/includes/svnlib.php b/includes/svnlib.php index 3c2f049..d629d6e 100644 --- a/includes/svnlib.php +++ b/includes/svnlib.php @@ -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; } diff --git a/templates/default/blame.tpl b/templates/default/blame.tpl index da99c3a..7c0758b 100644 --- a/templates/default/blame.tpl +++ b/templates/default/blame.tpl @@ -3,20 +3,20 @@ $doctype $headinclude - Blame + {@"Blame"} $header -View Log +{@"View Log"} - - Go to HEAD - - Diff to HEAD + - {@"Go to HEAD"} + - {@"Diff to HEAD"} - - Diff to PREV + - {@"Diff to PREV"}
$navbar
diff --git a/templates/default/browse.tpl b/templates/default/browse.tpl index 2f74bc3..14167da 100644 --- a/templates/default/browse.tpl +++ b/templates/default/browse.tpl @@ -2,17 +2,17 @@ $doctype $headinclude - ViewSVN - Browse + {@"ViewSVN - Browse"} $header -
Revision Information
+
{@"Revision Information"}
-
Revision: $revinfo[rev]
-
Author: $revinfo[author]
-
Date: $revinfo[date] $revinfo[timezone]
-
Message: $revinfo[message_clean]
+
{@"Revision"}: $revinfo[rev]
+
{@"Author"}: $revinfo[author]
+
{@"Date"}: $revinfo[date] $revinfo[timezone]
+
{@"Message"}: $revinfo[message_clean]
@@ -20,15 +20,15 @@ $header ( - View Log + {@"View Log"} - - Go to HEAD - - Diff to HEAD + - {@"Go to HEAD"} + - {@"Diff to HEAD"} - - Diff to PREV + - {@"Diff to PREV"} ) diff --git a/templates/default/browse_node.tpl b/templates/default/browse_node.tpl index a2bdab7..0e37e84 100644 --- a/templates/default/browse_node.tpl +++ b/templates/default/browse_node.tpl @@ -5,7 +5,7 @@ $item - Blame - - View Log + {@"Blame"} - + {@"View Log"}
\ No newline at end of file diff --git a/templates/default/diff.tpl b/templates/default/diff.tpl index 34696cd..93c37b3 100644 --- a/templates/default/diff.tpl +++ b/templates/default/diff.tpl @@ -4,7 +4,7 @@ $doctype $headinclude - Diff + {@"Diff"} $header @@ -14,18 +14,18 @@ $header ( - View Full Changeset - - View Log + {@"View Full Changeset"} - + {@"View Log"} )
-
Revision: $log[rev]
-
Author: $log[author]
-
Date: $log[date] $log[timezone]
-
Message: $log[message_clean]
+
{@"Revision"}: $log[rev]
+
{@"Author"}: $log[author]
+
{@"Date"}: $log[date] $log[timezone]
+
{@"Message"}: $log[message_clean]
-
File Changes
+
{@"File Changes"}
$files
diff --git a/templates/default/file_change.tpl b/templates/default/file_change.tpl index 3f8b6f9..be37414 100644 --- a/templates/default/file_change.tpl +++ b/templates/default/file_change.tpl @@ -1 +1 @@ -
$file[file] (from $file[from])
+
$file[file] ({@"from"} $file[from])
diff --git a/templates/default/header.tpl b/templates/default/header.tpl index 856a845..d554927 100644 --- a/templates/default/header.tpl +++ b/templates/default/header.tpl @@ -6,7 +6,7 @@
- Repository: $options diff --git a/templates/default/index.tpl b/templates/default/index.tpl index df48904..2a7531f 100644 --- a/templates/default/index.tpl +++ b/templates/default/index.tpl @@ -2,13 +2,13 @@ $doctype $headinclude - ViewSVN - Repositories + {@"ViewSVN - Repositories"} $header
-
Repositories
+
{@"Repositories"}
    $nodes diff --git a/templates/default/log.tpl b/templates/default/log.tpl index b22428e..ad9c521 100644 --- a/templates/default/log.tpl +++ b/templates/default/log.tpl @@ -2,7 +2,7 @@ $doctype $headinclude - ViewSVN - Log + {@"ViewSVN - Log"} $header diff --git a/templates/default/log_node.tpl b/templates/default/log_node.tpl index 80d4faa..267578a 100644 --- a/templates/default/log_node.tpl +++ b/templates/default/log_node.tpl @@ -1,10 +1,10 @@
    r$log[rev] ($log[author]) $log[date] $log[timezone] - - View - - Blame - - Diff to HEAD - - Diff to PREV + - {@"View"} + - {@"Blame"} + - {@"Diff to HEAD"} + - {@"Diff to PREV"}
    $log[message_clean] diff --git a/templates/default/view.tpl b/templates/default/view.tpl index 20f215b..37bc24f 100644 --- a/templates/default/view.tpl +++ b/templates/default/view.tpl @@ -2,17 +2,17 @@ $doctype $headinclude - View + {@"View"} $header -
    Revision Information
    +
    {@"Revision Information"}
    -
    Revision: $logmsg[rev]
    -
    Author: $logmsg[author]
    -
    Date: $logmsg[date] $logmsg[timezone]
    -
    Message: $logmsg[message_clean]
    +
    {@"Revision"}: $logmsg[rev]
    +
    {@"Author"}: $logmsg[author]
    +
    {@"Date"}: $logmsg[date] $logmsg[timezone]
    +
    {@"Message"}: $logmsg[message_clean]
    @@ -20,14 +20,14 @@ $navbar ( - View Log + {@"View Log"} - - Go to HEAD - - Diff to HEAD + - {@"Go to HEAD"} + - {@"Diff to HEAD"} - - Diff to PREV + - {@"Diff to PREV"} ) -- 2.43.5