Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2567910/tmm
This project provides a Django backend that lets you manage your i18next translations in a custom UI. The Django backend also provides an API that serves the translations via JSON back to your application.
https://github.com/2567910/tmm
django i18n i18next i18next-backend python
Last synced: about 7 hours ago
JSON representation
This project provides a Django backend that lets you manage your i18next translations in a custom UI. The Django backend also provides an API that serves the translations via JSON back to your application.
- Host: GitHub
- URL: https://github.com/2567910/tmm
- Owner: 2567910
- License: mit
- Created: 2022-02-14T15:12:57.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T10:32:46.000Z (7 months ago)
- Last Synced: 2024-07-28T22:56:50.436Z (4 months ago)
- Topics: django, i18n, i18next, i18next-backend, python
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> We recommend using our translation as a service tool: [Weploy.ai](https://github.com/desentio/weploy-translate)
# Translation Managmant Microservice
This project provides a Django application that lets you manage translations and deliver them via REST API to any application that supports the i18next JSON format. This project is intended to be a Free open source and Self-hosted Docker alternative to existing SaaS Solutions (e.g. locize.com).
test1. [ Setup development environment](#setup-development-environment)
3. [Usage](#usage)
4. [License](#license)
## Setup development environment
### Setup Django application (local)The first thing to do is to clone the repository:
```sh
$ git clone https://github.com/2567910/tmm.git
$ cd tmm
```Create a virtual environment to install dependencies in and activate it:
```sh
$ python3 -m venv venv
$ source venv/bin/activate
```Then install the dependencies:
```sh
(env)$ pip install -r requirements.txt
```
Note the `(env)` in front of the prompt. This indicates that this terminal
session operates in a virtual environment set up by `virtualenv2`.Once `pip` has finished downloading the dependencies:
```sh
(env)$ python manage.py runserver
```
Next you will need to setup the database.
### Setup Database (local)
Open another terminal window and go to the root directory of the project and run:
```sh
$ docker-compose up postgres
```Switch back to the terminal window where the virtual env and migrate
```sh
(env)$ python manage.py migrate
```Create a superuser
```sh
(env)$ ./manage.py createsuperuser --username YOUR_SUPERUSER_NAME
```All done! After you run the command below the Django application should be visable under: `http://127.0.0.1:8000/admin/`.
```sh
(env)$ python manage.py runserver
```You should be able to use the created superuser credentials to log in to the admin.
> **Disclaimer**: This project includes an example dockerfile for Production. But you should configure it to your own needs.
>## Usage
Once you have a Django application running, and you are logged in, you should see the screen Below.
If you are logged in as an admin you should be able to create, delete and update Projects, Languages, TranslationKey and Translations.
You also have the option to Import existing .json i18next formatted translation files. Upon import, all data is overwritten, so be aware. Imported files do not have the rights to delete Translations or TranslationKeys.
To access the translations you have created from the REST API use the following pattern: `http://127.0.0.1:8000/translations/{PROJECT_NAME}/{LANGUAGE_CODE}`
We have also created a [demo React integration](https://github.com/2567910/tmm_react_integration). Feel free to use the integration code from there.
## License
The package is Open Source Software released under the [MIT License](LICENSE). It's developed by Lukas Seyfarth.