Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/LAION-AI/Open-Assistant/pull/3733 #3393

Merged
merged 6 commits into from
Jun 13, 2023
Merged

https://github.com/LAION-AI/Open-Assistant/pull/3733 #3393

merged 6 commits into from
Jun 13, 2023

Conversation

NiklasBuchfink
Copy link
Contributor

Description

This PR add the inlang.config.js and @inlang/cli to Open-Assistant to solve the issue #3077

With these changes, translators can manage translations in a no-code web editor and useful linting rules and machine translations can be used within the editor or via the @inlang/cli.

I added a badge with the current translation status and a short description to the contribution guidelines.

Preview

Editor
A live instance of the editor can be previewed with the following link:
https://inlang.com/editor/github.com/NiklasBuchfink/Open-Assistant

Badge
translation badge

Further information

To check the status of the translations, exece npx inlang lint. Other useful command like machine translate and open editor your can find in the docs.

Within this week, the inlang VS code extension should also work ootb for i18next projects and helps extract messages and display inline annotations.

@github-actions
Copy link

pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md

@olliestanley
Copy link
Collaborator

Would it be possible to avoid having the new package.json, package-lock.json, inlang.config.js in the root directory of the repository? It would be much better to have these in a subdirectory (ideally inside website/ if possible, or in a new subdirectory) for cleanliness and ease of code owner allocation.

@NiklasBuchfink
Copy link
Contributor Author

@olliestanley Currently this is not supported. I have created an issue for this case, as we will continue to encounter this problem. We discuss this today. Feel free to join the conversation.

See opral/monorepo#919

@samuelstroschein
Copy link

@NiklasBuchfink You made a mistake while installing the CLI. There is no need for the package.json files and modified .gitignore. Install the CLI as part of the website, not at the root of the repo instead.

@olliestanley Are you okay with having the inlang.config.js at the root? Supporting nested directories would be a large burden to implement correctly in every app.

@olliestanley
Copy link
Collaborator

@olliestanley Are you okay with having the inlang.config.js at the root? Supporting nested directories would be a large burden to implement correctly in every app.

I think this might be fine if it's only the inlang.config.js file. Will wait for the web team to confirm though

@NiklasBuchfink
Copy link
Contributor Author

We are working on the issue mentioned about the CLI working in subdirectories with a flag. I will inform you as soon as the problem is fixed.

Copy link
Collaborator

@notmd notmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@notmd notmd linked an issue Jun 13, 2023 that may be closed by this pull request
@NiklasBuchfink
Copy link
Contributor Author

I updated the CLI to the latest version and added the npm scripts to make it easier to run the commands:

  • npm run inlang:lint
  • npm run inlang:machine-translate
  • npm run inlang:open-editor

Additionally, I added the inlang (i18n) VS code extension to the recommended extensions so that all team members can benefit from it when working on translations.

If there is anything else I can help you with, please let me know.

@felixhaeberle
Copy link

@olliestanley would you also like to see inlang GitHub Actions?

Providing you with current CLI functionality (lints, machine translate, more soon) but at the convenience of a GitHub Action?

  • simple to integrate, just a few lines.
  • lints your translations, fits perfectly in your built frontend workflow.
  • can automatically create (or comment in) PR's when something broke & auto-fix?

We are currently looking for projects interested in this and would build it for you if you simply say "Yes" :)

@NiklasBuchfink NiklasBuchfink changed the title Add inlang to make the contribution of translations easier https://github.com/LAION-AI/Open-Assistant/pull/3733 Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write a script to sync translation in EN with other locales
6 participants