From 1fc647925feb766b2980d4f7384322731cc00dfa Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 2 Aug 2007 23:14:41 +0000 Subject: [PATCH] Adding language settings to config.php so that people can control the language output of their repository viewer --- includes/config.php.new | 12 ++++++++++++ includes/init.php | 2 ++ templates/blame.tpl | 2 +- templates/browse.tpl | 2 +- templates/diff.tpl | 2 +- templates/headinclude.tpl | 1 + templates/index.tpl | 2 +- templates/log.tpl | 2 +- templates/view.tpl | 2 +- 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/includes/config.php.new b/includes/config.php.new index 19ff602..dfc7269 100644 --- a/includes/config.php.new +++ b/includes/config.php.new @@ -52,6 +52,18 @@ $conf['paths']['web'] = '/viewsvn'; // is in your shell's path, then you can set this to 'svn'. $conf['paths']['svn'] = '/usr/local/bin/svn'; +// ################################################################### +// ///////////////////////// LANGUAGE OPTIONS +// ------------------------------------------------------------------- +// The text encoding to send all the pages as. This should probably +// remain at UTF8. +$conf['lang']['encoding'] = 'utf8'; + +// The language code. This should follow Gettext nomenclature and be +// the two letter language code (lowercase), an underscore, and the +// two letter country code (upper case) +$conf['lang']['code'] = 'en_US'; + /*=====================================================================*\ || ################################################################### || # $HeadURL$ diff --git a/includes/init.php b/includes/init.php index 73d6eae..cd5baad 100644 --- a/includes/init.php +++ b/includes/init.php @@ -59,6 +59,8 @@ $template->setExtension('tpl'); // load options BSRegister::Register('svnpath', $conf['paths']['svn']); +$language = $conf['lang']; + // ################################################################### // imaginary reporter require_once('./includes/imaginary.php'); diff --git a/templates/blame.tpl b/templates/blame.tpl index 5a8160e..2ec967d 100644 --- a/templates/blame.tpl +++ b/templates/blame.tpl @@ -1,5 +1,5 @@ $doctype - + $headinclude diff --git a/templates/browse.tpl b/templates/browse.tpl index 0135165..2f4b4f0 100644 --- a/templates/browse.tpl +++ b/templates/browse.tpl @@ -1,5 +1,5 @@ $doctype - + $headinclude {@"ViewSVN - Browse"} diff --git a/templates/diff.tpl b/templates/diff.tpl index 0db1b1a..65a8075 100644 --- a/templates/diff.tpl +++ b/templates/diff.tpl @@ -1,5 +1,5 @@ $doctype - + $headinclude diff --git a/templates/headinclude.tpl b/templates/headinclude.tpl index 2e35dc0..29b1c9d 100644 --- a/templates/headinclude.tpl +++ b/templates/headinclude.tpl @@ -1 +1,2 @@ + \ No newline at end of file diff --git a/templates/index.tpl b/templates/index.tpl index 40c5e99..5651be3 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -1,5 +1,5 @@ $doctype - + $headinclude {@"ViewSVN - Repositories"} diff --git a/templates/log.tpl b/templates/log.tpl index d61c982..c89c8ba 100644 --- a/templates/log.tpl +++ b/templates/log.tpl @@ -1,5 +1,5 @@ $doctype - + $headinclude {@"ViewSVN - Log"} diff --git a/templates/view.tpl b/templates/view.tpl index 6194c87..3302d86 100644 --- a/templates/view.tpl +++ b/templates/view.tpl @@ -1,5 +1,5 @@ $doctype - + $headinclude -- 2.43.5