Ticket #102: gettext_sprintf.patch

File gettext_sprintf.patch, 2.2 KB (added by hjansen, 5 years ago)
  • Dialog/Find.pm

     
    256256    eval { $regex = qr/$search_term/m }; 
    257257    if ($@) { 
    258258        my $main_window = Padre->ide->wx->main_window; 
    259         Wx::MessageBox(gettext("Cannot build regex for '%s'", $search_term), gettext("Search error"), Wx::wxOK, $main_window); 
     259        Wx::MessageBox(sprintf(gettext("Cannot build regex for '%s'"), $search_term), gettext("Search error"), Wx::wxOK, $main_window); 
    260260        return; 
    261261    } 
    262262    return $regex; 
  • Dialog/ModuleStart.pm

     
    118118    my @fields = qw(_module_name_ _author_name_ _email_ _builder_choice_ _license_choice_); 
    119119    foreach my $f (@fields) { 
    120120        if (not $data->{$f}) { 
    121             Wx::MessageBox(gettext("Field %s was missing. Module not created.", $f), gettext("missing field"), Wx::wxOK, $main_window); 
     121            Wx::MessageBox(sprintf(gettext("Field %s was missing. Module not created."), $f), gettext("missing field"), Wx::wxOK, $main_window); 
    122122            return; 
    123123        } 
    124124    } 
     
    135135    Module::Starter::App->run; 
    136136    @ARGV = (); 
    137137    chdir $pwd; 
    138     Wx::MessageBox(gettext("%s apparantly created.", $data->{_module_name_}), gettext("Done"), Wx::wxOK, $main_window); 
     138    Wx::MessageBox(sprintf(gettext("%s apparantly created."), $data->{_module_name_}), gettext("Done"), Wx::wxOK, $main_window); 
    139139 
    140140    return; 
    141141} 
  • MainWindow.pm

     
    918918    } 
    919919 
    920920    if (not $file) { 
    921         Wx::MessageBox(gettext("Could not find file '%s'", $selection), gettext("Open Selection"), Wx::wxOK, $self); 
     921        Wx::MessageBox(sprintf(gettext("Could not find file '%s'"), $selection), gettext("Open Selection"), Wx::wxOK, $self); 
    922922        return; 
    923923    } 
    924924 
     
    13691369    my $code = $doc->text_get; 
    13701370    eval $code; 
    13711371    if ( $@ ) { 
    1372         Wx::MessageBox(gettext("Error: %s", $@), gettext("Self error"), Wx::wxOK, $self); 
     1372        Wx::MessageBox(sprintf(gettext("Error: %s"), $@), gettext("Self error"), Wx::wxOK, $self); 
    13731373        return; 
    13741374    } 
    13751375    return;