From 7f544db96f8a670932d3b2662711062f62769987 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 23 Dec 2007 22:42:05 +0000 Subject: [PATCH] ebl Use /usr/share/bweb/tpl/{en,fr,es,..} instead of /usr/share/bweb/{fr,es,en,..}/tpl Each user can have his own language git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6123 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/INSTALL | 16 ++++--- gui/bweb/UPGRADE | 4 -- gui/bweb/install_bweb | 11 +++-- gui/bweb/lang/en/en.pl | 2 - gui/bweb/lang/en/tpl/begin.tpl | 4 ++ gui/bweb/lang/en/tpl/config_edit.tpl | 19 ++++++-- gui/bweb/lang/en/tpl/config_view.tpl | 3 +- gui/bweb/lang/en/tpl/display_user.tpl | 11 +++-- gui/bweb/lang/es/tpl/ach_add.tpl | 2 +- gui/bweb/lang/es/tpl/begin.tpl | 4 ++ gui/bweb/lang/es/tpl/change_location.tpl | 12 ++--- gui/bweb/lang/es/tpl/client_list.tpl | 6 +-- gui/bweb/lang/es/tpl/config_edit.tpl | 19 ++++++-- gui/bweb/lang/es/tpl/config_view.tpl | 3 +- gui/bweb/lang/es/tpl/display_client_stats.tpl | 2 +- gui/bweb/lang/fr/tpl/ach_add.tpl | 2 +- gui/bweb/lang/fr/tpl/begin.tpl | 3 +- gui/bweb/lang/fr/tpl/change_location.tpl | 2 +- gui/bweb/lang/fr/tpl/config_edit.tpl | 19 ++++++-- gui/bweb/lang/fr/tpl/config_view.tpl | 3 +- gui/bweb/lib/Bweb.pm | 46 +++++++++++++------ gui/bweb/technotes-2.3 | 1 + gui/bweb/tpl/begin.tpl | 2 +- gui/bweb/tpl/config_edit.tpl | 19 ++++++-- gui/bweb/tpl/config_view.tpl | 3 +- gui/bweb/tpl/display_user.tpl | 11 +++-- gui/debian/bweb.dirs | 5 +- gui/debian/bweb.postinst | 5 -- gui/debian/changelog | 4 ++ gui/debian/rules | 6 +-- 30 files changed, 170 insertions(+), 79 deletions(-) delete mode 100644 gui/bweb/lang/en/en.pl diff --git a/gui/bweb/INSTALL b/gui/bweb/INSTALL index b09b04cd6a..587a413a41 100644 --- a/gui/bweb/INSTALL +++ b/gui/bweb/INSTALL @@ -45,12 +45,12 @@ Bweb works well with 1.39 release or later. # get a config file mkdir -m 755 /etc/bacula chown root:bacula /etc/bacula - echo '$VAR1 = { template_dir => "/usr/share/bweb/en/tpl" };' > /etc/bacula/bweb.conf + echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf chown www-data /etc/bacula/bweb.conf # copy the bweb template file - mkdir -p /usr/share/bweb/en/tpl - install -m 644 -o root -g root bweb/lang/en/tpl/*.tpl /usr/share/bweb/en/tpl + mkdir -p /usr/share/bweb/tpl/en + install -m 644 -o root -g root bweb/lang/tpl/en/*.tpl /usr/share/bweb/tpl/en # copy the bweb graphics elements (bweb elements must reside in /bweb) mkdir /var/www/bweb @@ -62,9 +62,10 @@ Bweb works well with 1.39 release or later. to read the bconsole.conf file! You can create an bconsole group for that. -################ USE FRENCH VERSION ############################ +################ USE FRENCH/SPANISH VERSION #################### -Simply use lang/fr/tpl/*.tpl files instead of lang/en/tpl/*.tpl +Simply copy lang/fr/tpl/*.tpl files to .../tpl/fr/*.tpl and choose +your language in the configuration panel. ################ INSTALL PERL LIBRARY ########################## @@ -170,7 +171,8 @@ $VAR1 = bless( { }, 'Bweb::Autochanger' ) }, 'password' => 'xxx', - 'template_dir' => '/usr/share/bweb/en/tpl', + 'template_dir' => '/usr/share/bweb/tpl', + 'lang' => 'en', 'dbi' => 'DBI:mysql:database=bacula', 'error' => '', 'debug' => 0, @@ -263,7 +265,7 @@ chmod 700 /var/spool/bweb chown www-data /var/spool/bweb You have to remove "" from -tpl/display_job_zoom.tpl. +tpl/en/display_job_zoom.tpl. You MUST use brestore.pl -b to initialize the database, and you CAN use bfileview.pl mode=batch jobid=xxx where=/ to compute tree size. diff --git a/gui/bweb/UPGRADE b/gui/bweb/UPGRADE index 3c01889dc4..d75efde2d1 100644 --- a/gui/bweb/UPGRADE +++ b/gui/bweb/UPGRADE @@ -3,10 +3,6 @@ Upgrade from 2.2.Y to 3.0 ------------------------- - - Change your template_dir from - /path/to/bweb/tpl -> /path/to/bweb/en/tpl - (french and spanish translation doesn't change) - - Add the Date::Calc package to your perl library - Add user, new job overview and bresto tables to your catalog diff --git a/gui/bweb/install_bweb b/gui/bweb/install_bweb index 97daef2e39..c3650fff12 100755 --- a/gui/bweb/install_bweb +++ b/gui/bweb/install_bweb @@ -90,7 +90,8 @@ cat > ${CONF_DIR}/bweb.conf < '${DB_PW}', - 'template_dir' => '${SHARE_DIR}/bweb/en/tpl', + 'template_dir' => '${SHARE_DIR}/bweb/tpl', + 'lang' => 'en', 'dbi' => 'DBI:mysql:database=bacula', 'error' => '', 'debug' => 0, @@ -103,10 +104,12 @@ fi chown ${HTTP_USER} ${CONF_DIR}/bweb.conf # copy the bweb template file -if [ ! -d ${SHARE_DIR}/bweb/en/tpl ] ; then - mkdir -p ${SHARE_DIR}/bweb/en/tpl +if [ ! -d ${SHARE_DIR}/bweb/tpl/en ] ; then + mkdir -p ${SHARE_DIR}/bweb/tpl/{en,fr,es} fi -install -m 644 -o root -g root lang/en/tpl/*.tpl ${SHARE_DIR}/bweb/en/tpl +install -m 644 -o root -g root lang/tpl/en/*.tpl ${SHARE_DIR}/bweb/tpl/en +install -m 644 -o root -g root lang/tpl/es/*.tpl ${SHARE_DIR}/bweb/tpl/es +install -m 644 -o root -g root lang/tpl/fr/*.tpl ${SHARE_DIR}/bweb/tpl/fr # copy the bweb graphics elements (bweb elements must reside in /bweb) if [ ! -d ${WEB_DIR} ] ; then diff --git a/gui/bweb/lang/en/en.pl b/gui/bweb/lang/en/en.pl deleted file mode 100644 index b9d34088c4..0000000000 --- a/gui/bweb/lang/en/en.pl +++ /dev/null @@ -1,2 +0,0 @@ -s!__!!g; -print; diff --git a/gui/bweb/lang/en/tpl/begin.tpl b/gui/bweb/lang/en/tpl/begin.tpl index c097390ee4..9e4e77c69d 100644 --- a/gui/bweb/lang/en/tpl/begin.tpl +++ b/gui/bweb/lang/en/tpl/begin.tpl @@ -16,6 +16,9 @@ if (navigator.appName == 'Konqueror') { alert("Sorry at this moment, bweb works only with mozilla."); } +if ('Main' == ('_' + '_Main_' + '_')) { + document.write("Update your configuration to use the correct tpl directory (You are using devel tpl)"); +}
  • Media diff --git a/gui/bweb/lang/en/tpl/config_edit.tpl b/gui/bweb/lang/en/tpl/config_edit.tpl index 43c994d367..5fa029c7c8 100644 --- a/gui/bweb/lang/en/tpl/config_edit.tpl +++ b/gui/bweb/lang/en/tpl/config_edit.tpl @@ -32,9 +32,6 @@ graph_font: - template_dir: - - fv_write_path: stat_job_table: @@ -46,6 +43,16 @@ wiki_url: + template_dir: + + + language: + + display_log_time: checked='checked' value='on' > @@ -60,3 +67,9 @@ + + \ No newline at end of file diff --git a/gui/bweb/lang/en/tpl/config_view.tpl b/gui/bweb/lang/en/tpl/config_view.tpl index e570beb1a7..80b2e76cfd 100644 --- a/gui/bweb/lang/en/tpl/config_view.tpl +++ b/gui/bweb/lang/en/tpl/config_view.tpl @@ -12,12 +12,13 @@ email_media: Bweb Configuration config_file: - template_dir: graph_font: fv_write_path: stat_job_table: Job bconsole: wiki_url: + template_dir: + language: display_log_time: security: security acl: diff --git a/gui/bweb/lang/en/tpl/display_user.tpl b/gui/bweb/lang/en/tpl/display_user.tpl index a402d7d327..7689de3050 100644 --- a/gui/bweb/lang/en/tpl/display_user.tpl +++ b/gui/bweb/lang/en/tpl/display_user.tpl @@ -14,12 +14,12 @@ Comment: - Lang: + Language: @@ -114,4 +114,7 @@ function set_role(val) } } + + document.getElementById('lang_').selected = true; + diff --git a/gui/bweb/lang/es/tpl/ach_add.tpl b/gui/bweb/lang/es/tpl/ach_add.tpl index 0da8b618ee..0086c3335b 100644 --- a/gui/bweb/lang/es/tpl/ach_add.tpl +++ b/gui/bweb/lang/es/tpl/ach_add.tpl @@ -16,7 +16,7 @@ Pre-comando : + title='can be "sudo" or "ssh storage@storagehost"...' name='precmd'> Comando mtx : diff --git a/gui/bweb/lang/es/tpl/begin.tpl b/gui/bweb/lang/es/tpl/begin.tpl index 3ab9b02df6..cf836acecf 100644 --- a/gui/bweb/lang/es/tpl/begin.tpl +++ b/gui/bweb/lang/es/tpl/begin.tpl @@ -16,6 +16,9 @@ if (navigator.appName == 'Konqueror') { alert("Sorry at this moment, bweb works only with mozilla."); } +if ('Principal' == ('_' + '_Main_' + '_')) { + document.write("Update your configuration to use the correct tpl directory (You are using devel tpl)"); +}
  • Medios diff --git a/gui/bweb/lang/es/tpl/change_location.tpl b/gui/bweb/lang/es/tpl/change_location.tpl index 060e1938fe..5f16145bb4 100644 --- a/gui/bweb/lang/es/tpl/change_location.tpl +++ b/gui/bweb/lang/es/tpl/change_location.tpl @@ -11,23 +11,23 @@ Para: -Asunto: +Asunto: diff --git a/gui/bweb/lang/es/tpl/client_list.tpl b/gui/bweb/lang/es/tpl/client_list.tpl index ee35e44202..9fbb31e6aa 100644 --- a/gui/bweb/lang/es/tpl/client_list.tpl +++ b/gui/bweb/lang/es/tpl/client_list.tpl @@ -10,10 +10,10 @@
    - - + + - +
    diff --git a/gui/bweb/lang/es/tpl/config_edit.tpl b/gui/bweb/lang/es/tpl/config_edit.tpl index 0e09c4e59c..efc3064b13 100644 --- a/gui/bweb/lang/es/tpl/config_edit.tpl +++ b/gui/bweb/lang/es/tpl/config_edit.tpl @@ -32,9 +32,6 @@ graph_font: - template_dir: - - fv_write_path: stat_job_table: @@ -46,6 +43,16 @@ wiki_url: + template_dir: + + + language: + + display_log_time: checked='checked' value='on' > @@ -60,3 +67,9 @@ + + \ No newline at end of file diff --git a/gui/bweb/lang/es/tpl/config_view.tpl b/gui/bweb/lang/es/tpl/config_view.tpl index 92f9666465..25e3b20507 100644 --- a/gui/bweb/lang/es/tpl/config_view.tpl +++ b/gui/bweb/lang/es/tpl/config_view.tpl @@ -12,12 +12,13 @@ email_media: Configuración Bweb config_file: - template_dir: graph_font: fv_write_path: stat_job_table: Job bconsole: wiki_url: + template_dir: + language: display_log_time: security: security acl: diff --git a/gui/bweb/lang/es/tpl/display_client_stats.tpl b/gui/bweb/lang/es/tpl/display_client_stats.tpl index dc2a65cecc..f7d8dc2b4d 100644 --- a/gui/bweb/lang/es/tpl/display_client_stats.tpl +++ b/gui/bweb/lang/es/tpl/display_client_stats.tpl @@ -14,7 +14,7 @@

    Actions

    - +
    --> diff --git a/gui/bweb/lang/fr/tpl/ach_add.tpl b/gui/bweb/lang/fr/tpl/ach_add.tpl index d089349150..7465d01207 100644 --- a/gui/bweb/lang/fr/tpl/ach_add.tpl +++ b/gui/bweb/lang/fr/tpl/ach_add.tpl @@ -16,7 +16,7 @@ Pre-commande : + title='peut être "sudo" ou "ssh storage@storagehost"...' name='precmd'> commande mtx : diff --git a/gui/bweb/lang/fr/tpl/begin.tpl b/gui/bweb/lang/fr/tpl/begin.tpl index 96cf8ae31b..0ed0935adf 100644 --- a/gui/bweb/lang/fr/tpl/begin.tpl +++ b/gui/bweb/lang/fr/tpl/begin.tpl @@ -17,7 +17,7 @@ if (navigator.appName == 'Konqueror') { alert("Désolé, bweb fonctionne seulement avec mozilla."); } if ('Accueil' == ('_' + '_Main_' + '_')) { - alert("Update your configuration to use the correct tpl directory (something like /usr/share/bweb/en/tpl instead of /usr/share/bweb/tpl)"); + document.write("Update your configuration to use the correct tpl directory (You are using devel tpl)"); } @@ -38,6 +38,7 @@ if ('Accueil' == ('_' + '_Main_' + '_')) {
  • Jobs en cours
  • Prochains jobs
  • Restauration
  • +
  • Web Restore
  • Médias diff --git a/gui/bweb/lang/fr/tpl/change_location.tpl b/gui/bweb/lang/fr/tpl/change_location.tpl index 9a3b313049..3f3c76f727 100644 --- a/gui/bweb/lang/fr/tpl/change_location.tpl +++ b/gui/bweb/lang/fr/tpl/change_location.tpl @@ -11,7 +11,7 @@ To: -Subject: +Subject: diff --git a/gui/bweb/lang/fr/tpl/config_edit.tpl b/gui/bweb/lang/fr/tpl/config_edit.tpl index f8db73c91b..00fc68f512 100644 --- a/gui/bweb/lang/fr/tpl/config_edit.tpl +++ b/gui/bweb/lang/fr/tpl/config_edit.tpl @@ -32,9 +32,6 @@ graph_font: - template_dir: - - fv_write_path: stat_job_table: @@ -46,6 +43,16 @@ wiki_url: + template_dir: + + + language: + + display_log_time: checked='checked' value='on' > @@ -60,3 +67,9 @@ + + \ No newline at end of file diff --git a/gui/bweb/lang/fr/tpl/config_view.tpl b/gui/bweb/lang/fr/tpl/config_view.tpl index 3c8813453f..aeb058baa4 100644 --- a/gui/bweb/lang/fr/tpl/config_view.tpl +++ b/gui/bweb/lang/fr/tpl/config_view.tpl @@ -12,12 +12,13 @@ email_media: Configuration Bweb config_file: - template_dir: graph_font: fv_write_path: stat_job_table: Job bconsole: wiki_url: + template_dir: + language: display_log_time: security: security acl: diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 4d0f42b374..a7e4429098 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -51,7 +51,7 @@ package Bweb::Gui; =cut use HTML::Template; -our $template_dir='/usr/share/bweb/en/tpl'; +our $template_dir='/usr/share/bweb/tpl'; =head1 FUNCTION @@ -127,14 +127,15 @@ sub error this function is use to render all html codes. it takes an ref hash as arg in which all param are usable in template. - it will use global template_dir to search the template file. + it will use user template_dir then global template_dir + to search the template file. hash keys are not sensitive. See HTML::Template for more explanations about the hash ref. (it's can be quiet hard to understand) =head2 EXAMPLE - $ref = { name => 'me', age => 26 }; + $ref = { name => 'me', age => 26 }; $self->display($ref, "people.tpl"); =cut @@ -142,9 +143,11 @@ sub error sub display { my ($self, $hash, $tpl) = @_ ; - + my $dir = $self->{template_dir} || $template_dir; + my $lang = $self->{lang} || 'en'; my $template = HTML::Template->new(filename => $tpl, - path =>[$template_dir], + path =>["$dir/$lang", + $dir], die_on_bad_params => 0, case_sensitive => 0); @@ -210,6 +213,7 @@ our %k_re = ( dbi => qr/^(dbi:(Pg|mysql):(?:\w+=[\w\d\.-]+;?)+)$/i, fv_write_path => qr!^([/\w\d\.-]*)$!, template_dir => qr!^([/\w\d\.-]+)$!, debug => qr/^(on)?$/, + lang => qr/^(\w\w)?$/, email_media => qr/^([\w\d\.-]+@[\d\w\.-]+)$/, graph_font => qr!^([/\w\d\.-]+.ttf)$!, bconsole => qr!^(.+)?$!, @@ -1490,7 +1494,8 @@ sub new $self->{loginname} = CGI::remote_user(); $self->{debug} = $self->{info}->{debug}; - $Bweb::Gui::template_dir = $self->{info}->{template_dir}; + $self->{lang} = $self->{info}->{lang}; + $self->{template_dir} = $self->{info}->{template_dir}; return $self; } @@ -1498,6 +1503,9 @@ sub new sub display_begin { my ($self) = @_; + if ($self->{info}->{enable_security}) { + $self->get_roles(); # get lang + } $self->display($self->{info}, "begin.tpl"); } @@ -1761,6 +1769,13 @@ sub get_form } } + if ($what{lang}) { + my $lang = CGI::param('lang') || 'en'; + if ($lang =~ /^(\w\w)$/) { + $ret{lang} = $1; + } + } + if ($what{db_clients}) { my $filter=''; if ($what{filter}) { @@ -2907,7 +2922,7 @@ sub get_roles my $u = $self->dbh_quote($self->{loginname}); my $query = " - SELECT use_acl, rolename + SELECT use_acl, rolename, tpl FROM bweb_user JOIN bweb_role_member USING (userid) JOIN bweb_role USING (roleid) @@ -2923,8 +2938,10 @@ sub get_roles foreach my $r (@$rows) { $self->{security}->{$r->[1]}=1; } - $self->{security}->{use_acl} = $rows->[0]->[0]; + if ($rows->[0]->[2] =~ /^(\w\w)$/) { + $self->{lang} = $1; + } return 1; } @@ -3126,7 +3143,8 @@ sub users_add $self->can_do("r_user_mgnt"); # we don't quote username directly to check that it is conform - my $arg = $self->get_form(qw/username qpasswd qcomment jrolenames qcreate qcopy_username jclient_groups/) ; + my $arg = $self->get_form(qw/username qpasswd qcomment jrolenames qcreate + lang qcopy_username jclient_groups/) ; if (not $arg->{qcreate}) { $arg = $self->get_form(qw/db_roles db_usernames db_client_groups/); @@ -3150,13 +3168,14 @@ sub users_add ($self->dbh_do(" UPDATE bweb_user SET passwd=$arg->{qpasswd}, comment=$arg->{qcomment}, - use_acl=$arg->{use_acl} + use_acl=$arg->{use_acl}, tpl='$arg->{lang}' WHERE username = $u") # and (! $self->dbh_is_mysql() ) ) and $self->dbh_do(" - INSERT INTO bweb_user (username, passwd, use_acl, comment) - VALUES ($u, $arg->{qpasswd}, $arg->{use_acl}, $arg->{qcomment})"); + INSERT INTO bweb_user (username, passwd, use_acl, comment, tpl) + VALUES ($u, $arg->{qpasswd}, $arg->{use_acl}, + $arg->{qcomment}, '$arg->{lang}')"); $self->{dbh}->begin_work(); { @@ -3209,7 +3228,7 @@ sub display_user my $user = $self->dbh_quote($arg->{username}); my $userp = $self->dbh_selectrow_hashref(" - SELECT username, passwd, comment, use_acl + SELECT username, passwd, comment, use_acl, tpl FROM bweb_user WHERE username = $user "); @@ -3244,6 +3263,7 @@ ORDER BY rolename username => $userp->{username}, comment => $userp->{comment}, passwd => $userp->{passwd}, + lang => $userp->{lang}, use_acl => $userp->{use_acl}, db_client_groups => $arg->{db_client_groups}, client_group => [ values %$scg ], diff --git a/gui/bweb/technotes-2.3 b/gui/bweb/technotes-2.3 index 3c1cafb68a..f27be95817 100644 --- a/gui/bweb/technotes-2.3 +++ b/gui/bweb/technotes-2.3 @@ -1,4 +1,5 @@ 23Dec07 +ebl Each user can have a different template dir (lang). ebl WARNING: now, bweb/tpl contains main tpl files for english version, you have to use bweb/lang/en/tpl diff --git a/gui/bweb/tpl/begin.tpl b/gui/bweb/tpl/begin.tpl index 050a3a5c21..eb0f7fd85e 100644 --- a/gui/bweb/tpl/begin.tpl +++ b/gui/bweb/tpl/begin.tpl @@ -17,7 +17,7 @@ if (navigator.appName == 'Konqueror') { alert("__Sorry at this moment, bweb works only with mozilla.__"); } if ('__Main__' == ('_' + '_Main_' + '_')) { - document.write("__Update your configuration to use the correct tpl directory (something like /usr/share/bweb/en/tpl instead of /usr/share/bweb/tpl)__"); + document.write("__Update your configuration to use the correct tpl directory (You are using devel tpl)__"); } diff --git a/gui/bweb/tpl/config_edit.tpl b/gui/bweb/tpl/config_edit.tpl index ffd1aadce7..38a940ea15 100644 --- a/gui/bweb/tpl/config_edit.tpl +++ b/gui/bweb/tpl/config_edit.tpl @@ -32,9 +32,6 @@ graph_font: - template_dir: - - fv_write_path: stat_job_table: @@ -46,6 +43,16 @@ wiki_url: + template_dir: + + + __language:__ + + display_log_time: checked='checked' value='on' > @@ -60,3 +67,9 @@ + + \ No newline at end of file diff --git a/gui/bweb/tpl/config_view.tpl b/gui/bweb/tpl/config_view.tpl index dcfe3afc98..b784aa75d2 100644 --- a/gui/bweb/tpl/config_view.tpl +++ b/gui/bweb/tpl/config_view.tpl @@ -12,12 +12,13 @@ email_media: __Bweb Configuration__ config_file: - template_dir: graph_font: fv_write_path: stat_job_table: Job bconsole: wiki_url: + template_dir: + __language:__ display_log_time: __security:__ __security acl:__ diff --git a/gui/bweb/tpl/display_user.tpl b/gui/bweb/tpl/display_user.tpl index 626b97d0b9..a10ec9dee3 100644 --- a/gui/bweb/tpl/display_user.tpl +++ b/gui/bweb/tpl/display_user.tpl @@ -14,12 +14,12 @@ __Comment:__ - __Lang:__ + __Language:__ @@ -114,4 +114,7 @@ function set_role(val) } } + + document.getElementById('lang_').selected = true; + diff --git a/gui/debian/bweb.dirs b/gui/debian/bweb.dirs index ed212beadb..50a1225596 100644 --- a/gui/debian/bweb.dirs +++ b/gui/debian/bweb.dirs @@ -4,8 +4,9 @@ usr/lib/cgi-bin/bweb usr/share/doc/bweb usr/share/bweb usr/share/bweb/tpl -usr/share/bweb/fr/tpl -usr/share/bweb/es/tpl +usr/share/bweb/tpl/en +usr/share/bweb/tpl/fr +usr/share/bweb/tpl/es usr/share/bweb/html usr/share/perl5 var/spool/bweb diff --git a/gui/debian/bweb.postinst b/gui/debian/bweb.postinst index 381d083309..a62117bf14 100644 --- a/gui/debian/bweb.postinst +++ b/gui/debian/bweb.postinst @@ -42,8 +42,3 @@ if [ "$1" = "configure" ] ; then fi -if [ "$1" = "upgrade" ] ; then - echo "If you are using postgresql, you have to load /usr/share/bweb/upgrade-2.0_2.2_postgresql.sql in your database" - echo "postgres@localhost:~$ psql -U bacula bacula < /usr/share/bweb/upgrade-2.0_2.2_postgresql.sql" - echo -fi diff --git a/gui/debian/changelog b/gui/debian/changelog index 1fd1b6091e..c98a05ad76 100644 --- a/gui/debian/changelog +++ b/gui/debian/changelog @@ -1,4 +1,8 @@ bweb (2.2.7-1) stable; urgency=low + * Move /usr/share/bweb/fr/tpl to /usr/share/bweb/tpl/fr + * Move /usr/share/bweb/es/tpl to /usr/share/bweb/tpl/es + * Move default /usr/share/bweb/tpl to /usr/share/bweb/tpl/en + * Each user can have his own language * Add new balloon view * Add new btime module * Add a new scheduled view, you MUST have Date::Calc module diff --git a/gui/debian/rules b/gui/debian/rules index fc7afc372f..6d81b85414 100755 --- a/gui/debian/rules +++ b/gui/debian/rules @@ -60,9 +60,9 @@ install-indep: install -m 755 bweb/cgi/bresto.pl debian/bweb/usr/lib/cgi-bin/bweb install -m 755 bweb/cgi/bfileview.pl debian/bweb/usr/lib/cgi-bin/bweb install -m 755 bweb/cgi/bconsole.pl debian/bweb/usr/lib/cgi-bin/bweb - install -m 644 bweb/tpl/*.tpl debian/bweb/usr/share/bweb/tpl - install -m 644 bweb/lang/fr/tpl/*.tpl debian/bweb/usr/share/bweb/fr/tpl - install -m 644 bweb/lang/es/tpl/*.tpl debian/bweb/usr/share/bweb/es/tpl + install -m 644 bweb/lang/en/tpl/*.tpl debian/bweb/usr/share/bweb/tpl/en + install -m 644 bweb/lang/fr/tpl/*.tpl debian/bweb/usr/share/bweb/tpl/fr + install -m 644 bweb/lang/es/tpl/*.tpl debian/bweb/usr/share/bweb/tpl/es install -m 644 bweb/html/*.js debian/bweb/usr/share/bweb/html install -m 644 bweb/html/*.css debian/bweb/usr/share/bweb/html install -m 644 bweb/html/*.png debian/bweb/usr/share/bweb/html -- 2.39.5