Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Strings: rename some vars for clarity purposes #33

Merged
merged 5 commits into from
May 8, 2017

Conversation

djbe
Copy link
Member

@djbe djbe commented May 7, 2017

Implements #5

Related to SwiftGen/templates#43

djbe added 2 commits May 7, 2017 23:43
- strings --> levels
- subenums --> children
- keytail --> name
@djbe djbe mentioned this pull request May 7, 2017
18 tasks
@djbe djbe added this to the 1.1.0 milestone May 7, 2017
@djbe djbe requested a review from AliSoftware May 7, 2017 22:16
@@ -67,7 +70,7 @@ extension StringsFileParser {
)
let tables: [[String: Any]] = [[
"name": tableName,
"strings": structuredStrings
"levels": structuredStrings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we keep the strings entry too (duplicate of levels) for 4.2.1 until we can remove it in 5.0.0, at least f we want to merge that for 4.2.1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme check, but I don't think tables.strings was ever released.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point, maybe not ^^

Copy link
Member Author

@djbe djbe May 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jup, never released:

(that's SwiftGenKit 1.0.1)

- `name` : `String` — name of the `.strings` file (usually `"Localizable"`)
- `levels`: `Array` — Tree structure of strings (based on dot syntax), each level has:
- `name` : `String` — name of the level (that is, part of the key split by `.` that we're describing)
- `children`: `Array` — list of sub-levels, repeating the structure mentioned above
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioned below?
Repeating the same structure as a level?

@@ -37,8 +37,11 @@ extension StringsFileParser {
let keytail = keyStructure.joined(separator: ".")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename the variable as well in the code for consistency?

@@ -135,6 +138,9 @@ extension StringsFileParser {
}

if !subenums.isEmpty {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename the variable in the code too for consistency

@AliSoftware AliSoftware merged commit 0ab2cb3 into master May 8, 2017
@AliSoftware AliSoftware deleted the feature/strings-rename-some-vars branch May 8, 2017 12:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants