Changeset 5645


Ignore:
Timestamp:
2003-10-16T10:12:56+13:00 (21 years ago)
Author:
mdewsnip
Message:

Moved classifier descriptions into the resource bundle (perllib/strings.rb).

Location:
trunk/gsdl/perllib/classify
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/AZList.pm

    r4873 r5645  
    5252    'reqd' => "no" } ,
    5353      { 'name' => "removesuffix",
    54     'desc' => "A suffix to ignore in the Metadata values for the field when sorting.",
     54    'desc' => "{AZList.removesuffix}",
    5555    'type' => "string",
    5656    'deft' => "",
     
    5959
    6060my $options = { 'name'     => "AZList",
    61         'desc'     => "Classifier plugin for sorting alphabetically",
     61        'desc'     => "{AZList.desc}",
    6262        'inherits' => "Yes",
    6363        'args'     => $arguments };
  • trunk/gsdl/perllib/classify/AZSectionList.pm

    r4873 r5645  
    5757
    5858my $options = { 'name'     => "AZSectionList",
    59         'desc'     => "Classifier plugin for sorting alphabetically. This is very similar to AZList except it sorts by section level metadata (excluding the top level) instead of just top level metadata. The only change is to the classify() subroutine which must now iterate through each section, adding each to the classification.",
     59        'desc'     => "{AZSectionList.desc}",
    6060        'inherits' => "Yes",
    6161        'args'     => $arguments };
  • trunk/gsdl/perllib/classify/BasClas.pm

    r4873 r5645  
    5353
    5454use parsargv;
     55use gsprintf;
    5556use printusage;
    5657
     
    7273
    7374my $options = { 'name'     => "BasClas",
    74         'desc'     => "Base class for all the classifiers.",
     75        'desc'     => "{BasClas.desc}",
    7576        'inherits' => "No",
    7677        'args'     => $arguments };
     78
     79
     80sub gsprintf
     81{
     82    return &gsprintf::gsprintf(@_);
     83}
    7784
    7885
     
    168175    # Produce the usage information using the data structure above
    169176    if ($isleafclass) {
    170     print STDERR " usage: classify $classifiername [options]\n\n";
     177    &gsprintf(STDERR, " {common.usage}: classify $classifiername [{common.options}]\n\n");
     178    # print STDERR " usage: classify $classifiername [options]\n\n";
    171179    }
    172180
     
    177185
    178186    if ($isleafclass) {
    179         print STDERR " specific options:\n";
     187        &gsprintf(STDERR, " {common.specific_options}:\n");
     188        # print STDERR " specific options:\n";
    180189    }
    181190    else {
    182         print STDERR " general options (from $classifiername):\n";
     191        &gsprintf(STDERR, " {common.general_options}:\n", $classifiername);
     192        # print STDERR " general options (from $classifiername):\n";
    183193    }
    184194
     
    227237             q^verbosity/\d/2^, \$self->{'verbosity'},
    228238             "allow_extra_options")) {
    229    
    230     print STDERR "\nThe $name classifier uses an incorrect general option\n";
    231     print STDERR "(general options are those available to all classifiers).\n";
    232     print STDERR "Check your collect.cfg configuration file.\n";
     239
     240    &gsprintf(STDERR, "\n{BasClas.bad_general_option}\n", $name);
     241    # print STDERR "\nThe $name classifier uses an incorrect general option\n";
     242    # print STDERR "(general options are those available to all classifiers).\n";
     243    # print STDERR "Check your collect.cfg configuration file.\n";
    233244    $self->print_txt_usage("");  # Use default resource bundle
    234245    die "\n";
     
    247258
    248259    my $outhandle = $self->{'outhandle'};
    249     print $outhandle "BasClas::classify function must be implemented in sub-class\n";
     260    &gsprintf($outhandle, "BasClass::classify {common.must_be_implemented}\n");
     261    # print $outhandle "BasClas::classify function must be implemented in sub-class\n";
    250262}
    251263
     
    254266
    255267    my $outhandle = $self->{'outhandle'};
    256     print $outhandle "BasClas::classify function must be implemented in sub-class\n";
     268    &gsprintf($outhandle, "BasClass::get_classify_info {common.must_be_implemented}\n");
     269    # print $outhandle "BasClas::get_classify_info function must be implemented in sub-class\n";
    257270}
    258271
  • trunk/gsdl/perllib/classify/Browse.pm

    r4786 r5645  
    3636
    3737my $options = { 'name'     => "Browse",
    38         'desc'     => "",
     38        'desc'     => "{Browse.desc}",
    3939        'inherits' => "Yes" };
    4040
  • trunk/gsdl/perllib/classify/DateList.pm

    r5532 r5645  
    7474
    7575my $options = { 'name'     => "DateList",
    76         'desc'     => "Classifier plugin for sorting by date. By default, sorts by 'Date' metadata. Date is assumed to be in the form yyyymmdd.",
     76        'desc'     => "{DateList.desc}",
    7777        'inherits' => "Yes",
    7878        'args'     => $arguments };
  • trunk/gsdl/perllib/classify/HTML.pm

    r4873 r5645  
    5353
    5454my $options = { 'name'     => "HTML",
    55         'desc'     => "Creates an empty classification that's simply a link to a web page.",
     55        'desc'     => "{HTML.desc}",
    5656        'inherits' => "Yes",
    5757        'args'     => $arguments };
  • trunk/gsdl/perllib/classify/Hierarchy.pm

    r4873 r5645  
    8282my $options =
    8383{   'name'     => "Hierarchy",
    84     'desc'     => "Classifier plugin for generating hierarchical classifications",
     84    'desc'     => "{Hierarchy.desc}",
    8585    'inherits' => "Yes" ,
    8686    'args'     => $arguments };
  • trunk/gsdl/perllib/classify/List.pm

    r4873 r5645  
    6666
    6767my $options = { 'name'     => "List",
    68         'desc'     => "Simple list classifier plugin.",
     68        'desc'     => "{List.desc}",
    6969        'inherits' => "Yes",
    7070        'args'     => $arguments };
     
    223223
    224224    # organise into classification structure
     225    print STDERR "List::get_classify_info::title = " . $self->{'title'} . "\n";
    225226    my %classifyinfo = ('childtype'=>'VList',
    226227            'Title'=>$self->{'title'},
  • trunk/gsdl/perllib/classify/Phind.pm

    r4873 r5645  
    129129
    130130my $options = { 'name'     => "Phind",
    131         'desc'     => "The Phind clasifier plugin.",
     131        'desc'     => "{Phind.desc}",
    132132        'inherits' => "Yes",
    133133        'args'     => $arguments };
  • trunk/gsdl/perllib/classify/SectionList.pm

    r4873 r5645  
    4040
    4141my $options = { 'name'     => "SectionList",
    42         'desc'     => "Same as List classifier but includes all sections of document (excluding top level) rather than just top level document itself.",
     42        'desc'     => "{SectionList.desc}",
    4343        'inherits' => "Yes" };
    4444
Note: See TracChangeset for help on using the changeset viewer.