A simple generator of swift files from a given localized POeditor strings file.
POEditor-Parser is available through Mint
To install it, simply add the following line to your Mintfile:
hyperdevs-team/poeditor-parser-swift@2.2.0/bin/poe $APITOKEN $PROJECTID $LANGUAGE
--apitoken- The POEditor API token--projectid- The id of the project in POEditor--projectlanguage- The language code in POEditor--onlygenerate[default: false] ---swiftfile[default: Sources/Literals.swift] - The output Swift file directory.--stringsfile[default: Sources/Localizable.strings] - The output Strings file directory.--typename[default: Literals] - The type name that store all localized vars--tablename- The tableName value for NSLocalizedString--outputformat[default: Struct] - The output format for swift file (enum or struct)--keysformat[default: UpperCamelCase] - The format for the localized key--format[default: strings] - The translation file format to download and generate (stringsorxcstrings). Withxcstringsthe file at--stringsfileis written with a.xcstringsextension, containing the full downloaded String Catalog (all languages). The generated.swiftfile keeps the same format regardless of this option.--exportall[flag, default: off] - Download all languages at once (POEditoroptions=[{"export_all": 1}]). Pass it without a value (e.g.--exportall) to enable it; omit it to keep the default (single language). Combine it with--format xcstringsto get every language in a single.xcstringsfile. Does not have any effect when--formatisstrings.
Run poe help for more info
- Edilberto Lopez Torregrosa
- Raúl Pedraza León
- Jorge Revuelta
- Sebastián Varela
- David Martínez García
- Adrián Ruiz Lafuente
POEditor-Parser is available under the Apache 2.0. See the LICENSE file for more info.
If you want a similar solution for your Android projects, check this out: poeditor-android-gradle-plugin