KantaSync Plugin

This plugin for Kanta allows easily synchronizing translations from your dev/staging environment, directly into the production.

Installation

Add KantaSync plugin to your deps list:

def deps do
  [
    {:kanta_sync_plugin, "~> 0.1.0"}
  ]
end

Create a new migration file and add the KantaSync migrations setup:

defmodule KantaTest.Repo.Migrations.AddKantaSyncTables do
  use Ecto.Migration

  def up do
    Kanta.Sync.Migration.up(version: 1)
  end

  def down do
    Kanta.Sync.Migration.down(version: 1)
  end
end

KantaSync plugin creates table kanta_sync_information where information about the last fetch from the production is stored, to send only necessary changes instead of a full translations list when synchronizing.

Make sure that you have the Kanta API endpoint configured:

scope "/" do 
  kanta_api("/kanta-api")
end 

Environment variables