Revision: 7212
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7212&view=rev
Author:   hofman
Date:     2011-04-15 11:39:15 +0000 (Fri, 15 Apr 2011)

Log Message:
-----------
localize size units

Modified Paths:
--------------
    trunk/Dutch.lproj/Localizable.strings
    trunk/English.lproj/Localizable.strings
    trunk/French.lproj/Localizable.strings
    trunk/German.lproj/Localizable.strings
    trunk/Italian.lproj/Localizable.strings
    trunk/Japanese.lproj/Localizable.strings
    trunk/SKInfoWindowController.m
    trunk/SKMainWindowController.m
    trunk/Spanish.lproj/Localizable.strings
    trunk/pl.lproj/Localizable.strings
    trunk/ru.lproj/Localizable.strings
    trunk/zh_TW.lproj/Localizable.strings

Modified: trunk/Dutch.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/English.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/French.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/German.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/Italian.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/Japanese.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/SKInfoWindowController.m
===================================================================
--- trunk/SKInfoWindowController.m      2011-04-13 13:05:06 UTC (rev 7211)
+++ trunk/SKInfoWindowController.m      2011-04-15 11:39:15 UTC (rev 7212)
@@ -198,38 +198,38 @@
     
     if (size >> 40 == 0) {
         if (size == 0) {
-            [string appendString:@"zero bytes"];
+            [string appendFormat:@"0 %@", NSLocalizedString(@"bytes", @"size 
unit")];
         } else if (size < 1024) {
-            [string appendFormat:@"%qu bytes", size];
+            [string appendFormat:@"%qu %@", size, NSLocalizedString(@"bytes", 
@"size unit")];
         } else {
             UInt32 adjSize = size >> 10;
             if (adjSize < 1024) {
-                [string appendFormat:@"%.1f KB", size / 1024.0f];
+                [string appendFormat:@"%.1f KB", size / 1024.0f, 
NSLocalizedString(@"KB", @"size unit")];
             } else {
                 adjSize >>= 10;
                 size >>= 10;
                 if (adjSize < 1024) {
-                    [string appendFormat:@"%.1f MB", size / 1024.0f];
+                    [string appendFormat:@"%.1f MB", size / 1024.0f, 
NSLocalizedString(@"MB", @"size unit")];
                 } else {
                     //adjSize >>= 10;
                     size >>= 10;
-                    [string appendFormat:@"%.1f GB", size / 1024.0f];
+                    [string appendFormat:@"%.1f GB", size / 1024.0f, 
NSLocalizedString(@"GB", @"size unit")];
                 }
             }
         }
     } else {
         UInt32 adjSize = size >> 40; size >>= 30;
         if (adjSize < 1024) {
-            [string appendFormat:@"%.1f TB", size / 1024.0f];
+            [string appendFormat:@"%.1f TB", size / 1024.0f, 
NSLocalizedString(@"TB", @"size unit")];
         } else {
             adjSize >>= 10;
             size >>= 10;
             if (adjSize < 1024) {
-                [string appendFormat:@"%.1f PB", size / 1024.0f];
+                [string appendFormat:@"%.1f PB", size / 1024.0f, 
NSLocalizedString(@"PB", @"size unit")];
             } else {
                 //adjSize >>= 10;
                 size >>= 10;
-                [string appendFormat:@"%.1f EB", size / 1024.0f];
+                [string appendFormat:@"%.1f EB", size / 1024.0f, 
NSLocalizedString(@"EB", @"size unit")];
             }
         }
     }
@@ -238,7 +238,7 @@
     
     [formatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
     [formatter setNumberStyle:NSNumberFormatterDecimalStyle];
-    [string appendFormat:@" (%@ bytes)", [formatter stringFromNumber:[NSNumber 
numberWithUnsignedLongLong:logicalSize]]];
+    [string appendFormat:@" (%@ %@)", [formatter stringFromNumber:[NSNumber 
numberWithUnsignedLongLong:logicalSize]], NSLocalizedString(@"bytes", @"size 
unit")];
     
     return string;
 }
@@ -246,7 +246,7 @@
 static inline 
 NSString *SKSizeString(NSSize size, NSSize altSize) {
     BOOL useMetric = [[[NSLocale currentLocale] 
objectForKey:NSLocaleUsesMetricSystem] boolValue];
-    NSString *units = useMetric ? @"cm" : @"in";
+    NSString *units = useMetric ? NSLocalizedString(@"cm", @"size unit") : 
NSLocalizedString(@"in", @"size unit");
     CGFloat factor = useMetric ? 0.035277778 : 0.013888889;
     if (NSEqualSizes(size, altSize))
         return [NSString stringWithFormat:@"%.1f x %.1f %@", size.width * 
factor, size.height * factor, units];

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2011-04-13 13:05:06 UTC (rev 7211)
+++ trunk/SKMainWindowController.m      2011-04-15 11:39:15 UTC (rev 7212)
@@ -619,7 +619,7 @@
     if (NSEqualRects(rect, NSZeroRect) == NO) {
         if ([statusBar rightState] == NSOnState) {
             BOOL useMetric = [[[NSLocale currentLocale] 
objectForKey:NSLocaleUsesMetricSystem] boolValue];
-            NSString *units = useMetric ? @"cm" : @"in";
+            NSString *units = useMetric ? NSLocalizedString(@"cm", @"size 
unit") : NSLocalizedString(@"in", @"size unit");
             CGFloat factor = useMetric ? 0.035277778 : 0.013888889;
             message = [NSString stringWithFormat:@"%.2f %C %.2f @ (%.2f, %.2f) 
%@", NSWidth(rect) * factor, MULTIPLICATION_SIGN_CHARACTER, NSHeight(rect) * 
factor, NSMinX(rect) * factor, NSMinY(rect) * factor, units];
         } else {

Modified: trunk/Spanish.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/pl.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/ru.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/zh_TW.lproj/Localizable.strings
===================================================================
(Binary files differ)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to