Updated localization

Fixed an issue that automatically set the first group to be the trashcan
This commit is contained in:
michael starke
2013-07-20 17:04:13 +02:00
parent e5e8d01dff
commit 30697648b9
4 changed files with 19 additions and 3 deletions

View File

@@ -297,7 +297,7 @@
}
- (void)_updateTrashFolders:(Kdb4Tree *)tree {
NSMenu *menu = [self _buildTreeMenu:tree];
NSMenu *menu = [self _buildTrashTreeMenu:tree];
[self.selectRecycleBinGroupPopUpButton setMenu:menu];
}
@@ -308,7 +308,9 @@
- (NSMenu *)_buildTrashTreeMenu:(Kdb4Tree *)tree {
NSMenu *menu = [self _buildTreeMenu:tree];
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SELECT_RECYCLEBIN", @"Menu item if no reycleBin is selected") action:NULL keyEquivalent:@""];
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"AUTOCREATE_TRASH_FOLDER", @"Menu item for automatic trash creation")
action:NULL
keyEquivalent:@""];
[selectItem setEnabled:YES];
[menu insertItem:selectItem atIndex:0];
@@ -318,7 +320,9 @@
- (NSMenu *)_buildTemplateTreeMenu:(Kdb4Tree *)tree {
NSMenu *menu = [self _buildTreeMenu:tree];
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SELECT_RECYCLEBIN", @"Menu item if no reycleBin is selected") action:NULL keyEquivalent:@""];
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NO_TEMPLATE_GROUP", @"Menu item to reset the template groups")
action:NULL
keyEquivalent:@""];
[selectItem setEnabled:YES];
[menu insertItem:selectItem atIndex:0];

View File

@@ -350,6 +350,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
if(parent == self.trash) {
return nil; // no new Groups in trash
}
if([self isItemTrashed:parent]) {
return nil;
}
KdbEntry *newEntry = [self.tree createEntry:parent];
newEntry.title = NSLocalizedString(@"DEFAULT_ENTRY_TITLE", @"Title for a newly created entry");
if(self.treeV4 && ([self.treeV4.defaultUserName length] > 0)) {
@@ -368,6 +371,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
if(parent == self.trash) {
return nil; // no new Groups in trash
}
if([self isItemTrashed:parent]) {
return nil;
}
KdbGroup *newGroup = [self.tree createGroup:parent];
newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group");
newGroup.image = MPIconFolder;
@@ -396,6 +402,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
if(!self.trash) {
[self _createTrashGroup];
}
if([self isItemTrashed:entry]) {
return; // Entry is already trashed
}
[entry moveToTrashUndoable:self.trash atIndex:[self.trash.entries count]];
}
else {
@@ -408,6 +417,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
if(!self.trash) {
[self _createTrashGroup];
}
if( (group == self.trash) || [self isItemTrashed:group] ) {
return; //Groups already trashed cannot be deleted
}
[group moveToTrashUndoable:self.trash atIndex:[self.trash.groups count]];
}
else {

Binary file not shown.

Binary file not shown.