-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Update non-english documentation/use Hugo's builtin i18n system for docs #6552
Comments
I would be very happy if we had proper internationalised docs. I have one reservation though, anything that makes writing documentation harder may mean that it doesn't happen. Is there any way to automate the conversion from a say a normal md to an internationalised toml? Then we get the benefit of easy to write documentation with internationalisation? |
@nodiscc currently we also implemented that with some scripts and didn't use builtin i18n. Why we should convert to builtin i18n? |
Regarding difficulty of writing documentation: using builtin i18n would allow managing the translations through Crowdin which looks easy to use for translators (difficulty on par with the current process, fork the repo, update markdown, sen a pull request...)
In the current state I think the translated docs would have to be deleted, and a translation from scratch from en-US docs would have to be started (there is too much divergence).
|
@nodiscc I don't think you understood me. I'm not talking about the translated documentation - I'm talking about how you go about writing the original documentation. Writing translatable strings in code is a non-trivial task. It involves abstracting your strings out to a label codename and keeping the variables separate until you reach the UI layer whereupon you produce a human readable string. Every time you want to change anything you need to change it in two places - one of which is semantically unrelated to the code you're editing, (tooling of course should help but go doesn't appear to have very good ide tooling for this.) Coming up with a good label for the translations is also non-trivial. Now if you are suggesting that when we write documentation - a task which many people find difficult to remember to do, presumably because not only is its position outside of the code, but also is difficult in its own right - we have to do a similar game then that's not ideal. We need to choose a mechanism that is as easy as possible for a documenter because otherwise it won't happen. |
Setup trans to use 2 stage pipeline
This cuts the work by 90% in keeping translations up to date. You really don't need crowdin. Each page of the we site has a link to open the same data inside the git repo. That's all you need |
@zeripath You are right. My solution is not ideal. @gedw99 How would that work?
I imagine you meant Travis CI. Travis would detect in a Pull Request that it affects the documentation, run a machine translation for all languages on the diff, and attach the output to the PR comments? Then the output would have to be reviewed manually by a translator for each language, and added to the Pull Request? This looks tedious too. |
@gedw99 right. Good idea. We could also add automatically translations on some step of drone before uploading it to crowdin. That should reduce many translation operations. Anyone know any drone plugin could do that? |
You can use Ci but you will need to code up some basic stuff too.
Hope this is making some sense. It pretty simple really. I have been using this. It solves the i10n stuff like dates, currencies, etc etc etc. |
I have setup a repo here to do it. I need to add a few more bits and docs to show how it works |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
This looks like something hard to implement correctly, so the issue might as well be closed for the moment. I still recommend that you include a short banner at the beginning of every translated page. Some of them were badly out of date, and it will confuse users trying to follow old setup procedures, trying to find info on recent features etc Cheers |
Description
Hi, as discussed in #6348, gitea documentation in french language (and probably others) is outdated. As most of the work happens on the english documentation (example recent patch) docs in other languages quickly fall out of date (missing or inaccurate sections) with no indication.
Hugo is used to build the documentation at https://docs.gitea.io/, and Hugo's multilingual feature can manage translations of strings and replaces missing strings with the default language string
Example:
docs/content/doc/installation/from-binary.en-us.md:
docs/themes/gitea/i18n/en-us.toml:
docs/themes/gitea/i18n/fr-fr.toml:
This change would require converting converting current
.md
page contents (in all languages) to.toml
. I would be happy to help on french docs but I understand most languages would need to be redone...This would fix the "page is outdated but there is no warning" problem. An (easier but less clean) alternative is manually adding a warning banner on outdated localized pages.
Edit: It would allow managing documentation from Crowdin along with the main gitea localization.
The text was updated successfully, but these errors were encountered: