Bug 13952: (follow-up) JS translatability, clean warns, other

Also addresses QA test tools, perldoc in ImportExportFramework.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Aleisha Amohia 2022-02-15 01:51:04 +13:00 committed by Fridolin Somers
parent 1566cbf66c
commit 31960e86df
3 changed files with 6 additions and 3 deletions

View File

@ -193,7 +193,7 @@ Functions for handling import/export.
=head2 ExportFramework
Export all the information of a MARC or Authority Type Framework to an excel "xml" file, comma separated values "csv" file or OpenDocument SpreadSheet "ods" file.
Export all information of a bibliographic or authority MARC framework to an Excel "xml" file, comma separated values "csv" or OpenDocument SpreadSheet "ods".
return :
succes
@ -647,6 +647,7 @@ sub ImportFramework
my $tempdir;
my $ok = -1;
my $dbh = C4::Context->dbh;
$frameworktype ||= '';
if (-r $filename && $dbh) {
my $extension = '';
if ($filename =~ /\.(csv|ods|xml)$/i) {
@ -821,6 +822,7 @@ sub _import_table
my %fields2Delete;
my $query;
my @fields;
$frameworktype ||= '';
# Create hash with all elements defined by primary key to know which ones to delete after parsing the spreadsheet
eval {
@fields = @$PKArray;
@ -1115,6 +1117,7 @@ sub _getDataFields
my $dataFields = {};
my @dataFieldsA = ();
$frameworktype ||= '';
if ($node && $node->hasChildNodes()) {
my $node2 = $node->firstChild;
my ($data, $repeated);

View File

@ -33,7 +33,7 @@ if (exists $cookies{'CGISESSID'}) {
);
}
my $input = new CGI;
my $input = CGI->new;
unless ($auth_status eq 'ok') {
print $input->header(-type => 'text/plain', -status => '403 Forbidden');

View File

@ -34,7 +34,7 @@ $(document).ready(function() {
var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search);
if (matches && matches.length > 1) {
alert(_("Error importing the authority type %s").format(decodeURIComponent(matches[1])));
alert(__("Error importing the authority type %s").format(decodeURIComponent(matches[1])));
}
$('input.input_import').change( function() {