Changeset 10050


Ignore:
Timestamp:
2005-06-13T13:05:34+12:00 (19 years ago)
Author:
mdewsnip
Message:

Changed "submit-translation" command to the more accurate "submit-translations", and fixed the macrofile writing so image macros have update dates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/gti.pl

    r10041 r10050  
    9797    print &search_chunks(@gti_command_arguments);
    9898    }
    99     if ($gti_command =~ /^submit-translation$/i) {
     99    if ($gti_command =~ /^submit-translations$/i) {
    100100    # This command cannot produce any output since it reads input
    101     &submit_translation(@gti_command_arguments);
     101    &submit_translations(@gti_command_arguments);
    102102    }
    103103
     
    384384
    385385
    386 sub submit_translation
     386sub submit_translations
    387387{
    388388    # The code of the target language (ensure it is lowercase)
     
    10021002        my $target_file_chunk = $source_file_chunk;
    10031003        $target_file_chunk =~ s/$source_file_chunk_text/$target_file_chunk_text/;
     1004        $target_file_chunk =~ s/(\s)*$//;
    10041005        print TARGET_FILE "$target_file_chunk";
    10051006    }
     
    10081009    else {
    10091010        print TARGET_FILE "$macrofile_key [l=$target_language_code] {$target_file_chunk_text}";
    1010         if ($target_file_key_to_comment_date_mapping->{$chunk_key}) {
    1011         print TARGET_FILE "  # Updated " . $target_file_key_to_comment_date_mapping->{$chunk_key};
    1012         }
    1013         print TARGET_FILE "\n";
    10141011    }
     1012
     1013    # Add the update date, if one exists
     1014    if ($target_file_key_to_comment_date_mapping->{$chunk_key}) {
     1015        print TARGET_FILE "  # Updated " . $target_file_key_to_comment_date_mapping->{$chunk_key};
     1016    }
     1017    print TARGET_FILE "\n";
    10151018    }
    10161019
Note: See TracChangeset for help on using the changeset viewer.