From 507944e41bec4987c9ef8c75c436332bdb727df2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Dec 2013 11:27:26 +0100 Subject: [PATCH] Bug 11263: Use all languages instead of just the translated ones This patch produces the same dropdown list as the one in the adv search. With this way, it won't be necessary to install additional templates to fill the locale list. Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- serials/subscription-add.pl | 6 +++--- serials/subscription-numberpatterns.pl | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index c6edab4250..e31b8f27da 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -215,10 +215,10 @@ if ($op eq 'addsubscription') { my $languages = [ map { { - language => $_->{language}, - description => $_->{native_description} || $_->{language} + language => $_->{iso639_2_code}, + description => $_->{language_description} || $_->{language} } - } @{ C4::Languages::getTranslatedLanguages() } ]; + } @{ C4::Languages::getAllLanguages() } ]; $template->param( locales => $languages ); diff --git a/serials/subscription-numberpatterns.pl b/serials/subscription-numberpatterns.pl index 065ab01e4d..71e5d4bdee 100755 --- a/serials/subscription-numberpatterns.pl +++ b/serials/subscription-numberpatterns.pl @@ -105,12 +105,13 @@ if($op && ($op eq 'new' || $op eq 'modify')) { my @frequencies = GetSubscriptionFrequencies(); my @subtypes; push @subtypes, { value => $_ } for (qw/ issues weeks months /); + my $languages = [ map { { - language => $_->{language}, - description => $_->{native_description} || $_->{language} + language => $_->{iso639_2_code}, + description => $_->{language_description} || $_->{language} } - } @{ C4::Languages::getTranslatedLanguages() } ]; + } @{ C4::Languages::getAllLanguages() } ]; $template->param( $op => 1, -- 2.39.5