Skip to content

Repository files navigation

POEditor-Parser

A simple generator of swift files from a given localized POeditor strings file.

Release Version Release Date GitHub codecov

Installation

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

Usage

/bin/poe $APITOKEN $PROJECTID $LANGUAGE

Options:

  • --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 (strings or xcstrings). With xcstrings the file at --stringsfile is written with a .xcstrings extension, containing the full downloaded String Catalog (all languages). The generated .swift file keeps the same format regardless of this option.
  • --exportall [flag, default: off] - Download all languages at once (POEditor options=[{"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 xcstrings to get every language in a single .xcstrings file. Does not have any effect when --format is strings.

Run poe help for more info

Authors & Collaborators

License

POEditor-Parser is available under the Apache 2.0. See the LICENSE file for more info.

Android alternative

If you want a similar solution for your Android projects, check this out: poeditor-android-gradle-plugin

About

A simple generator of swift files from a given localized strings POeditor file

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages