Bugzilla – Attachment 63742 Details for
Bug 18629
Translatability: Fix problems with web installer 17.05
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18629 - Translatability: Fix problems with web installer 17.05
Bug-18629---Translatability-Fix-problems-with-web-.patch (text/plain), 15.06 KB, created by
Marc Véron
on 2017-05-26 12:30:03 UTC
(
hide
)
Description:
Bug 18629 - Translatability: Fix problems with web installer 17.05
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-05-26 12:30:03 UTC
Size:
15.06 KB
patch
obsolete
>From 9c75a6781af20bbad4f6976a27adc81e75e78afc Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >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 | 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 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' %] > <title>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 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' %]<title>Koha › Web installer › Database settings</title> > [% INCLUDE 'installer-doc-head-close.inc' %] > </head> >@@ -11,11 +13,11 @@ > <h2>Web installer › Database settings</h2> > <h3>Database settings:</h3> > <ul> >- <li><em>Database type : </em> <code>[% dbms %]</code></li> >- <li><em>Database name : </em> <code>[% dbname %]</code></li> >- <li><em>Database host : </em> <code>[% hostname %]</code></li> >- <li><em>Database port : </em> <code>[% port %]</code> (probably okay if blank)</li> >- <li><em>Database user : </em> <code>[% user %]</code></li> >+ <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 ) %] >@@ -24,23 +26,23 @@ > <div class="alert alert-success" role="alert"><p>Connection established.</p></div> > [% IF ( checkdatabasecreated ) %] > <ul> >- <li>Database <code>[% dbname %]</code> exists.</li> >+ <li>Database [% dbname | $HtmlTags tag=>'code'%] exists.</li> > [% IF ( checkgrantaccess ) %] >- <li>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</li> >+ <li>User [% user | $HtmlTags tag=>'code' %] has all required privileges on database [% dbname | $HtmlTags tag=>'code' %].</li> > </ul> > [% ELSE %] > </ul> >- <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code> </p> >- <p class="tip"> Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %] >- <a href="http://dev.mysql.com/doc/refman/4.1/en/grant.html"> >+ <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"> >+ <a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">PostgreSQL</a> > [% END %] >- this page</a>. User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code> > </p> > [% END %] > [% ELSE %] >- <div class="alert alert-danger" role="alert"><p>No database named <code>[% dbname %]</code> detected.</p></div> >+ <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 %] >@@ -48,23 +50,22 @@ > <div class="tip"> > <ul> > <li>Check that your database is running.</li> >- <li>Check your database settings in <code>koha-conf.xml</code>. </li> >- <li>Check the hostname setting in <code>koha-conf.xml</code>. >- Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</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 and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again. >+ <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="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> > [% 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="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 dbconnection %] > </div> <!-- / #installer-step2 --> >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 34d5e7d..cf954f7 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' %] > > <title>Koha › Web installer › >@@ -32,7 +33,10 @@ > [% END %] > </title> > >-[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/installer/onboarding.pl">[% END %] >+[% 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> > >@@ -44,9 +48,7 @@ > [% IF ( finish ) %] > <h2>Web installer › Installation complete</h2> > <h3>Congratulations, installation complete</h3> >- <p> >- If this page does not redirect in 10 seconds, <a href="/cgi-bin/koha/installer/onboarding.pl">start onboarding process</a>. >- </p> >+ <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 ) %] >@@ -69,7 +71,7 @@ > </p> > [% END %] > [% END %] >- <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 choosemarc %] > >@@ -156,7 +158,15 @@ > [% IF ( addframeworks ) %] > <h2>Web installer › Default data loaded</h2> > [% FOREACH lis IN list %] >- <h3>[% lis.level FILTER ucfirst %] data added</h3> >+ [% 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> >@@ -198,7 +208,7 @@ > <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="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 %] > [% END # / IF importdatastructure %] >@@ -209,7 +219,7 @@ > <form action="install.pl" method="post"> > <input type="hidden" name="step" value="3" /> > <input type="hidden" name="op" value="importdatastructure" /> >- <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 # / proposeimport %] > >@@ -221,7 +231,7 @@ > [% ELSE %] > <h2>Web installer › Install basic configuration settings</h2> > <p>We are ready to do some basic configuration.</p> >- <p> <a href="install.pl?step=3&op=choosemarc" class="btn btn-primary">Continue to the next step</a> </p> >+ <p><a href="install.pl?step=3&op=choosemarc" class="btn btn-primary">[%- INCLUDE txt_continue -%]</a></p> > [% END %] > [% END # / IF default %] > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18629
:
63573
|
63679
|
63741
|
63742
|
63759
|
63768
|
64274
|
66648
|
66649