diff options
-rw-r--r-- | de-de/swift-de.html.markdown | 12 | ||||
-rw-r--r-- | es-es/swift-es.html.markdown | 12 | ||||
-rw-r--r-- | pt-br/swift-pt.html.markdown | 10 | ||||
-rw-r--r-- | pt-pt/swift-pt.html.markdown | 14 | ||||
-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 | 12 | ||||
-rw-r--r-- | zh-cn/swift-cn.html.markdown | 12 |
8 files changed, 48 insertions, 48 deletions
diff --git a/de-de/swift-de.html.markdown b/de-de/swift-de.html.markdown index b58a72d3..43b8c32a 100644 --- a/de-de/swift-de.html.markdown +++ b/de-de/swift-de.html.markdown @@ -440,13 +440,13 @@ if let circle = myEmptyCircle { // Wie Klassen auch können sie Methoden haben enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } @@ -455,7 +455,7 @@ enum Suit { // Enum-Werte können vereinfacht geschrieben werden, es muss nicht der Enum-Typ // genannt werden, wenn die Variable explizit deklariert wurde -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Nicht-Integer-Enums brauchen direkt zugewiesene "Rohwerte" enum BookName: String { diff --git a/es-es/swift-es.html.markdown b/es-es/swift-es.html.markdown index 8f63517a..ea892628 100644 --- a/es-es/swift-es.html.markdown +++ b/es-es/swift-es.html.markdown @@ -446,20 +446,20 @@ if let circle = myEmptyCircle { // Al igual que las clases, pueden contener métodos enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Los valores de enum permite la sintaxis corta, sin necesidad de poner // el tipo del enum cuando la variable es declarada de manera explícita -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Enums de tipo no-entero requiere asignaciones de valores crudas directas enum BookName: String { diff --git a/pt-br/swift-pt.html.markdown b/pt-br/swift-pt.html.markdown index ebf74b6f..bf410352 100644 --- a/pt-br/swift-pt.html.markdown +++ b/pt-br/swift-pt.html.markdown @@ -389,13 +389,13 @@ if mySquare === mySquare { // Podem conter métodos do mesmo jeito que classes. enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } diff --git a/pt-pt/swift-pt.html.markdown b/pt-pt/swift-pt.html.markdown index 9462ee1c..f7fab423 100644 --- a/pt-pt/swift-pt.html.markdown +++ b/pt-pt/swift-pt.html.markdown @@ -445,21 +445,21 @@ if let circle = myEmptyCircle { // Enums pode opcionalmente ser um tipo especifico ou não. // Enums podem conter métodos tal como as classes. -enum Suit { - case Spades, Hearts, Diamonds, Clubs +enum suit { + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Os valores de Enum permitem syntax reduzida, não é preciso escrever o tipo do enum // quando a variável é explicitamente definida. -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Enums que não sejam inteiros obrigam a atribuições valor bruto (raw value) diretas enum BookName: String { diff --git a/ru-ru/swift-ru.html.markdown b/ru-ru/swift-ru.html.markdown index 46a91660..24095ee5 100644 --- a/ru-ru/swift-ru.html.markdown +++ b/ru-ru/swift-ru.html.markdown @@ -535,20 +535,20 @@ if let circle = myEmptyCircle { // Они могут содержать методы подобно классам. enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Значения перечислений допускают сокращенный синтаксис, нет необходимости // указывать тип перечисления, когда переменная объявляется явно -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Значения нецелочисленных перечислений должны быть указаны явно // или могут выводится с помощью функции `rawValue` из имени diff --git a/swift.html.markdown b/swift.html.markdown index 46388ca5..577fa559 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -518,20 +518,20 @@ if let circle = myEmptyCircle { // They can contain methods like classes. enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Enum values allow short hand syntax, no need to type the enum type // when the variable is explicitly declared -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // String enums can have direct raw value assignments // or their raw values will be derived from the Enum field diff --git a/tr-tr/swift-tr.html.markdown b/tr-tr/swift-tr.html.markdown index e694d95d..c9473cb2 100644 --- a/tr-tr/swift-tr.html.markdown +++ b/tr-tr/swift-tr.html.markdown @@ -443,19 +443,19 @@ if let daire = benimBosDairem { // Sınıflar gibi metotlar içerebilirler. enum Kart { - case Kupa, Maca, Sinek, Karo + case kupa, maca, sinek, karo func getIcon() -> String { switch self { - case .Maca: return "♤" - case .Kupa: return "♡" - case .Karo: return "♢" - case .Sinek: return "♧" + case .maca: return "♤" + case .kupa: return "♡" + case .karo: return "♢" + case .sinek: return "♧" } } } // Enum değerleri kısayol syntaxa izin verir. Eğer değişken tipi açık olarak belirtildiyse enum tipini yazmaya gerek kalmaz. -var kartTipi: Kart = .Kupa +var kartTipi: Kart = .kupa // Integer olmayan enumlar direk değer (rawValue) atama gerektirir. enum KitapAdi: String { diff --git a/zh-cn/swift-cn.html.markdown b/zh-cn/swift-cn.html.markdown index cba9252d..7ebf8121 100644 --- a/zh-cn/swift-cn.html.markdown +++ b/zh-cn/swift-cn.html.markdown @@ -445,19 +445,19 @@ if let circle = myEmptyCircle { // 枚举可以像类一样,拥有方法 enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // 当变量类型明确指定为某个枚举类型时,赋值时可以省略枚举类型 -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // 非整型的枚举类型需要在定义时赋值 enum BookName: String { |