-
Notifications
You must be signed in to change notification settings - Fork 678
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
Add Inlang to enable community translations / make the contribution of translations easier #662
Conversation
The inlang config has to exist at the root of the repository. See opral/monorepo#258.
there's seems me a space right after LC_MESSAGES. |
You are right. Thank you. |
can you fill in the english strings please. Please use inlang and open a separate PR (will merge once I see a valid PR of the en lang file filled in). Before you do, please delete the en file here and test to see whether a new language is created. Thanks! Also for inlang, I think it would benefit if you could put the url in the readme near the bottom under a sub header labeled translations. direct users to either 1) contribute directly or 2) use inlang |
@jannesblobel is the en file auto-generated via CI/CD, or manually? If manually, how will the file keep in sync with the messages used in the source code? |
|
||
return { | ||
referenceLanguage: "en", | ||
languages: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does inlang also make a PR to change this config file when a translator has a new language to add? Want to decrease maintainer effort such that a new issue doesn't need to appear just to ask maintainers to add a new language + use inlang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, see the ongoing discussion at opral/monorepo#276.
Adding a new language would require modifying the source code. Inlang does not adjust source code right now and thereby eliminates the risk to create bugs in source code. That said, this feature is wanted (upvote it, if you want it too). Needs elaboration on how to implement such a feature.
Hi @Andrew-Chen-Wang
The PR is ready to merge. |
pre commit lint failing |
I hope, I fixed it with my last commit #3351d5e. Unfortunately, this was the first time I had worked with rst files before, and I needed to find out the underline length of a headline. Typical Copy/Paste mistake and Github rendered my rst Readme. That's why I thought the readme worked I tried to test the file before I committed it, but I didn't find a linter for rst files that work on my computer. |
No worries. We use a Python package called pre-commit where you install it andd run pre-commit install so it'll automatically lint for you. Thanks for the PR! |
Hej @Andrew-Chen-Wang, @samuelstroschein mentioned that you are informed about this pull request. If there are any problems with the PO plugin, hit me up.
Description
This pull request adds the possibility for contributors and translators to manage translations in a UI instead of files with no overhead for the maintainers.
Preview
The changes of this PR and a live instance of the editor can be previewed with the following link djangorestframework X inlang editor
Note: This link should be changed to point to djangorestframework instead of jannesblobel after this PR has been merged.
Limitations
Certain actions are slow
Inlang is running entirely on git, giving tremendous CI/CD and contribution power to localization (and potentially other verticals -> the next git). That means that the whole djangorestframework repo is cloned into the browser which makes certain actions like the initial load and pushing changes slow. Those limitations will be fixed with future releases and require no input from djangorestframework.
Linting is not available yet
Neither the editor nor developers will receive linting and validation tools for translations with this PR (yet). Some commits that I have done removed unused translations. In the future, spotting errors like unused translations could be achieved with the planned inlang CLI via CI/CD, see https://github.com/orgs/inlang/discussions/273. In the meantime, manually spotting and fixing errors in translations is required :(