View | Details | Raw Unified | Return to bug 24973
Collapse All | Expand All

(-)a/C4/Installer.pm (-1 / +7 lines)
Lines 312-317 moved to a different method. Link Here
312
312
313
sub load_sql_in_order {
313
sub load_sql_in_order {
314
    my $self = shift;
314
    my $self = shift;
315
    my $langchoice = shift;
315
    my $all_languages = shift;
316
    my $all_languages = shift;
316
    my @sql_list = @_;
317
    my @sql_list = @_;
317
318
Lines 346-358 sub load_sql_in_order { Link Here
346
    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_offset_types.sql";
347
    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_offset_types.sql";
347
    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_credit_types.sql";
348
    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_credit_types.sql";
348
    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_debit_types.sql";
349
    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_debit_types.sql";
350
    my $localization_file = C4::Context->config('intranetdir') .
351
                            "/installer/data/$self->{dbms}/localization/$langchoice/custom.sql";
352
    if ( $langchoice ne 'en' and -f $localization_file ) {
353
        push @fnames, $localization_file;
354
    }
349
    foreach my $file (@fnames) {
355
    foreach my $file (@fnames) {
350
        #      warn $file;
356
        #      warn $file;
351
        undef $/;
357
        undef $/;
352
        my $error = $self->load_sql($file);
358
        my $error = $self->load_sql($file);
353
        my @file = split qr(\/|\\), $file;
359
        my @file = split qr(\/|\\), $file;
354
        $lang = $file[ scalar(@file) - 3 ] unless ($lang);
360
        $lang = $file[ scalar(@file) - 3 ] unless ($lang);
355
        my $level = $file[ scalar(@file) - 2 ];
361
        my $level = ( $file =~ /(localization)/ ) ? $1 : $file[ scalar(@file) - 2 ];
356
        unless ($error) {
362
        unless ($error) {
357
            $systempreference .= "$file[scalar(@file)-1]|"
363
            $systempreference .= "$file[scalar(@file)-1]|"
358
              unless ( index( $systempreference, $file[ scalar(@file) - 1 ] ) >= 0 );
364
              unless ( index( $systempreference, $file[ scalar(@file) - 1 ] ) >= 0 );
(-)a/installer/data/mysql/localization/es-ES/custom.sql (+20 lines)
Line 0 Link Here
1
--
2
-- Custom values that differ from the global defaults
3
--
4
-- This file is part of Koha.
5
--
6
-- Koha is free software; you can redistribute it and/or modify it
7
-- under the terms of the GNU General Public License as published by
8
-- the Free Software Foundation; either version 3 of the License, or
9
-- (at your option) any later version.
10
--
11
-- Koha is distributed in the hope that it will be useful, but
12
-- WITHOUT ANY WARRANTY; without even the implied warranty of
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
-- GNU General Public License for more details.
15
--
16
-- You should have received a copy of the GNU General Public License
17
-- along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
UPDATE systempreferences SET value = '1' WHERE variable = 'opaclanguagesdisplay';
20
(-)a/installer/install.pl (-1 / +4 lines)
Lines 245-253 elsif ( $step && $step == 3 ) { Link Here
245
    elsif ( $op && $op eq 'addframeworks' ) {
245
    elsif ( $op && $op eq 'addframeworks' ) {
246
246
247
        # 1ST install, 3rd sub-step : insert the SQL files the user has selected
247
        # 1ST install, 3rd sub-step : insert the SQL files the user has selected
248
        my $langchoice = $query->param('fwklanguage');
249
        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
250
        $langchoice =~ s/[^a-zA-Z_-]*//g;
248
251
249
        my ( $fwk_language, $list ) =
252
        my ( $fwk_language, $list ) =
250
          $installer->load_sql_in_order( $all_languages,
253
          $installer->load_sql_in_order( $langchoice, $all_languages,
251
            $query->multi_param('framework') );
254
            $query->multi_param('framework') );
252
        $template->param(
255
        $template->param(
253
            "fwklanguage" => $fwk_language,
256
            "fwklanguage" => $fwk_language,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-1 / +2 lines)
Lines 173-178 Link Here
173
                            <h3>Optional data added</h3>
173
                            <h3>Optional data added</h3>
174
                        [% ELSIF lis.level == 'mysql' %]
174
                        [% ELSIF lis.level == 'mysql' %]
175
                            <h3>MySQL data added</h3>
175
                            <h3>MySQL data added</h3>
176
                        [% ELSIF lis.level == 'localization' %]
177
                            <h3>Localization data added</h3>
176
                        [% ELSE %]
178
                        [% ELSE %]
177
                            <h3>[% lis.level FILTER ucfirst | html %] data added</h3>
179
                            <h3>[% lis.level FILTER ucfirst | html %] data added</h3>
178
                        [% END %]
180
                        [% END %]
179
- 

Return to bug 24973