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

(-)a/admin/itemtypes.pl (-1 / +1 lines)
Lines 60-66 if ( $op eq 'add_form' ) { Link Here
60
    my $parent_types = Koha::ItemTypes->search({parent_type=>undef,itemtype => {'!='=>$itemtype_code}});
60
    my $parent_types = Koha::ItemTypes->search({parent_type=>undef,itemtype => {'!='=>$itemtype_code}});
61
    my $imagesets = C4::Koha::getImageSets( checked => ( $itemtype ? $itemtype->imageurl : undef ) );
61
    my $imagesets = C4::Koha::getImageSets( checked => ( $itemtype ? $itemtype->imageurl : undef ) );
62
    my $searchcategory = GetAuthorisedValues("ITEMTYPECAT");
62
    my $searchcategory = GetAuthorisedValues("ITEMTYPECAT");
63
    my $translated_languages = C4::Languages::getTranslatedLanguages( undef , C4::Context->preference('template') );
63
    my $translated_languages = C4::Languages::getTranslatedLanguages( 'intranet', C4::Context->preference('template') ); # same as localization.pl
64
    $template->param(
64
    $template->param(
65
        itemtype  => $itemtype,
65
        itemtype  => $itemtype,
66
        parent_type => $parent_type,
66
        parent_type => $parent_type,
(-)a/admin/preferences.pl (-3 / +1 lines)
Lines 72-79 sub _get_chunk { Link Here
72
    } elsif ( $options{'class'} && $options{'class'} eq 'date' ) {
72
    } elsif ( $options{'class'} && $options{'class'} eq 'date' ) {
73
        $chunk->{'dateinput'} = 1;
73
        $chunk->{'dateinput'} = 1;
74
    } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) {
74
    } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) {
75
        my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) };
76
77
        my $theme;
75
        my $theme;
78
        my $interface;
76
        my $interface;
79
        if ( $options{'type'} eq 'opac-languages' ) {
77
        if ( $options{'type'} eq 'opac-languages' ) {
Lines 85-91 sub _get_chunk { Link Here
85
            $interface = 'intranet';
83
            $interface = 'intranet';
86
            $theme     = C4::Context->preference('template');
84
            $theme     = C4::Context->preference('template');
87
        }
85
        }
88
        $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, undef, $current_languages );
86
        $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme );
89
        $chunk->{'type'} = 'languages';
87
        $chunk->{'type'} = 'languages';
90
    } elsif ( $options{ 'choices' } ) {
88
    } elsif ( $options{ 'choices' } ) {
91
        my $add_blank;
89
        my $add_blank;
(-)a/admin/systempreferences.pl (-23 / +4 lines)
Lines 166-195 sub GetPrefParams { Link Here
166
            $counter++;
166
            $counter++;
167
        }
167
        }
168
    } elsif ( $data->{'type'} eq 'Languages' ) {
168
    } elsif ( $data->{'type'} eq 'Languages' ) {
169
        my $currently_selected_languages;
169
        my $interface = $data->{'variable'} =~ /opac/i ? 'opac' : 'intranet';
170
        foreach my $language ( split /\s+/, $data->{'value'} ) {
170
        my $theme = C4::Context->preference( $interface eq 'opac' ? 'opacthemes' : 'template' );
171
            $currently_selected_languages->{$language} = 1;
171
        $params->{'languages_loop'}    = getTranslatedLanguages( $interface, $theme );
172
        }
173
174
        # current language
175
        my $lang = $params->{'lang'};
176
        my $theme;
177
        my $interface;
178
        if ( $data->{'variable'} =~ /opac/ ) {
179
180
            # this is the OPAC
181
            $interface = 'opac';
182
            $theme     = C4::Context->preference('opacthemes');
183
        } else {
184
185
            # this is the staff interface
186
            $interface = 'intranet';
187
            $theme     = C4::Context->preference('template');
188
        }
189
        my $languages_loop = getTranslatedLanguages( $interface, $theme, $lang, $currently_selected_languages );
190
191
        $params->{'languages_loop'}    = $languages_loop;
192
        $params->{'type_langselector'} = 1;
172
        $params->{'type_langselector'} = 1;
173
        #FIXME Bug 29251: Make sure that current selection is checked (within borders of enabled)
193
    } else {
174
    } else {
194
        $params->{'type_free'} = 1;
175
        $params->{'type_free'} = 1;
195
        $params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 ) ? $data->{'options'} : 30;
176
        $params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 ) ? $data->{'options'} : 30;
(-)a/members/memberentry.pl (-1 / +1 lines)
Lines 864-870 if ( defined $min ) { Link Here
864
}
864
}
865
865
866
if ( C4::Context->preference('TranslateNotices') ) {
866
if ( C4::Context->preference('TranslateNotices') ) {
867
    my $translated_languages = C4::Languages::getTranslatedLanguages( 'opac', C4::Context->preference('template') );
867
    my $translated_languages = C4::Languages::getTranslatedLanguages( 'opac', 'bootstrap' );
868
    $template->param( languages => $translated_languages );
868
    $template->param( languages => $translated_languages );
869
}
869
}
870
870
(-)a/opac/opac-messaging.pl (-1 / +1 lines)
Lines 91-97 $template->param( Link Here
91
);
91
);
92
92
93
if ( C4::Context->preference('TranslateNotices') ) {
93
if ( C4::Context->preference('TranslateNotices') ) {
94
    my $translated_languages = C4::Languages::getTranslatedLanguages( 'opac', C4::Context->preference('template') );
94
    my $translated_languages = C4::Languages::getTranslatedLanguages( 'opac', 'bootstrap' );
95
    $template->param(
95
    $template->param(
96
        languages => $translated_languages,
96
        languages => $translated_languages,
97
        patron_lang => $patron->lang,
97
        patron_lang => $patron->lang,
(-)a/tools/additional-contents.pl (-1 / +1 lines)
Lines 225-231 if ( $op eq 'list' ) { Link Here
225
    $template->param( additional_contents => $additional_contents );
225
    $template->param( additional_contents => $additional_contents );
226
}
226
}
227
227
228
my $translated_languages = C4::Languages::getTranslatedLanguages;
228
my $translated_languages = C4::Languages::getTranslatedLanguages( 'opac', 'bootstrap' );
229
my @languages;
229
my @languages;
230
for my $language (@$translated_languages) {
230
for my $language (@$translated_languages) {
231
    for my $sublanguage ( @{ $language->{sublanguages_loop} } ) {
231
    for my $sublanguage ( @{ $language->{sublanguages_loop} } ) {
(-)a/tools/letter.pl (-3 / +1 lines)
Lines 160-167 sub add_form { Link Here
160
160
161
    if ( C4::Context->preference('TranslateNotices') ) {
161
    if ( C4::Context->preference('TranslateNotices') ) {
162
        my $translated_languages =
162
        my $translated_languages =
163
          C4::Languages::getTranslatedLanguages( 'opac',
163
            C4::Languages::getTranslatedLanguages( 'opac', 'bootstrap' );
164
            C4::Context->preference('template') );
165
        for my $language (@$translated_languages) {
164
        for my $language (@$translated_languages) {
166
            for my $sublanguage( @{ $language->{sublanguages_loop} } ) {
165
            for my $sublanguage( @{ $language->{sublanguages_loop} } ) {
167
                if ( $language->{plural} ) {
166
                if ( $language->{plural} ) {
168
- 

Return to bug 29245