Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poeditor-sync

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poeditor-sync

Command line client for POEditor service

  • 0.5
  • Source
  • PyPI
  • Socket score

Maintainers
1

POEditor sync

Tests poeditor-sync

A commandline tool for synchronizing your project's translation with POEditor.

The script uses Click library to wrap POEditor API client into a commandline tool that can be used manually or inside shell scripts.

Installation

pip install poeditor-sync

Usage

Configuration

Create a config file poeditor.yml to link your project with a POEditor project and define paths to translation files. Multiple projects are supported.

api_token: ABC123...
projects:
  - id: 12345
    format: po
    # generic path to translation file
    terms_path: locale/{language_code}/LC_MESSAGES/django.po
    # alternatively, specify per-language path
    terms:
      en: locale/en/LC_MESSAGES/django.po
      pl: locale/pl/LC_MESSAGES/django.po
  - id: 54321
    format: po
    terms_path: locale/{language_code}/LC_MESSAGES/djangojs.po
    terms:
      en: locale/en/LC_MESSAGES/djangojs.po
      pl: locale/pl/LC_MESSAGES/djangojs.po

If you're planning to commit the config file into your repository or share it with someone, it is recommend that the API token in your config file be a read-only token. You can use a separate token for uploads and pass it using --token option or POEDITOR_TOKEN environment variable.

Commands:

# View usage instructions
poeditor --help
# generate config file
poeditor init {project-id}
# List projects and their translation languages
poeditor project-details
# download translations
poeditor pull
# Upload local translations to poeditor
poeditur push
# Upload only one language and user a different API token:
poeditur --language pl --token=123ABCD push
# Upload only terms (after adding new strings to the project)
poeditor push-terms --sync-terms --overwrite

Options

Optionenvironment variabledefault valuedescription
--tokenPOEDITOR_TOKENapi_token from config fileAuthentication token for POEditor. Overrides value from config file.
--config-filePOEDITOR_CONFIG_FILEpoeditor.ymlPath to the project config file in yaml format
--languagePOEDITOR_LANGUAGEOperate only on this language

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc