mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Add code to call importXLIFFDocumentWithName: from gormtool
This commit is contained in:
parent
83841cfc6c
commit
31b3516b68
1 changed files with 20 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue