Changeset 36402


Ignore:
Timestamp:
2022-08-20T17:18:15+12:00 (20 months ago)
Author:
anupama
Message:

Part 3 of commits relating to updating GTI to support translations for DEC (Documented Example Collections) description strings. This commit contains the modifications to gti.pl to support the new gs3-dec-col-cfgs module and illustrates how a new GS3-specific, Java properties file-specifc module is to be added to GTI. Separate from this commit is a modification to the GTI server machine's cron file, to svn update the new gs3-dec-col-cfgs folder containing the DEC properties files. When setting up a GTI on any machine, the new module needs to be checked out now too into the top level GTI-GS2 installation from main/trunk/gs3-dec-col-cfgs.

File:
1 edited

Legend:

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

    r35705 r36402  
    111111    'source_file' => "gs3-collection-configs",
    112112    'target_file' => "gs3-collection-configs"
     113},
     114
     115
     116# collection config display items of GS3 port of Documented Examples Collections (dec). Check out as gs3-dec-col-cfgs
     117# from https://svn.greenstone.org/main/trunk/gs3-dec-col-cfgs
     118{ 'key' => "gs3deccolcfg",
     119    'file_type' => "resource_bundle",
     120    'source_file' => "gs3-dec-col-cfgs",
     121    'target_file' => "gs3-dec-col-cfgs"
    113122}
    114123];
    115124
    116125my @gs3_col_cfg_files = ("lucene-jdbm-demo", "solr-jdbm-demo", "localsite");
     126
     127my @gs3_dec_col_cfg_files = ("authen-e", "bibtex-e", "dls-e", "garish-e", "gsarch-e", "image-e", "isis-e", "lomdemo-e", "manifest-demo-e", "marc-e", "oai-e", "pagedimg-e", "style-e", "wiki-e", "wrdpdf-e"); # "bibtex-supp-e"
    117128
    118129my @gs3_interface_files = ("interface_default", "core_servlet_dictionary", "metadata_names");
     
    158169    if ($gti_command =~ /^get-all-chunks$/i) {
    159170        # Check that GS3 interface is the target
    160         if ($module =~ m/^gs3/) { # gs3interface, gs3colcfg
     171        if ($module =~ m/^gs3/) { # gs3interface, gs3colcfg, gs3deccolcfg
    161172            print &get_all_chunks_for_gs3(@gti_command_arguments);
    162173        } else {
     
    407418        my $target_file_name = "";
    408419       
    409         if ($translation_file->{'key'} =~ m/^gs3/) { # gs3interface, gs3colcfg
     420        if ($translation_file->{'key'} =~ m/^gs3/) { # gs3interface, gs3colcfg, gs3deccolcfg
    410421            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 ) = ();
    411422            &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 );   
     
    20072018    $tar_cmd .= " " . &get_gs3_zip_file_listing($target_language_code, "greenstone3", \@gs3_interface_files);
    20082019    $tar_cmd .= " " . &get_gs3_zip_file_listing($target_language_code, "gs3-collection-configs", \@gs3_col_cfg_files);
     2020    $tar_cmd .= " " . &get_gs3_zip_file_listing($target_language_code, "gs3-dec-col-cfgs", \@gs3_dec_col_cfg_files);
    20092021
    20102022    # tar command will overwrite the previous version, but want to check we've created it
     
    20382050
    20392051# helper function
    2040 # gets the listing of gs3 files for a gs3 interface module (gs3interface, gs3colcfg)
     2052# gets the listing of gs3 files for a gs3 interface module (gs3interface, gs3colcfg, gs3deccolccfg)
    20412053# formatted correctly to go into a zip file
    20422054sub get_gs3_zip_file_listing
     
    21162128    $source_file_directory = "gs3-collection-configs";
    21172129    $files_array = \@gs3_col_cfg_files;
     2130    } elsif($translation_file_key eq "gs3deccolcfg") {
     2131    $source_file_directory = "gs3-dec-col-cfgs";
     2132    $files_array = \@gs3_dec_col_cfg_files;
    21182133    }
    21192134    my $translation_file_type = "resource_bundle";
     
    21982213    my $source_file_directory = "greenstone3";   
    21992214    $source_file_directory = "gs3-collection-configs" if $translation_file_key eq "gs3colcfg";
     2215    $source_file_directory = "gs3-dec-col-cfgs" if $translation_file_key eq "gs3deccolcfg";
    22002216
    22012217    foreach my $interface_file_key (keys(%translated_interface_file_keys)) {
Note: See TracChangeset for help on using the changeset viewer.