From 2f724659a777b95e4489d8dc1fd1f16506bf952b Mon Sep 17 00:00:00 2001 From: Sebastian Volland Date: Sat, 19 Mar 2016 18:30:38 +0100 Subject: [PATCH] Fix german l10n. Update german translation. Update german version of SUAutomaticUpdateAlert.xib (Button widths). Update CheckLocalizations.swift for Swift 2. --- Sparkle/CheckLocalizations.swift | 20 ++++---- Sparkle/de.lproj/SUAutomaticUpdateAlert.xib | 54 +++++++++------------ Sparkle/de.lproj/Sparkle.strings | 8 ++- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Sparkle/CheckLocalizations.swift b/Sparkle/CheckLocalizations.swift index f0c05797..431e8348 100755 --- a/Sparkle/CheckLocalizations.swift +++ b/Sparkle/CheckLocalizations.swift @@ -3,7 +3,7 @@ import Foundation func die(msg: String) { - println("ERROR: \(msg)") + print("ERROR: \(msg)") exit(1) } @@ -28,8 +28,8 @@ if enStringsDict == nil { } let enStringsDictKeys = enStringsDict!.allKeys -let dirPath = sparkleRoot! + "/Sparkle" -let dirContents = NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath, error: nil) as! [String] +let dirPath = NSString(string: sparkleRoot! + "/Sparkle") +let dirContents = try! NSFileManager.defaultManager().contentsOfDirectoryAtPath(dirPath as String) let css = "body { font-family: sans-serif; font-size: 10pt; }" + "h1 { font-size: 12pt; }" + @@ -51,14 +51,14 @@ head.addChild(NSXMLElement(name: "style", stringValue: css)) let locale = NSLocale.currentLocale() for dirEntry in dirContents { - if dirEntry.pathExtension != "lproj" || dirEntry == "en.lproj" { + if NSString(string: dirEntry).pathExtension != "lproj" || dirEntry == "en.lproj" { continue } - let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: dirEntry.stringByDeletingPathExtension) + let lang = locale.displayNameForKey(NSLocaleLanguageCode, value: NSString(string: dirEntry).stringByDeletingPathExtension) body.addChild(NSXMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))")) - let stringsPath = dirPath.stringByAppendingPathComponent(dirEntry).stringByAppendingPathComponent("Sparkle.strings") + let stringsPath = NSString(string: dirPath.stringByAppendingPathComponent(dirEntry)).stringByAppendingPathComponent("Sparkle.strings") let stringsDict = NSDictionary(contentsOfFile: stringsPath) if stringsDict == nil { die("Invalid strings file \(dirEntry)") @@ -90,12 +90,12 @@ for dirEntry in dirContents { let sorter = { (s1: String, s2: String) -> Bool in return s1 < s2 } - missing.sort(sorter) - unlocalized.sort(sorter) - unused.sort(sorter) + missing.sortInPlace(sorter) + unlocalized.sortInPlace(sorter) + unused.sortInPlace(sorter) let addRow = { (prefix: String, cssClass: String, key: String) -> Void in - body.addChild(NSXMLElement(name: "span", attributes: ["class": cssClass], stringValue: " ".join([prefix, key]) + "\n")) + body.addChild(NSXMLElement(name: "span", attributes: ["class": cssClass], stringValue: [prefix, key].joinWithSeparator(" ") + "\n")) } for key in missing { diff --git a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib index 665268ff..2672e10c 100644 --- a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib @@ -1,7 +1,8 @@ - + - + + @@ -14,26 +15,24 @@ - + - + - - + - @@ -44,9 +43,8 @@ - + - @@ -57,9 +55,8 @@ - + - + diff --git a/Sparkle/de.lproj/Sparkle.strings b/Sparkle/de.lproj/Sparkle.strings index 643af47f..1fc6a3d7 100644 --- a/Sparkle/de.lproj/Sparkle.strings +++ b/Sparkle/de.lproj/Sparkle.strings @@ -1,3 +1,5 @@ +"%1$@ %2$@ has been downloaded and is ready to use! This is an important update; would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ wurde heruntergeladen und steht zur Verwendung bereit! Dies ist eine wichtige Aktualisierung. Möchten Sie %1$@ jetzt durch die neue Version ersetzen und neu starten?"; + "%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ wurde heruntergeladen und steht zur Verwendung bereit! Möchten Sie %1$@ jetzt durch die neue Version ersetzen und neu starten?"; "%1$@ can't be updated when it's running from a read-only volume like a disk image or an optical drive. Move %1$@ to your Applications folder, relaunch it from there, and try again." = "%1$@ kann nicht aktualisiert werden, wenn es von einem Volumen ohne Schreibzugriff (z.B. Disk Image oder CD/DVD) gestartet wurde. Kopieren Sie %1$@ in den Programme Ordner, aktualisieren Sie es von dort."; @@ -8,7 +10,7 @@ "%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ ist verfügbar (Sie verwenden Version %3$@). Möchten Sie die neue Version jetzt herunterladen?"; /* Description text for SUUpdateAlert when the update informational with no download. */ -"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available--you have %3$@. Would you like to learn more about this update on the web?"; +"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ ist verfügbar (Sie verwenden Version %3$@). Möchten Sie mehr über diese Aktualisierung erfahren?"; "%@ downloaded" = "%@ heruntergeladen"; @@ -30,6 +32,8 @@ "An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Beim erneuten Starten von %1$@ ist ein Fehler aufgetreten. Die neue Version von %1$@ steht beim nächsten Programmstart zur Verfügung."; +"An important update to %@ is ready to install" = "Eine wichtige Aktualisierung von %@ steht zur Installation bereit"; + /* the unit for bytes */ "B" = "B"; @@ -65,6 +69,8 @@ "Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Soll %1$@ automatisch nach Aktualisierungen suchen? Sie können im %1$@-Menü auch manuell nach Aktualisierungen suchen."; +"The update is improperly signed." = "Die Aktualisierung ist nicht ordnungsgemäß signiert."; + "Update Error!" = "Fehler beim Aktualisieren!"; "Updating %@" = "Aktualisierung von %@";