diff options
-rw-r--r-- | de-de/swift-de.html.markdown | 14 | ||||
-rw-r--r-- | es-es/swift-es.html.markdown | 12 | ||||
-rw-r--r-- | pt-pt/swift-pt.html.markdown | 12 | ||||
-rw-r--r-- | ru-ru/swift-ru.html.markdown | 12 | ||||
-rw-r--r-- | swift.html.markdown | 12 | ||||
-rw-r--r-- | tr-tr/swift-tr.html.markdown | 14 | ||||
-rw-r--r-- | zh-cn/swift-cn.html.markdown | 12 |
7 files changed, 44 insertions, 44 deletions
diff --git a/de-de/swift-de.html.markdown b/de-de/swift-de.html.markdown index c21b7e36..08f72a35 100644 --- a/de-de/swift-de.html.markdown +++ b/de-de/swift-de.html.markdown @@ -467,23 +467,23 @@ print("Name: \(BookName.john.rawValue)") // Enum mit assoziierten Werten enum Furniture { // mit Int assoziiert - case Desk(height: Int) + case desk(height: Int) // mit String und Int assoziiert - case Chair(String, Int) - + case chair(String, Int) + func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/es-es/swift-es.html.markdown b/es-es/swift-es.html.markdown index cd16d318..22e3c532 100644 --- a/es-es/swift-es.html.markdown +++ b/es-es/swift-es.html.markdown @@ -471,23 +471,23 @@ print("Name: \(BookName.john.rawValue)") // Enum con valores asociados enum Furniture { // Asociación con Int - case Desk(height: Int) + case desk(height: Int) // Asociación con String e Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/pt-pt/swift-pt.html.markdown b/pt-pt/swift-pt.html.markdown index 5de2e13b..6b263942 100644 --- a/pt-pt/swift-pt.html.markdown +++ b/pt-pt/swift-pt.html.markdown @@ -471,23 +471,23 @@ print("Name: \(BookName.john.rawValue)") // Enum com valores associados enum Furniture { // Associar com um inteiro (Int) - case Desk(height: Int) + case desk(height: Int) // Associar com uma String e um Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/ru-ru/swift-ru.html.markdown b/ru-ru/swift-ru.html.markdown index 5aa3d8e8..f2b1fd36 100644 --- a/ru-ru/swift-ru.html.markdown +++ b/ru-ru/swift-ru.html.markdown @@ -561,23 +561,23 @@ print("Имя: \(BookName.john.rawValue)") // Перечисление (enum) со связанными значениями enum Furniture { // Связать с типом Int - case Desk(height: Int) + case desk(height: Int) // Связать с типами String и Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Письменный стол высотой \(height) см." - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Стул марки \(brand) высотой \(height) см." } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Письменный стол высотой 80 см." -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Стул марки Foo высотой 40 см." diff --git a/swift.html.markdown b/swift.html.markdown index a3b33e25..516debed 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -544,23 +544,23 @@ print("Name: \(BookName.john.rawValue)") // Enum with associated Values enum Furniture { // Associate with Int - case Desk(height: Int) + case desk(height: Int) // Associate with String and Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/tr-tr/swift-tr.html.markdown b/tr-tr/swift-tr.html.markdown index 5e09daa9..4c2cf59b 100644 --- a/tr-tr/swift-tr.html.markdown +++ b/tr-tr/swift-tr.html.markdown @@ -467,23 +467,23 @@ print("Name: \(KitapAdi.john.rawValue)") // Değerlerle ilişkilendirilmiş Enum enum Mobilya { // Int ile ilişkilendirilmiş - case Masa(yukseklik: Int) + case masa(yukseklik: Int) // String ve Int ile ilişkilendirilmiş - case Sandalye(String, Int) - + case sandalye(String, Int) + func aciklama() -> String { switch self { - case .Masa(let yukseklik): + case .masa(let yukseklik): return "Masa boyu \(yukseklik) cm" - case .Sandalye(let marka, let yukseklik): + case .sandalye(let marka, let yukseklik): return "\(brand) marka sandalyenin boyu \(yukseklik) cm" } } } -var masa: Mobilya = .Masa(yukseklik: 80) +var masa: Mobilya = .masa(yukseklik: 80) print(masa.aciklama()) // "Masa boyu 80 cm" -var sandalye = Mobilya.Sandalye("Foo", 40) +var sandalye = Mobilya.sandalye("Foo", 40) print(sandalye.aciklama()) // "Foo marka sandalyenin boyu 40 cm" diff --git a/zh-cn/swift-cn.html.markdown b/zh-cn/swift-cn.html.markdown index 002b117f..c25b2918 100644 --- a/zh-cn/swift-cn.html.markdown +++ b/zh-cn/swift-cn.html.markdown @@ -469,23 +469,23 @@ print("Name: \(BookName.john.rawValue)") // 与特定数据类型关联的枚举 enum Furniture { // 和 Int 型数据关联的枚举记录 - case Desk(height: Int) + case desk(height: Int) // 和 String, Int 关联的枚举记录 - case Chair(brand: String, height: Int) + case chair(brand: String, height: Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair(brand: "Foo", height: 40) +var chair = Furniture.chair(brand: "Foo", height: 40) print(chair.description()) // "Chair of Foo with 40 cm" |