From a0044511803016be0be7aa8179dcd5a9cf5f8bcd Mon Sep 17 00:00:00 2001 From: David Jennes Date: Wed, 24 May 2017 18:15:27 +0200 Subject: [PATCH 1/3] remove some old contexts --- Contexts/Colors/customname.plist | 57 ---- Contexts/Colors/text-customname.plist | 93 ------- Contexts/Fonts/customname.plist | 212 --------------- Contexts/Images/customname.plist | 98 ------- Contexts/Storyboards-iOS/customname.plist | 215 --------------- Contexts/Storyboards-macOS/customname.plist | 171 ------------ Contexts/Strings/defaults.plist | 245 ------------------ Contexts/Strings/entries.plist | 40 --- .../{customname.plist => localizable.plist} | 0 9 files changed, 1131 deletions(-) delete mode 100644 Contexts/Colors/customname.plist delete mode 100644 Contexts/Colors/text-customname.plist delete mode 100644 Contexts/Fonts/customname.plist delete mode 100644 Contexts/Images/customname.plist delete mode 100644 Contexts/Storyboards-iOS/customname.plist delete mode 100644 Contexts/Storyboards-macOS/customname.plist delete mode 100644 Contexts/Strings/defaults.plist delete mode 100644 Contexts/Strings/entries.plist rename Contexts/Strings/{customname.plist => localizable.plist} (100%) diff --git a/Contexts/Colors/customname.plist b/Contexts/Colors/customname.plist deleted file mode 100644 index 1a95a85..0000000 --- a/Contexts/Colors/customname.plist +++ /dev/null @@ -1,57 +0,0 @@ - - - - - colors - - - alpha - ff - blue - 66 - green - 96 - name - ArticleBody - red - 33 - - - alpha - ff - blue - cc - green - 66 - name - ArticleFootnote - red - ff - - - alpha - ff - blue - 66 - green - fe - name - ArticleTitle - red - 33 - - - alpha - cc - blue - ff - green - ff - name - private - red - ff - - - - diff --git a/Contexts/Colors/text-customname.plist b/Contexts/Colors/text-customname.plist deleted file mode 100644 index 8c01777..0000000 --- a/Contexts/Colors/text-customname.plist +++ /dev/null @@ -1,93 +0,0 @@ - - - - - colors - - - alpha - ff - blue - 66 - green - 96 - name - ArticleBody - red - 33 - - - alpha - ff - blue - cc - green - 66 - name - ArticleFootnote - red - ff - - - alpha - ff - blue - 66 - green - fe - name - ArticleTitle - red - 33 - - - alpha - ff - blue - cc - green - 66 - name - Cyan-Color - red - ff - - - alpha - cc - blue - ff - green - ff - name - NamedValue - red - ff - - - alpha - cc - blue - ff - green - ff - name - NestedNamedValue - red - ff - - - alpha - cc - blue - ff - green - ff - name - private - red - ff - - - - diff --git a/Contexts/Fonts/customname.plist b/Contexts/Fonts/customname.plist deleted file mode 100644 index 8b560a9..0000000 --- a/Contexts/Fonts/customname.plist +++ /dev/null @@ -1,212 +0,0 @@ - - - - - families - - - fonts - - - name - .SFNSDisplay-Black - path - SFNSDisplay-Black.otf - style - Black - - - name - .SFNSDisplay-Bold - path - SFNSDisplay-Bold.otf - style - Bold - - - name - .SFNSDisplay-Heavy - path - SFNSDisplay-Heavy.otf - style - Heavy - - - name - .SFNSDisplay-Regular - path - SFNSDisplay-Regular.otf - style - Regular - - - name - .SF NS Display - - - fonts - - - name - .SFNSText-Bold - path - SFNSText-Bold.otf - style - Bold - - - name - .SFNSText-Heavy - path - SFNSText-Heavy.otf - style - Heavy - - - name - .SFNSText-Regular - path - SFNSText-Regular.otf - style - Regular - - - name - .SF NS Text - - - fonts - - - name - Avenir-Black - path - Avenir.ttc - style - Black - - - name - Avenir-BlackOblique - path - Avenir.ttc - style - Black Oblique - - - name - Avenir-Book - path - Avenir.ttc - style - Book - - - name - Avenir-BookOblique - path - Avenir.ttc - style - Book Oblique - - - name - Avenir-Heavy - path - Avenir.ttc - style - Heavy - - - name - Avenir-HeavyOblique - path - Avenir.ttc - style - Heavy Oblique - - - name - Avenir-Light - path - Avenir.ttc - style - Light - - - name - Avenir-LightOblique - path - Avenir.ttc - style - Light Oblique - - - name - Avenir-Medium - path - Avenir.ttc - style - Medium - - - name - Avenir-MediumOblique - path - Avenir.ttc - style - Medium Oblique - - - name - Avenir-Oblique - path - Avenir.ttc - style - Oblique - - - name - Avenir-Roman - path - Avenir.ttc - style - Roman - - - name - Avenir - - - fonts - - - name - ZapfDingbatsITC - path - ZapfDingbats.ttf - style - Regular - - - name - Zapf Dingbats - - - fonts - - - name - private - path - class.ttf - style - internal - - - name - public - - - - diff --git a/Contexts/Images/customname.plist b/Contexts/Images/customname.plist deleted file mode 100644 index 8f44284..0000000 --- a/Contexts/Images/customname.plist +++ /dev/null @@ -1,98 +0,0 @@ - - - - - catalogs - - - assets - - - items - - name - Empty - - - items - - - name - Banana - value - Exotic/Banana - - - name - Mango - value - Exotic/Mango - - - name - Exotic - - - name - private - value - private - - - items - - - name - Apricot - value - Round/Apricot - - - name - Orange - value - Round/Orange - - - items - - - name - Apple - value - Round/Apple - - - items - - - name - Cherry - value - Round/Double/Cherry - - - name - Double - - - name - Tomato - value - Round/Tomato - - - name - Red - - - name - Round - - - name - Images - - - - diff --git a/Contexts/Storyboards-iOS/customname.plist b/Contexts/Storyboards-iOS/customname.plist deleted file mode 100644 index 48e246c..0000000 --- a/Contexts/Storyboards-iOS/customname.plist +++ /dev/null @@ -1,215 +0,0 @@ - - - - - modules - - CustomSegue - LocationPicker - SlackTextViewController - - storyboards - - - initialScene - - customClass - LocationPickerViewController - customModule - LocationPicker - - name - AdditionalImport - scenes - - - customClass - SLKTextViewController - customModule - SlackTextViewController - identifier - public - - - segues - - - customClass - SlideDownSegue - customModule - CustomSegue - identifier - private - - - - - initialScene - - baseType - NavigationController - - name - Anonymous - scenes - - segues - - - - name - Dependency - scenes - - - baseType - ViewController - identifier - Dependent - - - segues - - - - initialScene - - baseType - ViewController - - name - Message - scenes - - - baseType - ViewController - identifier - Composer - - - baseType - TableViewController - identifier - MessagesList - - - baseType - NavigationController - identifier - NavCtrl - - - customClass - XXPickerViewController - customModule - - identifier - URLChooser - - - segues - - - customClass - CustomSegueClass2 - customModule - - identifier - CustomBack - - - customClass - - customModule - - identifier - Embed - - - customClass - - customModule - - identifier - NonCustom - - - customClass - CustomSegueClass - customModule - - identifier - Show-NavCtrl - - - - - name - Placeholder - scenes - - - baseType - NavigationController - identifier - Navigation - - - segues - - - - initialScene - - customClass - CreateAccViewController - customModule - - - name - Wizard - scenes - - - baseType - ViewController - identifier - Accept-CGU - - - customClass - CreateAccViewController - customModule - - identifier - CreateAccount - - - baseType - TableViewController - identifier - Preferences - - - baseType - ViewController - identifier - Validate_Password - - - segues - - - customClass - - customModule - - identifier - ShowPassword - - - - - - diff --git a/Contexts/Storyboards-macOS/customname.plist b/Contexts/Storyboards-macOS/customname.plist deleted file mode 100644 index ae85ac4..0000000 --- a/Contexts/Storyboards-macOS/customname.plist +++ /dev/null @@ -1,171 +0,0 @@ - - - - - modules - - FadeSegue - PrefsWindowController - - storyboards - - - name - AdditionalImport - scenes - - - customClass - DBPrefsWindowController - customModule - PrefsWindowController - identifier - private - - - segues - - - - name - Anonymous - scenes - - segues - - - - name - Dependency - scenes - - - baseType - ViewController - identifier - Dependent - - - segues - - - - name - Message - scenes - - - baseType - ViewController - identifier - MessageDetails - - - baseType - ViewController - identifier - MessageList - - - baseType - ViewController - identifier - MessageListFooter - - - customClass - CustomTabViewController - customModule - - identifier - MessagesTab - - - baseType - SplitViewController - identifier - SplitMessages - - - baseType - WindowController - identifier - WindowCtrl - - - segues - - - customClass - - customModule - - identifier - Embed - - - customClass - - customModule - - identifier - Modal - - - customClass - - customModule - - identifier - Popover - - - customClass - - customModule - - identifier - Sheet - - - customClass - - customModule - - identifier - Show - - - customClass - FadeSegue - customModule - FadeSegue - identifier - public - - - - - name - Placeholder - scenes - - - baseType - ControllerPlaceholder - identifier - Dependent - - - baseType - WindowController - identifier - Window - - - segues - - - - - diff --git a/Contexts/Strings/defaults.plist b/Contexts/Strings/defaults.plist deleted file mode 100644 index 3d98247..0000000 --- a/Contexts/Strings/defaults.plist +++ /dev/null @@ -1,245 +0,0 @@ - - - - - tables - - - levels - - children - - - name - Apples - strings - - - key - apples.count - name - count - translation - You have %d apples - types - - Int - - - - - - name - Bananas - strings - - - key - bananas.owner - name - owner - translation - Those %d bananas belong to %@. - types - - Int - String - - - - - - children - - - children - - - children - - - children - - - children - - - children - - - children - - - children - - - children - - - children - - - children - - - name - Is - strings - - - key - settings.navigation-bar.title.deeper.than.we.can.handle.no.really.this.is.deep - name - deep - translation - DeepSettings - - - - - name - This - - - name - Really - - - name - No - - - name - Handle - - - name - Can - - - name - We - - - name - Than - - - name - Deeper - - - name - Even - strings - - - key - settings.navigation-bar.title.even.deeper - name - deeper - translation - Settings - - - - - name - Title - - - name - Navigation_Bar - strings - - - key - settings.navigation-bar.self - name - self - translation - Some Reserved Keyword there - - - - - name - User_Profile_Section - strings - - - key - seTTings.uSer-proFile-sectioN.footer_text - name - footer_text - translation - Here you can change some user profile settings. - - - key - SETTINGS.USER_PROFILE_SECTION.HEADER_TITLE - name - HEADER_TITLE - translation - User Profile Settings - - - - - name - Settings - - - strings - - - key - alert_message - name - alert_message - translation - Some alert body there - - - key - alert_title - name - alert_title - translation - Title of the alert - - - key - ObjectOwnership - name - ObjectOwnership - translation - These are %3$@'s %1$d %2$@. - types - - Int - String - String - - - - key - private - name - private - translation - Hello, my name is %@ and I'm %d - types - - String - Int - - - - - name - Localizable - - - - diff --git a/Contexts/Strings/entries.plist b/Contexts/Strings/entries.plist deleted file mode 100644 index 0f5f862..0000000 --- a/Contexts/Strings/entries.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - tables - - - levels - - strings - - - key - Greetings - name - Greetings - translation - Hello, my name is %@ and I'm %d - types - - String - Int - - - - key - Title - name - Title - translation - My awesome title - - - - name - Localizable - - - - diff --git a/Contexts/Strings/customname.plist b/Contexts/Strings/localizable.plist similarity index 100% rename from Contexts/Strings/customname.plist rename to Contexts/Strings/localizable.plist From 9f800b14802513997e5c936d31dbae6d1400ef9f Mon Sep 17 00:00:00 2001 From: David Jennes Date: Wed, 24 May 2017 18:18:50 +0200 Subject: [PATCH 2/3] update tests --- ...swift => flat-swift2-context-localizable-customname.swift} | 0 ...wift => flat-swift2-context-localizable-no-comments.swift} | 0 ...t-defaults.swift => flat-swift2-context-localizable.swift} | 0 ...swift => flat-swift3-context-localizable-customname.swift} | 0 ...wift => flat-swift3-context-localizable-no-comments.swift} | 0 ...t-defaults.swift => flat-swift3-context-localizable.swift} | 0 ...=> structured-swift2-context-localizable-customname.swift} | 0 ...> structured-swift2-context-localizable-no-comments.swift} | 0 ...ults.swift => structured-swift2-context-localizable.swift} | 0 ...=> structured-swift3-context-localizable-customname.swift} | 0 ...> structured-swift3-context-localizable-no-comments.swift} | 0 ...ults.swift => structured-swift3-context-localizable.swift} | 0 Tests/TemplatesTests/StringsTests.swift | 4 ++-- 13 files changed, 2 insertions(+), 2 deletions(-) rename Tests/Expected/Strings/{flat-swift2-context-defaults-customname.swift => flat-swift2-context-localizable-customname.swift} (100%) rename Tests/Expected/Strings/{flat-swift2-context-defaults-no-comments.swift => flat-swift2-context-localizable-no-comments.swift} (100%) rename Tests/Expected/Strings/{flat-swift2-context-defaults.swift => flat-swift2-context-localizable.swift} (100%) rename Tests/Expected/Strings/{flat-swift3-context-defaults-customname.swift => flat-swift3-context-localizable-customname.swift} (100%) rename Tests/Expected/Strings/{flat-swift3-context-defaults-no-comments.swift => flat-swift3-context-localizable-no-comments.swift} (100%) rename Tests/Expected/Strings/{flat-swift3-context-defaults.swift => flat-swift3-context-localizable.swift} (100%) rename Tests/Expected/Strings/{structured-swift2-context-defaults-customname.swift => structured-swift2-context-localizable-customname.swift} (100%) rename Tests/Expected/Strings/{structured-swift2-context-defaults-no-comments.swift => structured-swift2-context-localizable-no-comments.swift} (100%) rename Tests/Expected/Strings/{structured-swift2-context-defaults.swift => structured-swift2-context-localizable.swift} (100%) rename Tests/Expected/Strings/{structured-swift3-context-defaults-customname.swift => structured-swift3-context-localizable-customname.swift} (100%) rename Tests/Expected/Strings/{structured-swift3-context-defaults-no-comments.swift => structured-swift3-context-localizable-no-comments.swift} (100%) rename Tests/Expected/Strings/{structured-swift3-context-defaults.swift => structured-swift3-context-localizable.swift} (100%) diff --git a/Tests/Expected/Strings/flat-swift2-context-defaults-customname.swift b/Tests/Expected/Strings/flat-swift2-context-localizable-customname.swift similarity index 100% rename from Tests/Expected/Strings/flat-swift2-context-defaults-customname.swift rename to Tests/Expected/Strings/flat-swift2-context-localizable-customname.swift diff --git a/Tests/Expected/Strings/flat-swift2-context-defaults-no-comments.swift b/Tests/Expected/Strings/flat-swift2-context-localizable-no-comments.swift similarity index 100% rename from Tests/Expected/Strings/flat-swift2-context-defaults-no-comments.swift rename to Tests/Expected/Strings/flat-swift2-context-localizable-no-comments.swift diff --git a/Tests/Expected/Strings/flat-swift2-context-defaults.swift b/Tests/Expected/Strings/flat-swift2-context-localizable.swift similarity index 100% rename from Tests/Expected/Strings/flat-swift2-context-defaults.swift rename to Tests/Expected/Strings/flat-swift2-context-localizable.swift diff --git a/Tests/Expected/Strings/flat-swift3-context-defaults-customname.swift b/Tests/Expected/Strings/flat-swift3-context-localizable-customname.swift similarity index 100% rename from Tests/Expected/Strings/flat-swift3-context-defaults-customname.swift rename to Tests/Expected/Strings/flat-swift3-context-localizable-customname.swift diff --git a/Tests/Expected/Strings/flat-swift3-context-defaults-no-comments.swift b/Tests/Expected/Strings/flat-swift3-context-localizable-no-comments.swift similarity index 100% rename from Tests/Expected/Strings/flat-swift3-context-defaults-no-comments.swift rename to Tests/Expected/Strings/flat-swift3-context-localizable-no-comments.swift diff --git a/Tests/Expected/Strings/flat-swift3-context-defaults.swift b/Tests/Expected/Strings/flat-swift3-context-localizable.swift similarity index 100% rename from Tests/Expected/Strings/flat-swift3-context-defaults.swift rename to Tests/Expected/Strings/flat-swift3-context-localizable.swift diff --git a/Tests/Expected/Strings/structured-swift2-context-defaults-customname.swift b/Tests/Expected/Strings/structured-swift2-context-localizable-customname.swift similarity index 100% rename from Tests/Expected/Strings/structured-swift2-context-defaults-customname.swift rename to Tests/Expected/Strings/structured-swift2-context-localizable-customname.swift diff --git a/Tests/Expected/Strings/structured-swift2-context-defaults-no-comments.swift b/Tests/Expected/Strings/structured-swift2-context-localizable-no-comments.swift similarity index 100% rename from Tests/Expected/Strings/structured-swift2-context-defaults-no-comments.swift rename to Tests/Expected/Strings/structured-swift2-context-localizable-no-comments.swift diff --git a/Tests/Expected/Strings/structured-swift2-context-defaults.swift b/Tests/Expected/Strings/structured-swift2-context-localizable.swift similarity index 100% rename from Tests/Expected/Strings/structured-swift2-context-defaults.swift rename to Tests/Expected/Strings/structured-swift2-context-localizable.swift diff --git a/Tests/Expected/Strings/structured-swift3-context-defaults-customname.swift b/Tests/Expected/Strings/structured-swift3-context-localizable-customname.swift similarity index 100% rename from Tests/Expected/Strings/structured-swift3-context-defaults-customname.swift rename to Tests/Expected/Strings/structured-swift3-context-localizable-customname.swift diff --git a/Tests/Expected/Strings/structured-swift3-context-defaults-no-comments.swift b/Tests/Expected/Strings/structured-swift3-context-localizable-no-comments.swift similarity index 100% rename from Tests/Expected/Strings/structured-swift3-context-defaults-no-comments.swift rename to Tests/Expected/Strings/structured-swift3-context-localizable-no-comments.swift diff --git a/Tests/Expected/Strings/structured-swift3-context-defaults.swift b/Tests/Expected/Strings/structured-swift3-context-localizable.swift similarity index 100% rename from Tests/Expected/Strings/structured-swift3-context-defaults.swift rename to Tests/Expected/Strings/structured-swift3-context-localizable.swift diff --git a/Tests/TemplatesTests/StringsTests.swift b/Tests/TemplatesTests/StringsTests.swift index 6215347..8ed04e6 100644 --- a/Tests/TemplatesTests/StringsTests.swift +++ b/Tests/TemplatesTests/StringsTests.swift @@ -9,12 +9,12 @@ import XCTest class StringsTests: XCTestCase { enum Contexts { - static let all = ["empty", "defaults"] + static let all = ["empty", "localizable"] } // generate variations to test customname generation let variations: VariationGenerator = { name, context in - guard name == "defaults" else { return [(context: context, suffix: "")] } + guard name == "localizable" else { return [(context: context, suffix: "")] } return [ (context: context, From 0b9a07b1d514833c6061dca831cc875d276d34aa Mon Sep 17 00:00:00 2001 From: David Jennes Date: Wed, 24 May 2017 19:29:18 +0200 Subject: [PATCH 3/3] changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f165b7..936e27e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ _None_ * Removed deprecated variables. See [SwiftGenKit#5](https://github.com/SwiftGen/SwiftGenKit/issues/5) for more information. [David Jennes](https://github.com/djbe) [#45](https://github.com/SwiftGen/templates/issues/45) + [#50](https://github.com/SwiftGen/templates/issues/50) ## 1.1.0