How can I upload POT and download PO files with Localazy CLI?

When using Localazy CLI, setting up a comfortable POT/PO workflow requires some special settings, but is completely possible. Usually the source language file has a different format (POT) than files with translated strings in your project (PO).

We recommend setting two different rules for uploading:

  1. Upload your messages.pot file with "type": "pot" and also provide the file attribute to be sure that the filename is, in ideal case, something like messages.po to properly link your POT file to a PO file that is used for your source language internally by Localazy.
  2. To upload existing translations inside PO files, use "type": "po" and provide the same file attribute again.

Example configuration #️⃣

Your upload configuration should then look like this:

"files": [
  {
    "type": "pot",
    "pattern": "source/messages.pot",
    "file": "message.po"
  },
  {
    "group": "existing-translations"
    "type": "po",
    "pattern": "translations/*/messages.pot",
    "file": "message.po"
  }
]

Was this article helpful?

Please help us with improving our documentation.
We appreciate all your feedback.

Related terms

Last updated

26/05/2023