Changeset 30582

Show
Ignore:
Timestamp:
17.06.2016 20:12:30 (4 years ago)
Author:
ak19
Message:

Final fixes to get changes to GTI working with new gs3colcfg (gs3-collection-configs) module: 1. gti.pl uses regex to check if module is a GS3 specific module rather than a GS2 specific module. 2. gs3-collection-configs properties files no longer have the collection name prefixed to their properties, as gti already adds this in.

Files:
1 modified

Legend:

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

    r30581 r30582  
    158158    if ($gti_command =~ /^get-all-chunks$/i) { 
    159159        # Check that GS3 interface is the target 
    160         if ($module eq "gs3interface" || $module eq "gs3colcfg") { 
     160        if ($module =~ m/^gs3/) { # gs3interface, gs3colcfg 
    161161            print &get_all_chunks_for_gs3(@gti_command_arguments); 
    162162        } else { 
     
    165165    } 
    166166    elsif ($gti_command =~ /^get-first-n-chunks-requiring-work$/i) { 
    167         if ($module eq "gs3interface" || $module eq "gs3colcfg") {      
     167        if ($module =~ m/^gs3/) {       
    168168            print &get_first_n_chunks_requiring_work_for_gs3(@gti_command_arguments); 
    169169        } else { 
     
    172172    } 
    173173    elsif ($gti_command =~ /^get-uptodate-chunks$/i) { 
    174         if ($module eq "gs3interface" || $module eq "gs3colcfg") {      
     174        if ($module =~ m/^gs3/) {       
    175175            print &get_uptodate_chunks_for_gs3(@gti_command_arguments); 
    176176        } else { 
     
    407407        my $target_file_name = ""; 
    408408         
    409         if ($translation_file->{'key'} eq "gs3interface" || $translation_file->{'key'} eq "gs3colcfg") { 
     409        if ($translation_file->{'key'} =~ m/^gs3/) { # gs3interface, gs3colcfg 
    410410            my (%source_file_key_to_text_mapping, %target_file_key_to_text_mapping, %source_file_key_to_last_update_date_mapping, %target_file_key_to_last_update_date_mapping ) = (); 
    411411            &build_gs3_configuration($translation_file->{'key'}, $target_language_code, \%source_file_key_to_text_mapping, \%target_file_key_to_text_mapping, \%source_file_key_to_last_update_date_mapping, \%target_file_key_to_last_update_date_mapping );     
     
    501501     
    502502     
    503     if ($translation_file_key ne "gs3interface" && $translation_file_key ne "gs3colcfg") { 
     503    if ($translation_file_key !~ m/^gs3/) { 
    504504        # Get (and check) the translation configuration 
    505505        ($source_file, $target_file, $translation_file_type) = &get_translation_configuration($target_language_code, $translation_file_key); 
     
    590590     
    591591     
    592     if ($translation_file_key ne "gs3interface" && $translation_file_key ne "gs3colcfg") { 
     592    if ($translation_file_key !~ m/^gs3/) { 
    593593        # Get (and check) the translation configuration 
    594594        ($source_file, $target_file, $translation_file_type) 
     
    710710    } 
    711711     
    712     if ($translation_file_key ne "gs3interface" && $translation_file_key ne "gs3colcfg") { 
     712    if ($translation_file_key !~ m/^gs3/) { 
    713713        eval "&write_translated_${translation_file_type}(\$source_file, \\\@source_file_lines, \\\%source_file_key_to_text_mapping, \$target_file, \\\@target_file_lines, \\\%target_file_key_to_text_mapping, \\\%target_file_key_to_gti_comment_mapping, \$target_language_code)"; 
    714714    } else {