From 71c28bcf801f5ed410d5b24c590fd25f506d4291 Mon Sep 17 00:00:00 2001
From: =?UTF-8?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).
---
.../prog/en/modules/installer/step1.tt | 8 ++---
.../prog/en/modules/installer/step2.tt | 39 +++++++++++-----------
.../prog/en/modules/installer/step3.tt | 18 +++++-----
3 files changed, 34 insertions(+), 31 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 10e5589..b11eea4 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 %]
-
-
+
[% END %]
@@ -55,7 +55,7 @@
[% UNLESS ( checkmodule ) %]
[% IF ( missing_modules ) %]
Web installer › Perl modules missing
-
Some Perl modules are missing. Required modules must be installed before you may continue.
+
Some Perl modules are missing. Important: Required modules must be installed before you may continue.
[% FOREACH missing_module IN missing_modules %]
[% missing_module.name %] [% IF ( missing_module.require ) %]Required[% END %]
@@ -88,7 +88,7 @@
[% 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 ba44fd4..9b2cb78 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' %]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)
. User [% user %] must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on [% dbname %]
[% END %]
[% ELSE %]
-
No database named [% dbname %] detected.
+
No database named [% dbname | $HtmlTags tag=>'code' %] detected.
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' %].