//
//  MPT_PluginStepTransformer.m
//  AUCoderDemo
//
//  Created by Andrew Salamon on 10/3/06.
//  Copyright 2006 Machine Perception Laboratory, University of California San Diego.. All rights reserved.
//

#import "MPT_PluginStepTransformer.h"
#import "MPT_PluginProtocol.h"

@implementation MPT_PluginStepTransformer
+ (Class)transformedValueClass
{
	return [NSString class];
}

+ (BOOL)allowsReverseTransformation
{
	return NO;
}

- (id)transformedValue:(id)value
{
	if( nil == value ) return nil;
	
	if( [value isEqualToString:MPT_PluginStep_NoStep] )
		return NSLocalizedStringWithDefaultValue( MPT_PluginStep_NoStep, nil, [NSBundle mainBundle], @"No Step", "Localized No Step name" );
	else if( [value isEqualToString:MPT_PluginStep_AfterFaces] )
		return NSLocalizedStringWithDefaultValue( MPT_PluginStep_AfterFaces, nil, [NSBundle mainBundle], @"After Faces", "Localized After Faces Step name" );
	else if( [value isEqualToString:MPT_PluginStep_SVM] )
		return NSLocalizedStringWithDefaultValue( MPT_PluginStep_SVM, nil, [NSBundle mainBundle], @"CERT SVM", "Localized CERT SVM step name" );
	else if( [value isEqualToString:MPT_PluginStep_Features] )
		return NSLocalizedStringWithDefaultValue( MPT_PluginStep_Features, nil, [NSBundle mainBundle], @"Feature Detector", "Localized FeatureDetector step name" );
	else if( [value isEqualToString:MPT_PluginStep_Frequencies] )
		return NSLocalizedStringWithDefaultValue( MPT_PluginStep_Frequencies, nil, [NSBundle mainBundle], @"After Gabor", "Localized After Gabor (frequencies) step name" );

	return value;
}
@end
