Ignore:
Timestamp:
2016-08-05T19:22:05+12:00 (8 years ago)
Author:
ak19
Message:

3 new strings introduced by Kathy contained the :, which is used as a separator in the properties file. Although Kathy tried to escape it with a backslash, it broke GTI because GTI doesn't recognise the backslash as a separator and all kinds of weird things happened from then on, so that the Gujarati translator kept having to translte the current date rather than a real GS3 interface string. Modified the gti.pl code (to be committed) and the new strings that Kathy introduced, so that hopefully, GTI can now handle it. Property names and values will be split at the right-most separator character now (= or :) and any on the left should not be escaped.

File:
1 edited

Legend:

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

    r30582 r30681  
    917917{
    918918    my ($file_lines, $key_to_line_mapping, $translation_file_type) = @_;
     919
     920        &log_message("@@@ HELLO WORLD");
     921
    919922   
    920923    my %key_to_text_mapping = ();
     
    930933        # Map from chunk key to text
    931934        eval "\$key_to_text_mapping{\${chunk_key}} = &import_chunk_from_${translation_file_type}(\$chunk_text)";
     935
     936        #if($chunk_key =~ m/document\\/) {
     937            #&log_message("Submission source: $source_file_key_to_submission_mapping{$chunk_key}");
     938            #&log_message("@@@ chunk key: $chunk_key");
     939        #}
     940
    932941    }
    933942   
     
    16081617       
    16091618        # Line contains a dictionary string
    1610         if ($line =~ /^(\S+?)[:|=](.*)$/) {
     1619        if ($line =~ /^(\S+)[:|=](.*)$/) {
    16111620            $chunk_key = $1;
    16121621            $startindex = $i;
     
    16331642   
    16341643    # Simple: just remove string key
    1635     $chunk_text =~ s/^(\S+?)[:|=](\s*)//s;
     1644    $chunk_text =~ s/^(\S+)[:|=](\s*)//s;
    16361645    $chunk_text =~ s/(\s*)$//s;  # Remove any nasty whitespace, carriage returns etc.
    16371646    $chunk_text =~ s/(\s*)\#\s+Updated\s+(\d?\d-\D\D\D-\d\d\d\d.*)\s*$//is;
Note: See TracChangeset for help on using the changeset viewer.