Author: rmottola
Date: Mon Jan 18 21:02:52 2016
New Revision: 39292
URL: http://svn.gna.org/viewcvs/gnustep?rev=39292&view=rev
Log:
Localizations inside the Framework
Modified:
apps/gworkspace/trunk/ChangeLog
apps/gworkspace/trunk/FSNode/FSNBrowser.m
apps/gworkspace/trunk/FSNode/FSNIconsView.m
apps/gworkspace/trunk/FSNode/FSNListView.m
apps/gworkspace/trunk/FSNode/FSNode.m
Modified: apps/gworkspace/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/ChangeLog?rev=39292&r1=39291&r2=39292&view=diff
==============================================================================
--- apps/gworkspace/trunk/ChangeLog (original)
+++ apps/gworkspace/trunk/ChangeLog Mon Jan 18 21:02:52 2016
@@ -1,3 +1,11 @@
+2016-01-18 Riccardo Mottola <[email protected]>
+
+ * FSNode/FSNBrowser.m
+ * FSNode/FSNIconsView.m
+ * FSNode/FSNListView.m
+ * FSNode/FSNode.m
+ Localizations inside the Framework
+
2016-01-18 Riccardo Mottola <[email protected]>
* GWorkspace/Desktop/GWDesktopView.m
Modified: apps/gworkspace/trunk/FSNode/FSNBrowser.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/FSNBrowser.m?rev=39292&r1=39291&r2=39292&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/FSNBrowser.m (original)
+++ apps/gworkspace/trunk/FSNode/FSNBrowser.m Mon Jan 18 21:02:52 2016
@@ -2219,12 +2219,15 @@
return
- if ([ednode isParentWritable] == NO) {
- NSRunAlertPanel(NSLocalizedString(@"Error", @""),
- [NSString stringWithFormat: @"%@\"%@\"!\n",
- NSLocalizedString(@"You do not have write permission for ",
@""),
- [ednode parentName]], NSLocalizedString(@"Continue", @""),
nil, nil);
- CLEAREDITING;
+ if ([ednode isParentWritable] == NO)
+ {
+ NSRunAlertPanel(
+ NSLocalizedStringFromTableInBundle(@"Error", nil,
[NSBundle bundleForClass:[self class]], @""),
+ [NSString stringWithFormat: @"%@ \"%@\"!\n",
+ NSLocalizedStringFromTableInBundle(@"You do
not have write permission for", nil, [NSBundle bundleForClass:[self class]],
@""),
+ [ednode parentName]],
+ NSLocalizedStringFromTableInBundle(@"Continue", nil,
[NSBundle bundleForClass:[self class]], @""), nil, nil);
+ CLEAREDITING;
} else if ([ednode isSubnodeOfPath: [desktopApp trashPath]]) {
NSRunAlertPanel(NSLocalizedString(@"Error", @""),
Modified: apps/gworkspace/trunk/FSNode/FSNIconsView.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/FSNIconsView.m?rev=39292&r1=39291&r2=39292&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/FSNIconsView.m (original)
+++ apps/gworkspace/trunk/FSNode/FSNIconsView.m Mon Jan 18 21:02:52 2016
@@ -1,6 +1,6 @@
/* FSNIconsView.m
*
- * Copyright (C) 2004-2015 Free Software Foundation, Inc.
+ * Copyright (C) 2004-2016 Free Software Foundation, Inc.
*
* Author: Enrico Sersale <[email protected]>
* Date: March 2004
@@ -2245,11 +2245,14 @@
return
- if ([ednode isParentWritable] == NO) {
- NSRunAlertPanel(NSLocalizedString(@"Error", @""),
- [NSString stringWithFormat: @"%@\"%@\"!\n",
- NSLocalizedString(@"You do not have write permission for ",
@""),
- [ednode parentName]], NSLocalizedString(@"Continue", @""),
nil, nil);
+ if ([ednode isParentWritable] == NO)
+ {
+ NSRunAlertPanel(
+ NSLocalizedStringFromTableInBundle(@"Error", nil,
[NSBundle bundleForClass:[self class]], @""),
+ [NSString stringWithFormat: @"%@ \"%@\"!\n",
+ NSLocalizedStringFromTableInBundle(@"You do
not have write permission for", nil, [NSBundle bundleForClass:[self class]],
@""),
+ [ednode parentName]],
+ NSLocalizedStringFromTableInBundle(@"Continue", nil,
[NSBundle bundleForClass:[self class]], @""), nil, nil);
CLEAREDITING;
} else if ([ednode isSubnodeOfPath: [desktopApp trashPath]]) {
Modified: apps/gworkspace/trunk/FSNode/FSNListView.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/FSNListView.m?rev=39292&r1=39291&r2=39292&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/FSNListView.m (original)
+++ apps/gworkspace/trunk/FSNode/FSNListView.m Mon Jan 18 21:02:52 2016
@@ -317,7 +317,7 @@
- (void)unSelectIconsOfRepsDifferentFrom:(id)aRep
{
- int i;
+ NSUInteger i;
for (i = 0; i < [nodeReps count]; i++) {
FSNListViewNodeRep *rep = [nodeReps objectAtIndex: i];
@@ -354,20 +354,22 @@
- (NSString *)selectRepWithPrefix:(NSString *)prefix
{
- int i;
-
- for (i = 0; i < [nodeReps count]; i++) {
- FSNListViewNodeRep *rep = [nodeReps objectAtIndex: i];
- NSString *name = [[rep node] name];
-
- if ([name hasPrefix: prefix]) {
- [listView deselectAll: self];
- [self selectReps: [NSArray arrayWithObject: rep]];
- [listView scrollRowToVisible: i];
-
- return name;
- }
- }
+ NSUInteger i;
+
+ for (i = 0; i < [nodeReps count]; i++)
+ {
+ FSNListViewNodeRep *rep = [nodeReps objectAtIndex: i];
+ NSString *name = [[rep node] name];
+
+ if ([name hasPrefix: prefix])
+ {
+ [listView deselectAll: self];
+ [self selectReps: [NSArray arrayWithObject: rep]];
+ [listView scrollRowToVisible: i];
+
+ return name;
+ }
+ }
return nil;
}
@@ -736,7 +738,7 @@
CREATE_AUTORELEASE_POOL (pool);
NSMutableArray *selection = [[self selectedNodes] mutableCopy];
NSMutableArray *opennodes = [NSMutableArray array];
- int i, count;
+ NSUInteger i, count;
for (i = 0; i < [nodeReps count]; i++) {
FSNListViewNodeRep *rep = [nodeReps objectAtIndex: i];
@@ -795,7 +797,7 @@
} else if ([node isSubnodeOfNode: anode]) {
NSArray *components = [FSNode nodeComponentsFromNode: anode toNode: node];
- int i;
+ NSUInteger i;
for (i = 0; i < [components count]; i++) {
FSNode *component = [components objectAtIndex: i];
@@ -849,7 +851,7 @@
NSArray *files = [info objectForKey: @"files"];
NSString *ndpath = [node path];
BOOL needsreload = NO;
- int i;
+ NSUInteger i;
[self stopRepNameEditing];
@@ -1443,11 +1445,14 @@
return
- if ([ednode isParentWritable] == NO) {
- NSRunAlertPanel(NSLocalizedString(@"Error", @""),
- [NSString stringWithFormat: @"%@\"%@\"!\n",
- NSLocalizedString(@"You do not have write permission for ",
@""),
- [ednode parentName]], NSLocalizedString(@"Continue", @""),
nil, nil);
+ if ([ednode isParentWritable] == NO)
+ {
+ NSRunAlertPanel(
+ NSLocalizedStringFromTableInBundle(@"Error", nil,
[NSBundle bundleForClass:[self class]], @""),
+ [NSString stringWithFormat: @"%@ \"%@\"!\n",
+ NSLocalizedStringFromTableInBundle(@"You do
not have write permission for", nil, [NSBundle bundleForClass:[self class]],
@""),
+ [ednode parentName]],
+ NSLocalizedStringFromTableInBundle(@"Continue", nil,
[NSBundle bundleForClass:[self class]], @""), nil, nil);
CLEAREDITING;
} else if ([ednode isSubnodeOfPath: [desktopApp trashPath]]) {
Modified: apps/gworkspace/trunk/FSNode/FSNode.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/FSNode.m?rev=39292&r1=39291&r2=39292&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/FSNode.m (original)
+++ apps/gworkspace/trunk/FSNode/FSNode.m Mon Jan 18 21:02:52 2016
@@ -1,6 +1,6 @@
/* FSNode.m
*
- * Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ * Copyright (C) 2004-2016 Free Software Foundation, Inc.
*
* Author: Enrico Sersale <[email protected]>
* Date: March 2004
@@ -29,6 +29,7 @@
#import "FSNodeRep.h"
#import "FSNFunctions.h"
+
@implementation FSNode
- (void)dealloc
@@ -557,34 +558,34 @@
flags.unknown = 1;
}
- ASSIGN (typeDescription, NSLocalizedString(@"symbolic link", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"symbolic
link", nil, [NSBundle bundleForClass:[self class]], @""));
}
- (NSString *)typeDescription
{
if (typeDescription == nil) {
if ([self isPlain]) {
- ASSIGN (typeDescription, NSLocalizedString(@"plain file", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"plain
file", nil, [NSBundle bundleForClass:[self class]], @""));
} else if ([self isDirectory]) {
if ([self isApplication]) {
- ASSIGN (typeDescription, NSLocalizedString(@"application", @""));
+ ASSIGN (typeDescription,
NSLocalizedStringFromTableInBundle(@"application", nil, [NSBundle
bundleForClass:[self class]], @""));
} else if ([self isPackage]) {
- ASSIGN (typeDescription, NSLocalizedString(@"plain file", @""));
+ ASSIGN (typeDescription,
NSLocalizedStringFromTableInBundle(@"package", nil, [NSBundle
bundleForClass:[self class]], @""));
} else if ([self isMountPoint]) {
- ASSIGN (typeDescription, NSLocalizedString(@"mount point", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"mount
point", nil, [NSBundle bundleForClass:[self class]], @""));
} else {
- ASSIGN (typeDescription, NSLocalizedString(@"directory", @""));
+ ASSIGN (typeDescription,
NSLocalizedStringFromTableInBundle(@"directory", nil, [NSBundle
bundleForClass:[self class]], @""));
}
} else if ([self isLink]) {
- ASSIGN (typeDescription, NSLocalizedString(@"symbolic link", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"symbolic
link", nil, [NSBundle bundleForClass:[self class]], @""));
} else if ([self isSocket]) {
- ASSIGN (typeDescription, NSLocalizedString(@"socket", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"socket",
nil, [NSBundle bundleForClass:[self class]], @""));
} else if ([self isCharspecial]) {
- ASSIGN (typeDescription, NSLocalizedString(@"character special", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"character
special", nil, [NSBundle bundleForClass:[self class]], @""));
} else if ([self isBlockspecial]) {
- ASSIGN (typeDescription, NSLocalizedString(@"block special", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"block
special", nil, [NSBundle bundleForClass:[self class]], @""));
} else {
- ASSIGN (typeDescription, NSLocalizedString(@"unknown", @""));
+ ASSIGN (typeDescription, NSLocalizedStringFromTableInBundle(@"unknown",
nil, [NSBundle bundleForClass:[self class]], @""));
}
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs