Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@lokalise/connector-adapter-common

Package Overview
Dependencies
Maintainers
20
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lokalise/connector-adapter-common

Common interfaces for Composed Connector adapters

latest
npmnpm
Version
1.2.0
Version published
Maintainers
20
Created
Source

Template connector for Lokalise content type app engines

Lokalise content exchange apps facilitate the exchange of translatable content between Lokalise and third party content platforms. Users interact with them to connect both systems, select the content they want to translate, transfer it to Lokalise, see the translation status, and send the translations back to the content platform.

You can build and publish your own content exchange app by building a connector for the Lokalise content engine. The content engine will take care of the UI and handle the standard install, config and content management flows, while the connector will act as a bridge between the content platform and Lokalise content engine.

 ------------------     -------------------------     ----------------
| Your content app | = | Lokalise content engine | + | Your connector |
 ------------------     -------------------------     ----------------

In this repository you will find TypeScript code that you can use as a template for your Lokalise content exchange connector.

  • The technical requirements of a connector are detailed on Lokalise Developer Hub.
  • The OpenAPI schema describes the endpoints that must be served by a connector.

Development

To start development of a new connector:

  • Copy this repository code to your repository

  • Replace all entries template with yourConnectorName and Template with YourConnectorName

  • Start implementing your connector specific logic replacing TODOs. Note that field values in cacheItemStructure of envResponseBody should be in the following format:

    • First letter of the first name word should be capitalized.
      • Wrong: "author"
      • Correct: "Author"
    • First letter of the second, etc word in name should be lower case.
      • Wrong: "Group Name"
      • Correct: "Group name"
    • Concatenated words should be split.
      • Wrong: "GroupName"
      • Correct: "Group name"
    • The field name should be meaningful to the user because it appears on the UI, and it helps users identify their content.

    In response all DateTime fields from cacheItem should be converted in format yyyy-mm-dd.

    • Wrong: fields: {updatedAt: "15.06.2022"}
    • Correct: fields: {updatedAt: "2022-06-15"}
  • Remove current section from README

Installation

Add .env file to your project root directory based on .env.default.

For development, run the dev script:

npm install
npm run start:dev

The app is available at: http://localhost:3000/ (If HOST_APP_PORT was not changed)

Run tests:

npm run test

Run formatting:

npm run lint:fix

Run linter:

npm run lint

Openapi

Openapi docs are available at connector-openapi

License

This library is licensed under the Apache 2.0 license.

Copyright (c) Lokalise.

FAQs

Package last updated on 03 Oct 2025

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