Koha/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt
Marc Véron bd81047f42 Bug 18629 - Translatability: Fix problems with web installer 17.05
The new web installer for 17.05 has a great new design - but it has a lot of
translatability issues. Some strings are not picked for translations,
some expose the content of tt directives, and others are splitted by
html tags, resulting in small text fragments that are not easy to translate.

This patch weeds out such translation problems for step1.tt, step2.tt and
step3.tt

To test:
- Apply patch (on top of Bug 18665 because of html tags inside of
  tt directives in step2.tt)
- Prepare a fresh install (drop database, create database)
- Walk through the installation process and verify that it works as before
- Verify that string changes (in English) make sense
- Create a translation( cd misc/translator, then perl translate create aa-AA)
  then: vim po/aa-AA-staff-prog.po and search for: /installer\/step
  Verify that strings for step1.tt, step2.tt, step3.tt are not fragmented,
  do not contain [%%, and are easily translatable (make sense without having
  to search in source files for context).

(Amended to remove some superfluous chomps 2017-06-27 mv)

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-30 16:43:34 -03:00

74 lines
4.9 KiB
Text

[% USE HtmlTags %]
[% BLOCK txt_continue %]Continue to the next step[% END %]
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Database settings</title>
[% INCLUDE 'installer-doc-head-close.inc' %]
</head>
<body id="installer" class="installer">
<div class="container-fluid">
<div class="row">
<div id="installer-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
<h1 id="logo"><a href="#">Koha</a></h1>
<h2>Web installer &rsaquo; Database settings</h2>
<h3>Database settings:</h3>
<ul>
<li><em>Database type: </em> [%- dbms | $HtmlTags tag=>'code' -%]</li>
<li><em>Database name: </em> [%- dbname | $HtmlTags tag=>'code' -%]</li>
<li><em>Database host: </em> [%- hostname | $HtmlTags tag=>'code'-%]</li>
<li><em>Database port: </em> [%- port| $HtmlTags tag=>'code' -%] (probably okay if blank)</li>
<li><em>Database user: </em> [%- user | $HtmlTags tag=>'code' -%]</li>
</ul>
[% IF ( dbconnection ) %]
<form name="checkdbparameters" method="post" action="install.pl">
[% IF ( checkdatabaseaccess ) %]
<div class="alert alert-success" role="alert"><p>Connection established.</p></div>
[% IF ( checkdatabasecreated ) %]
<ul>
<li>Database [% dbname | $HtmlTags tag=>'code'%] exists.</li>
[% IF ( checkgrantaccess ) %]
<li>User [% user | $HtmlTags tag=>'code' %] has all required privileges on database [% dbname | $HtmlTags tag=>'code' %].</li>
</ul>
[% ELSE %]
</ul>
<p class="error">User [% user | $HtmlTags tag=>'code' %] doesn't have enough privilege on database [% dbname | $HtmlTags tag=>'code'%].</p>
<p class="tip">Ask for or make a change in the user's privileges. User [% user | $HtmlTags tag=>'code' %] must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on database [% dbname | $HtmlTags tag=>'code' %].</p>
<p>Need help? See manual for [% IF ( mysql ) %]
<a href="http://dev.mysql.com/doc/refman/4.1/en/grant.html">MySQL</a>
[% ELSE %]
<a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">PostgreSQL</a>
[% END %]
</p>
[% END %]
[% ELSE %]
<div class="alert alert-danger" role="alert"><p>No database named [% dbname | $HtmlTags tag=>'code' %] detected.</p></div>
<p>Please create the database before continuing.</p>
[% END %]
[% ELSE %]
<div class="alert alert-warning" role="alert">[% error %] : [% message %]</div>
<div class="tip">
<ul>
<li>Check that your database is running.</li>
<li>Check your database settings in [% 'koha-conf.xml' | $HtmlTags Tag=>'code' %].</li>
<li>Check the hostname setting in [% INCLUDE txt_kohaconf_xml %]. Some database servers require [% '127.0.0.1' | $HtmlTags tag=>'code' %] rather than [% 'localhost' | $HtmlTags tag=>'code' %].</li>
</ul>
</div>
<p>Please correct these errors. <a href="/cgi-bin/koha/installer/install.pl">Then start the installer again.</a>
[% END %]
[% UNLESS ( error ) %]
<input type="hidden" name="step" value="3" />
<p><input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /></p>
[% END %]
</form>
[% ELSE %]
<form name="checkinformation" method="post" action="install.pl">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="checkdb" value="1" />
<p><input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /> </p>
</form>
[% END # / IF dbconnection %]
</div> <!-- / #installer-step2 -->
</div> <!-- / .row -->
[% INCLUDE 'intranet-bottom.inc' %]