You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, only first level keys in the strings object are used to generate enum.
Decodable models should be created so that xcstrings JSON file can be decoded to native objects, to support more features.
For example, if we can extract $key.localizations.en.stringUnit.value, we can add inline documents to enum case, so that when developer option-click a case name, the whole copy of a chosen language (en in this case) will be displayed.
Formats to be supported
Generated from SwiftUI
"Home" : {
},
Generated from SwiftUI, and an English translation is added
superarts
changed the title
Create Decodable Models to decode xcstrings JSON file
StringCatalogEnum: Create Decodable Models to decode xcstrings JSON file
Nov 12, 2023
Currently, only first level
keys
in thestrings
object are used to generateenum
.Decodable models should be created so that
xcstrings
JSON file can be decoded to native objects, to support more features.For example, if we can extract
$key.localizations.en.stringUnit.value
, we can add inline documents toenum case
, so that when developeroption-click
a case name, the whole copy of a chosen language (en
in this case) will be displayed.Formats to be supported
Generated from SwiftUI
"Home" : { },
Generated from SwiftUI, and an English translation is added
Manually added, English only
The text was updated successfully, but these errors were encountered: