Web installer displays a mix between translated languages and English. That is ugly, because installing is the first contact with Koha. Tested with 17.05 de-DE and it-IT (both 100% translated) (Note: Results below are the similar for both it-IT and de-DE, same parts not translated) To test: Download po files from http://translate.koha-community.org/de/17.05/ or http://translate.koha-community.org/it/17.05/ Install the languages cd misc/translator perl translate -v install it-IT or perl translate -v install de-DE Drop database Create database Restart memcached and plack Go to staff client (calls web installer), enter database user and pw Select one of the languages de-DE or it-IT, Continue to the next step Result: ------------ Web installer › Check Perl dependencies Alle erforderlichen Perl-Module sind installiert. Alle erforderlichen Abhängigkeiten sind installiert. Continue to the next step ------------ Continue... Result: ------------ Web installer › Database settings Datenbankeinstellungen: Database type : mysql Database name : koha_kohadev Database host : localhost Database port : 3306 (probably okay if blank) Database user : koha_kohadev Continue to the next step ------------- Continue... Result: Similar as above Continue: Result: ------------- Web installer › Set up database Jetzt sind wir soweit, dass die Datenbanktabellen angelegt und mit Beispieldaten gefüllt werden können. Continue to the next step ------------- Continue... (Result similar) Continue... (Result similar) Continue... Result (this time title translated, but not the text): ----------- MARC-Format auswählen 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. Marc21 Continue to the next step ------------ Continue... Result: ----------- Web installer › Selecting default settings MARC-Frameworks: MARC21 Mandatory Select none (but toggles to 'Alle auswählen' (...) Text at the end in English: 'When you've made aour selections.... Import Result: ------------ (...) Optional Daten hinzugefügt (first word English) Mandatory Daten hinzugefügt (same) At the end: Basic installation complete. In the next steps you will be guided through some basic requirements like defining Koha user with all administrative privileges (superlibrarian). Sie können die Koha Community unterstützen, indem Sie Ihre Nutzungsdaten teilen. If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the Administration module. Set up some of Koha's basic requirements ------------ Then: ------------ Web installer › Installation complete Gratulation, die Installation ist abgeschlossen If this page does not redirect in 10 seconds, start onboarding process. ------------ Then in forms: Only field labels are translated, but not h3 tiltes and text For the first time, button is translated ('Bestätigen') Then: Web installer › Create a new circulation rule Administrator account created! Form fields translated Then finally: ----------- Web installer › Complete Ausleihregel erstellt! Congratulations you have finished and are ready to use Koha Koha nun benutzen ----------- More findings: - Some of the strings are not picked for translation (are not in the po files) - Some of the strings are in the po files, but seem not to be applied while installing
For the titles, we have (e.g step1.tt): <title>Koha › Web installer › [% UNLESS ( language ) %] Choose your language [% END %] [% IF ( language ) %] [% UNLESS ( checkmodule ) %] [% IF ( missing_modules ) %] Perl modules missing [% END %] [% IF ( problems ) %] Perl version obsolete [% END %] [% END %] Check Perl dependencies [% END %] </title> We are inside HTMLtags, that's wrong: https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolkit_markup_inside_HTML
Created attachment 63573 [details] [review] Bug 18629 - Web installer 17.05 not properly translatable Fix for step1.tt Work in progress. Comments welcome.
Setting to 'Needs Signoff' for the changes in step1.tt To test: - Create po files - Verify that title and button text are picked by translator and appear in po file For other issues: Could it be that there were string changes since latest translations were uploaded to translate.koha-community.com ? BTW: Will bi back in about 8 hours
Found some more issues...
Created attachment 63679 [details] [review] Bug 18629 - Web installer 17.05 not properly translatable Fix for step1.tt To test: - Create po files - Verify that title and button text are picked by translator and appear in po file - Verify that text in po files is not fragmented Work in progress. Comments welcome.
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. The result in translations is much less than ideal, and it makes a bad impression not only for new Koha users or for libraries interested in Koha.
Created attachment 63741 [details] [review] 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).
Created attachment 63742 [details] [review] 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).
Created attachment 63759 [details] [review] 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)
Hi Marc When running perl translate create aa-AA I keep getting: >Warning: Can't determine original templates' charset, defaulting to UTF-8 >Warning: Charset Out defaulting to UTF-8 >Removing empty file /home/vagrant/kohaclone/misc/translator/po/aa-AA-staff-prog.po >I UTF-8 O UTF-8 at /home/vagrant/kohaclone/misc/translator/tmpl_process3.pl line 345. >msgmerge: error while opening "/home/vagrant/kohaclone/misc/translator/po/aa-AA-staff-prog.po" for reading: No such file or directory The equivalent output happens for all of the other aa-AA files. Do you have any ideas as to why this may be happening? as I cannot find any useful answers online
(In reply to Alex Buckley from comment #10) > Hi Marc > > When running > perl translate create aa-AA I keep getting: > > >Warning: Can't determine original templates' charset, defaulting to UTF-8 > >Warning: Charset Out defaulting to UTF-8 > >Removing empty file /home/vagrant/kohaclone/misc/translator/po/aa-AA-staff-prog.po > >I UTF-8 O UTF-8 at /home/vagrant/kohaclone/misc/translator/tmpl_process3.pl line 345. > >msgmerge: error while opening "/home/vagrant/kohaclone/misc/translator/po/aa-AA-staff-prog.po" for reading: No such file or directory > > The equivalent output happens for all of the other aa-AA files. > > Do you have any ideas as to why this may be happening? as I cannot find any > useful answers online On my vm, I do: marc@debian8vm:~/koha/misc/translator$ perl translate create aa-AA I get the same warnings about the charset and the message about revoming an emty file However I do not get the error about opening a file. Does the folder /home/vagrant/kohaclone/misc/translator/po exist?
yes the folder /home/vagrant/kohaclone/misc/translator/po does exist
(In reply to Alex Buckley from comment #12) > yes the folder /home/vagrant/kohaclone/misc/translator/po does exist Maybe an issue with permissions?
Or maybe an issue with devbox? Can you install other (existing) languages? See: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client#Installing_additional_languages_before_Koha_installation_in_the_kohadevbox_development_environment
Hi Marc Thanks for the suggestions. So the permissions are fine with the po directory having the following correct permissions: drwxr-xr-x Whilst I can install existing languages using the command: sudo env KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml PERL5LIB=/home/vagrant/kohaclone perl translate install fr-FR To install French for example, which worked successfully
What happens if you do the following? sudo env KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml PERL5LIB=/home/vagrant/kohaclone perl translate create aa-AA
Ah brilliant thanks Marc Although it is displaying the same output as before (see below) the files have actually been created this time. Thanks very much I will test your patches now >Warning: Can't determine original templates' charset, defaulting to UTF-8 >Warning: Charset Out defaulting to UTF-8 >Removing empty file /home/vagrant/kohaclone/misc/translator/po/aa-AA-staff-prog.po >I UTF-8 O UTF-8 at /home/vagrant/kohaclone/misc/translator/tmpl_process3.pl line 345.
Created attachment 63768 [details] [review] 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) Followed test plan worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
I do not understand how using txt_continue is helping translators: Before the patch: msgid "Continue to the next step" After the patch: msgid "%s %sContinue to the next step%s %s"
(In reply to Jonathan Druart from comment #19) > I do not understand how using txt_continue is helping translators: > > Before the patch: > msgid "Continue to the next step" > > After the patch: > msgid "%s %sContinue to the next step%s %s" My intention was to have repeating test at one place, but you are right, the result in the po file is not what we want, and isolating with div tags does not work here.
Created attachment 64274 [details] [review] Bug 18629: (followup) Plain text "Continue..." instead of BLOCK Remove [% BLOCK txt_continue %]Continue to the next step[% END %] ...and restore original text See comment #19 and comment #20
Hope it's OK to set back to SO.
Marc, if you plan to provide new patches to fix translations I think it would be good to have the "before" and "after" msgid, it would be much more easier to understand what to test.
Before and after: msgid "Database name : " => OK Before: msgid "%s (probably OK if blank)" After: msgid "(probably okay if blank)" => This may remove flexibility in some languages?
(In reply to Jonathan Druart from comment #24) > Before and after: > msgid "Database name : " > > => OK > > Before: > msgid "%s (probably OK if blank)" > > After: > msgid "(probably okay if blank)" > > => This may remove flexibility in some languages? I do not think that this is a big issue.
Created attachment 66648 [details] [review] 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>
Created attachment 66649 [details] [review] Bug 18629: (followup) Plain text "Continue..." instead of BLOCK Remove [% BLOCK txt_continue %]Continue to the next step[% END %] ...and restore original text See comment #19 and comment #20 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.11, thanks to everybody involved!
Enhancement Bug 18665 not pushed to 17.05.x