Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/owowagency/owowgenerate-ios
iOS strings file parser & writer
https://github.com/owowagency/owowgenerate-ios
Last synced: 11 days ago
JSON representation
iOS strings file parser & writer
- Host: GitHub
- URL: https://github.com/owowagency/owowgenerate-ios
- Owner: owowagency
- License: mit
- Created: 2019-12-11T14:09:26.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-22T14:54:40.000Z (over 2 years ago)
- Last Synced: 2024-12-19T21:50:12.718Z (20 days ago)
- Language: Swift
- Size: 42 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# owowgenerate-ios
## 🧐 Readme
A tool, written in Swift, that parses iOS `Localizable.strings` files.
It currently reads a file `owowgenerate.json`. Example contents:
```json
{
"stringsFiles": [
"MyProject/nl.lproj/Localizable.strings",
"MyProject/en.lproj/Localizable.strings"
],
"tasks": [
{
"type": "generateSwiftUIMapping",
"output": "MyProject/Assets/Strings-SwiftUI.swift"
},
{
"type": "generateNSLocalizedStringMapping",
"output": "MyProject/Assets/Strings-NSLocalizedString.swift"
},
{
"type": "rewriteTranslationFiles"
}
]
}
```
See [Configuration.swift](Sources/owowgenerate-ios/Configuration/Configuration.swift) for details about the configuration options.## Features
- Generate a SwiftUI `Text` extension for typesafe access to strings. Comments are also copied into the `Text` init and generated properties.
- Generate other (`NSLocalizedString`) extensions for typesafe access to strings. Comments are also copied into the `NSLocalizedString` call.
- Rewrite secondary translation files, copying comments and general structure from the primary file.