Add code to call importXLIFFDocumentWithName: from gormtool

This commit is contained in:
Gregory John Casamento 2023-07-18 02:01:55 -04:00
parent 83841cfc6c
commit 31b3516b68

View file

@ -181,6 +181,12 @@
parse_val = YES;
}
if ([obj isEqualToString: @"--import-xliff"])
{
[pair setArgument: obj];
parse_val = YES;
}
// If there is no parameter for the argument, set it anyway...
if (parse_val == NO)
{
@ -368,6 +374,20 @@
}
}
opt = [args objectForKey: @"--import-xliff"];
if (opt != nil)
{
NSString *xliffDocumentName = [opt value];
BOOL result = NO;
GormXLIFFDocument *xd = [GormXLIFFDocument xliffWithGormDocument: doc];
result = [xd importXLIFFDocumentWithName: xliffDocumentName];
if (result == NO)
{
NSLog(@"No translation performed.");
}
}
// These options sound always be processed last...
opt = [args objectForKey: @"--write"];
if (opt != nil)