Koha/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.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

282 lines
14 KiB
Text

[% BLOCK txt_continue %]Continue to the next step[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Web installer &rsaquo;
[% IF ( proposeimport ) %]
Set up database
[% END %]
[% IF ( importdatastructure ) %]
[% IF ( error ) %]
Error creating database tables
[% ELSE %]
Database tables created
[% END %]
[% END %]
[% IF ( default ) %]
[% IF ( upgrading ) %]
Update database
[% ELSE %]
Install basic configuration settings
[% END %]
[% END %]
[% IF ( choosemarc ) %]
Select your MARC flavor
[% END %]
[% IF ( selectframeworks ) %]
Selecting default settings
[% END %]
[% IF ( addframeworks ) %]
Default data loaded
[% END %]
[% IF ( finish ) %]
Installation complete
[% END %]
</title>
[% IF ( finish ) %]
[%- metacontent= '10; url=/cgi-bin/koha/installer/onboarding.pl' -%]
<meta http-equiv="refresh" content="[% metacontent %]">
[% END %]
[% INCLUDE 'installer-doc-head-close.inc' %]
</head>
<body id="installer" class="installer">
<div class="container-fluid">
<div class="row">
<div id="installer-step3" 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>
[% IF ( finish ) %]
<h2>Web installer &rsaquo; Installation complete</h2>
<h3>Congratulations, installation complete</h3>
<p>This page will redirect in 10 seconds. <a href="/cgi-bin/koha/installer/onboarding.pl">If not, click here to start onboarding process.</a></p>
[% END %]
[% IF ( choosemarc ) %]
<h2>Select your MARC flavor</h2>
<form name="frameworkselection" method="post" action="install.pl">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="selectframeworks" />
<p>MARC stands for Machine Readable Cataloging. A MARC record contains bibliographic information about an item. MARC21 is used globally, whereas UNIMARC tends to be used in Europe. </p>
[% FOREACH flavourloo IN flavourloop %]
[% IF ( flavourloo.label == "Unimarc") %]
<p>
<label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]</label>
</p>
[% ELSE %]
<p>
<label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %]</label>
</p>
[% END %]
[% END %]
<p><input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /></p>
</form>
[% END # / IF choosemarc %]
[% IF ( selectframeworks ) %]
<h2>Web installer &rsaquo; Selecting default settings</h2>
<form name="frameworkselection" method="post" action="install.pl">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="addframeworks" />
[% IF ( frameworksloop ) %]
<h3>MARC frameworks: [% marcflavour %]</h3>
[% IF ( en_marc_frameworks ) %]
<h4><span class="error">No MARC frameworks are available for your language.
Defaulting to the frameworks supplied for English (en)<span></h4>
[% END %]
[% FOREACH frameworksloo IN frameworksloop %]
<h4>[% frameworksloo.label %]</h4>
<div class="checkboxes">
<p>
<a class="selectall [% frameworksloo.label FILTER lower %]" href="#">Select all</a>
<a class="deselectall [% frameworksloo.label FILTER lower %]" href="#">Select none</a>
</p>
[% FOREACH framework IN frameworksloo.frameworks %]
<div class="checkbox">
<label>
[% IF ( framework.checked ) %]
<input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" checked="checked" />
[% ELSE %]
<input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
[% END %]
[% framework.fwkdescription %]
<em>([% framework.fwkname %])</em>
</label>
</div>
<hr />
[% END # / FOREACH framework %]
</div>
[% END # / FOREACH frameworksloo %]
[% END # / IF frameworkdsloop %]
<h3>Other data</h3>
[% IF ( en_sample_data ) %]
<h4><span class="error">No sample data and settings are available for your language.
Defaulting to the samples supplied for English (en)<span></h4>
[% END %]
[% FOREACH levelloo IN levelloop %]
<h4>[% levelloo.label %]</h4>
<div class="checkboxes">
<p>
<a class="selectall [% levelloo.label FILTER lower %]" href="#">Select all</a>
<a class="deselectall [% levelloo.label FILTER lower %]" href="#">Select none</a>
</p>
[% FOREACH framework IN levelloo.frameworks %]
<div class="checkbox">
<label for="[% framework.fwkname %]">
[% IF ( framework.checked ) %]
<input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]" checked="checked" />
[% ELSE %]
<input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]" />
[% END %]
[% framework.fwkdescription %]
<em>([% framework.fwkname %])</em>
</label>
</div> <!-- /div.checkbox -->
[% END # / FOREACH framework %]
</div>
[% END # / FOREACH levelloo %]
<p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete. Please be patient.</p>
<p><input type="submit" value="Import" class="btn btn-primary" /></p>
</form>
[% END # / IF selectframeworks %]
[% IF ( addframeworks ) %]
<h2>Web installer &rsaquo; Default data loaded</h2>
[% FOREACH lis IN list %]
[% IF lis.level == 'mandatory' %]
<h3>Mandatory data added</h3>
[% ELSIF lis.level == 'optional' %]
<h3>Optional data added</h3>
[% ELSIF lis.level == 'mysql' %]
<h3>MySQL data added</h3>
[% ELSE %]
<h3>[% lis.level FILTER ucfirst %] data added</h3>
[% END %]
<ul>
[% FOREACH fwklis IN lis.fwklist %]
<li>
[% fwklis.fwkname %]
[% IF ( fwklis.error ) %]<p class="bg-danger">[% fwklis.error %]</p>[% END %]
</li>
[% END %]
</ul>
[% END %]
<h3>Basic installation complete.</h3>
<p>In the next steps you will be guided through some basic requirements like defining Koha user with all administrative privileges (superlibrarian).</p>
<form action="/cgi-bin/koha/installer/install.pl" method="post" name="finish">
<h4>
You can help the Koha community by sharing your statistics with us.
</h4>
<p>
If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the Administration module.
</p>
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="finish" />
<p>
<input value="Set up some of Koha's basic requirements" class="btn btn-primary" type="submit" />
</p>
</form>
[% END # / IF addframeworks %]
[% IF ( importdatastructure ) %]
[% IF ( error ) %]
<p>The following error occurred while importing the database structure:</p>
<div class="alert alert-warning"><p>[% error %] </p></div>
<p>Please contact your system administrator</p>
[% ELSE %]
<h2>Web installer &rsaquo; Success</h2>
<div class="alert alert-success"><p>Database tables created</p></div>
<form action="install.pl" method="post">
<input type="hidden" name="step" value="3" />
<p><input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /></p>
</form>
[% END %]
[% END # / IF importdatastructure %]
[% IF ( proposeimport ) %]
<h2>Web installer &rsaquo; Set up database</h2>
<p>Now we're ready to create the database tables and fill them with some default data.</p>
<form action="install.pl" method="post">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="importdatastructure" />
<p><input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /></p>
</form>
[% END # / proposeimport %]
[% IF ( default ) %]
[% IF ( upgrading ) %]
<h2>Web installer &rsaquo; Update database</h2>
<p>We are upgrading from Koha [% dbversion %] to [% kohaversion %]</p>
<p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
[% ELSE %]
<h2>Web installer &rsaquo; Install basic configuration settings</h2>
<p>We are ready to do some basic configuration.</p>
<p><a href="install.pl?step=3&amp;op=choosemarc" class="btn btn-primary">[% INCLUDE txt_continue %]</a></p>
[% END %]
[% END # / IF default %]
[% IF ( updatestructure ) %]
<h2>Updating database structure</h2>
[% IF ( has_update_succeeds ) %]
<p>Update report :</p>
<ul>
[% FOREACH update_repor IN update_report %]
<li>[% update_repor.line |html %]</li>
[% END %]
</ul>
[% END %]
[% IF ( has_update_errors ) %]
<p>Update errors :</p>
<ul>
[% FOREACH update_error IN update_errors %]
<li class="update_error">[% update_error.line |html %]</li>
[% END %]
</ul>
[% END %]
[% UNLESS ( has_update_errors ) %]
<p>Everything went okay. Update done.</p>
[% END %]
<p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
[% END # / IF updatestructure %]
</div> <!-- / #installer-step3 -->
</div> <!-- / .row -->
[% IF ( selectframeworks ) %]
<script type="text/javascript">
$(document).ready(function(){
$(".selectall,.deselectall").on("click",function(e){
e.preventDefault();
var container = $(this).parent().parent();
if( $(this).hasClass("selectall") ){
var state = true;
} else {
var state = false;
}
$( container ).find("input").prop("checked", state);
$( container ).find(".selectall,.deselectall").toggle();
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]