Changeset 38503 for main/trunk


Ignore:
Timestamp:
2023-12-19T21:57:39+13:00 (6 months ago)
Author:
anupama
Message:

Bugfix. Julian Fox found that commits on a particular string in the Italian auxdm file wasn't going through. There were spaces at the end of the source string that were being removed in the source string of the translated work, and thus source strings of both appeared modified. Using trim() function to ensure better comparison. It seems to work locally, with a dummy translation going through, so I'm committing it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gti.pl

    r38500 r38503  
    738738
    739739        # Make sure the submitted source chunk matches the source file chunk
    740         if ($source_file_key_to_submission_mapping{$chunk_key} ne $source_file_key_to_text_mapping{$chunk_key}
    741             && $source_file_key_to_submission_mapping{$chunk_key} ne &unmake_text_xml_safe($source_file_key_to_text_mapping{$chunk_key})) {
     740        if ($source_file_key_to_submission_mapping{$chunk_key} ne trim($source_file_key_to_text_mapping{$chunk_key})
     741            && $source_file_key_to_submission_mapping{$chunk_key} ne &unmake_text_xml_safe(trim($source_file_key_to_text_mapping{$chunk_key}))) {
    742742        #if (&unmake_text_xml_safe($source_file_key_to_submission_mapping{$chunk_key}) ne &unmake_text_xml_safe($source_file_key_to_text_mapping{$chunk_key})) {
    743743                    #&log_message("**** submission source:\n|$source_file_key_to_submission_mapping{$chunk_key}|\n");
     
    769769}
    770770
     771
     772sub trim
     773{
     774    my $s = shift(@_);
     775    $s =~ s/^\s+|\s+$//g;
     776    return $s
     777}
    771778
    772779sub create_glihelp_zip_file
Note: See TracChangeset for help on using the changeset viewer.