From bd81047f42164328654b9fb65d21de7ec8532b3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Fri, 26 May 2017 13:32:06 +0200 Subject: [PATCH] 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 Signed-off-by: Jonathan Druart --- .../prog/en/modules/installer/step1.tt | 8 ++-- .../prog/en/modules/installer/step2.tt | 39 ++++++++++--------- .../prog/en/modules/installer/step3.tt | 28 ++++++++----- 3 files changed, 43 insertions(+), 32 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt index 10e5589253..d17f323b59 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt @@ -1,3 +1,4 @@ +[% BLOCK txt_continue %]Continue to the next step[% END %] [% INCLUDE 'doc-head-open.inc' %] Koha › Web installer › [% UNLESS ( language ) %] Choose your language [% END %] @@ -46,8 +47,7 @@ [% END %] </select> </div> - - <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p> + <p><input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /></p> </form> [% END %] @@ -55,7 +55,7 @@ [% UNLESS ( checkmodule ) %] [% IF ( missing_modules ) %] <h2>Web installer › Perl modules missing</h2> - <p>Some Perl modules are missing. <span class="label label-danger">Required</span> modules <b>must</b> be installed before you may continue.<br /> + <p>Some Perl modules are missing. <span class="label label-danger">Important: </span>Required modules must be installed before you may continue.<br /> <ul> [% FOREACH missing_module IN missing_modules %] <li><strong>[% missing_module.name %]</strong> [% IF ( missing_module.require ) %]<span class="label label-danger">Required</span>[% END %] @@ -88,7 +88,7 @@ <form name="checkmodules" role="form" action="install.pl"> <input type="hidden" name="step" value="2" /> - <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p> + <p> <input value="[% INCLUDE txt_continue %]" class="btn btn-primary" type="submit" /> </p> </form> [% END # IF checkmodule%] [% END # IF language %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt index ba44fd4b9e..b379a1b603 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt @@ -1,3 +1,5 @@ +[% USE HtmlTags %] +[% BLOCK txt_continue %]Continue to the next step[% END %] [% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › Database settings [% INCLUDE 'installer-doc-head-close.inc' %] @@ -11,11 +13,11 @@

Web installer › Database settings

Database settings:

    -
  • Database type : [% dbms %]
  • -
  • Database name : [% dbname %]
  • -
  • Database host : [% hostname %]
  • -
  • Database port : [% port %] (probably okay if blank)
  • -
  • Database user : [% user %]
  • +
  • Database type: [%- dbms | $HtmlTags tag=>'code' -%]
  • +
  • Database name: [%- dbname | $HtmlTags tag=>'code' -%]
  • +
  • Database host: [%- hostname | $HtmlTags tag=>'code'-%]
  • +
  • Database port: [%- port| $HtmlTags tag=>'code' -%] (probably okay if blank)
  • +
  • Database user: [%- user | $HtmlTags tag=>'code' -%]
[% IF ( dbconnection ) %] @@ -24,23 +26,23 @@ [% IF ( checkdatabasecreated ) %]
    -
  • Database [% dbname %] exists.
  • +
  • Database [% dbname | $HtmlTags tag=>'code'%] exists.
  • [% IF ( checkgrantaccess ) %] -
  • User [% user %] has all required privileges on database [% dbname %].
  • +
  • User [% user | $HtmlTags tag=>'code' %] has all required privileges on database [% dbname | $HtmlTags tag=>'code' %].
[% ELSE %] -

user [% user %] doesn't have enough privilege on database [% dbname %]

-

Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %] - +

User [% user | $HtmlTags tag=>'code' %] doesn't have enough privilege on database [% dbname | $HtmlTags tag=>'code'%].

+

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' %].

+

Need help? See manual for [% IF ( mysql ) %] + MySQL [% ELSE %] - + PostgreSQL [% END %] - this page. User [% user %] must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on [% dbname %]

[% END %] [% ELSE %] - +

Please create the database before continuing.

[% END %] [% ELSE %] @@ -48,23 +50,22 @@
  • Check that your database is running.
  • -
  • Check your database settings in koha-conf.xml.
  • -
  • Check the hostname setting in koha-conf.xml. - Some database servers require 127.0.0.1 rather than localhost.
  • +
  • Check your database settings in [% 'koha-conf.xml' | $HtmlTags Tag=>'code' %].
  • +
  • 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' %].
-

Please correct these errors and start the installer again. +

Please correct these errors. Then start the installer again. [% END %] [% UNLESS ( error ) %] -

+

[% END %] [% ELSE %]
-

+

[% END # / IF dbconnection %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt index 34d5e7dd7e..a19147fdbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -1,3 +1,4 @@ +[% BLOCK txt_continue %]Continue to the next step[% END %] [% INCLUDE 'doc-head-open.inc' %] Koha › Web installer › @@ -32,7 +33,10 @@ [% END %] -[% IF ( finish ) %][% END %] +[% IF ( finish ) %] + [%- metacontent= '10; url=/cgi-bin/koha/installer/onboarding.pl' -%] + +[% END %] [% INCLUDE 'installer-doc-head-close.inc' %] @@ -44,9 +48,7 @@ [% IF ( finish ) %]

Web installer › Installation complete

Congratulations, installation complete

-

- If this page does not redirect in 10 seconds, start onboarding process. -

+

This page will redirect in 10 seconds. If not, click here to start onboarding process.

[% END %] [% IF ( choosemarc ) %] @@ -69,7 +71,7 @@

[% END %] [% END %] -

+

[% END # / IF choosemarc %] @@ -156,7 +158,15 @@ [% IF ( addframeworks ) %]

Web installer › Default data loaded

[% FOREACH lis IN list %] -

[% lis.level FILTER ucfirst %] data added

+ [% IF lis.level == 'mandatory' %] +

Mandatory data added

+ [% ELSIF lis.level == 'optional' %] +

Optional data added

+ [% ELSIF lis.level == 'mysql' %] +

MySQL data added

+ [% ELSE %] +

[% lis.level FILTER ucfirst %] data added

+ [% END %]
    [% FOREACH fwklis IN lis.fwklist %]
  • @@ -198,7 +208,7 @@

    Database tables created

    -

    +

    [% END %] [% END # / IF importdatastructure %] @@ -209,7 +219,7 @@
    -

    +

    [% END # / proposeimport %] @@ -221,7 +231,7 @@ [% ELSE %]

    Web installer › Install basic configuration settings

    We are ready to do some basic configuration.

    -

    Continue to the next step

    +

    [% INCLUDE txt_continue %]

    [% END %] [% END # / IF default %] -- 2.39.5