txty-io / texterify

The translation and localization management system.
https://texterify.com
Other
169 stars 14 forks source link

Support for Laravel Framework #154

Closed jinrenjie closed 1 year ago

jinrenjie commented 1 year ago

Hi, I am a PHPer. I have researched a lot of TMS before, and found texterify by accident. After experiencing it, I found that it is more friendly than weblate, and it can meet most of my needs!

Because my backend project is developed using the Laravel framework, I am implementing a Laravel framework CLI management tool with reference to the texterify API.

I want this CLI to do:

  1. Scan all .json and .php array files in the specified path, and synchronize Key to texterify;
  2. Get the default language of the project from texterify, and synchronize the translation content corresponding to the scanned Keys to Translation;
  3. When updating the translation of a Translation, if the translation content before and after modification is inconsistent, it is hoped that the status of other Translations can be marked as untranslated, to prevent developers from updating the translation of the default language, while translators in other languages will not aware of this;
  4. Get all the Translations of the entire project by querying the Translation API under the project, and then split them into multiple PHP files and write them to the language file directory of the project.

About the third item, I hope that the POST /api/v1/projects/:project_id/translations API can update the translation content and judge whether there is a difference in the content. If the content is different, mark other existing Translations as pending Proofreading.

About the fourth item, I hope to provide the GET /api/v1/projects/:project_id/translations interface to obtain all translations under the project and respond with JSON.

It should end up like this, and I will open source it on Github:

image

I hope to get your help, thank you very much!

jinrenjie commented 1 year ago

I created a project to sync PHP project language pack -- Texterify CLI.

chrztoph commented 1 year ago

Hey, thank you for your contribution. 🙂