Ignore:
Timestamp:
2023-08-09T17:30:39+12:00 (10 months ago)
Author:
anupama
Message:

Tigran Zargaryan noticed an Internal Server Error ,message when trying to use the GTI to translate the glihelp module. The problem was that this module was never yet translated into Armenian and the module for the language had not been initialised, missing the necessary folders and starting files. The quick code-less fix was to press the Download File link in GTI for this module, above the translation boxes. This will initialise the glihelp module for a new language, so that submissions would go through. But this commit ensures the initialisation is done when necessary for glihelp on pressing the submit button. The function create_glihelp_zip_file is now always called on submit if the module is glihelp, as this function already would check if the necessary folders existed or, if not, ensure they do.

File:
1 edited

Legend:

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

    r36548 r37907  
    165165        &throw_fatal_error("Missing command.");
    166166    }     
    167    
     167
     168    # For the first translation of glihelp into a new language, glihelp folders need to be
     169    # initialised. The folders & files are not yet present on submit, so do this then:
     170    if($gti_command =~ /^submit-translations$/i && $module && $module eq "glihelp") {
     171    &create_glihelp_zip_file(@gti_command_arguments);
     172    }
     173   
    168174    # Process the command
    169175    if ($gti_command =~ /^get-all-chunks$/i) {
Note: See TracChangeset for help on using the changeset viewer.