Codeberg/Documentation
42
199
Fork
You've already forked Documentation
161

Add Documentation for Codeberg Translate #300

Merged
fnetX merged 4 commits from :translate into main 2023年07月04日 23:02:23 +02:00
Contributor
Copy link

This is a simple documentation for Codeberg Translate. I think it can be improved in some points (especially the wording), but it should be a good start.

Closes: #273

This is a simple documentation for Codeberg Translate. I think it can be improved in some points (especially the wording), but it should be a good start. Closes: https://codeberg.org/Codeberg/Documentation/issues/273
@ -0,0 +9,4 @@
## Projects and Component
The first thing you may notice, is that Weblate has Projects and Components. A Component is something that can be translated e.g. a Software or a Documentation. A Project is a Collection of Components that belongs to the same thing.
e.g. You have a Software and the corresponding Documentation. Both use different translation systems. So you add a Project for your Software and one COmponent for the Software itself and another one for the Documentation.
First-time contributor
Copy link
COmponent
 ^
``` COmponent ^ ```
JakobDev marked this conversation as resolved
@ -0,0 +5,4 @@
parent: CodebergTranslate
---
This article will guide you, how to integrate Weblate with Codeberg.
First-time contributor
Copy link

Maybe adding some background information's about the relation between the institutions and software projects involved.

This article will guide you, how to configure your Codeberg project to use Codebergs self-hosted translation service [translate.codeberg.org](https://translate.codeberg.org/). Because translation service is drivin by a software called [Weblate](https://weblate.org/) the term _Weblate_ may be used as a synonym for Codebers translation service in the following text.

PS: I don't see a way to directly edit the commit in codebergs web-fronted. Do I missed something?

Maybe adding some background information's about the relation between the institutions and software projects involved. ``` This article will guide you, how to configure your Codeberg project to use Codebergs self-hosted translation service [translate.codeberg.org](https://translate.codeberg.org/). Because translation service is drivin by a software called [Weblate](https://weblate.org/) the term _Weblate_ may be used as a synonym for Codebers translation service in the following text. ``` PS: I don't see a way to directly edit the commit in codebergs web-fronted. Do I missed something?
First-time contributor
Copy link

Or maybe it is better to link to introduction-to-weblate.md?

Or maybe it is better to link to `introduction-to-weblate.md`?
Owner
Copy link

I think the comma is wrong.

"will guide you, how to integrate"

I think the comma is wrong. "will guide you, how to integrate"
@ -0,0 +28,4 @@
</picture>
2. Now enter the following:
Name: The Name of your Component. You can choose freely.
First-time contributor
Copy link

I'm not sure but I assume here you need to use list item bullets (e.g. -) to make it look right when it is rendered as HTML.

I'm not sure but I assume here you need to use list item bullets (e.g. `-`) to make it look right when it is rendered as HTML.
JakobDev marked this conversation as resolved
@ -0,0 +39,4 @@
<img src="/assets/images/codeberg-translate/getting-started/add-component.choose.png" alt="Image the add component page">
</picture>
Weblate have searched your Repo for common translation structures and presents you the what was found. If you select one, Weblate will will set some settings automatically. You can change them later or fully configure
First-time contributor
Copy link
will will
^^^^
``` will will ^^^^ ```
JakobDev marked this conversation as resolved
@ -0,0 +43,4 @@
The Component manually. Please note, that one Component only works with one translation system in one directory. If you have multiple, you need to add multiple components.
3. On the following Page, you should select "Gitea pull request" under "Version control system", so Weblate will create a new PR to submit changes to your Repo.
If you don't have selected a a Configuration from Weblate, visit [Manual Component configuration](/codeberg-translate/manual-component-configuration).
First-time contributor
Copy link
a a
^
``` a a ^ ```
JakobDev marked this conversation as resolved
First-time contributor
Copy link

I like it and would say it would have helped me in the first place.

But maybe I'm a bit biased now because I still have some background information and also tried it multiple times to setup a project on weblate.

I like it and would say it would have helped me in the first place. But maybe I'm a bit biased now because I still have some background information and also tried it multiple times to setup a project on weblate.
Bubu left a comment
Copy link

Thanks a lot for starting this, it's highly appreciated.

Thanks a lot for starting this, it's highly appreciated.
@ -0,0 +8,4 @@
This article will guide you, how to integrate Weblate with Codeberg.
## Projects and Component
The first thing you may notice, is that Weblate has Projects and Components. A Component is something that can be translated e.g. a Software or a Documentation. A Project is a Collection of Components that belongs to the same thing.
Member
Copy link

A Project is a Collection of Components that belongs to the same thing. --> belong to the same thing

A Project is a Collection of Components that belongs to the same thing. --> belong to the same thing
@ -0,0 +10,4 @@
## Projects and Component
The first thing you may notice, is that Weblate has Projects and Components. A Component is something that can be translated e.g. a Software or a Documentation. A Project is a Collection of Components that belongs to the same thing.
e.g. You have a Software and the corresponding Documentation. Both use different translation systems. So you add a Project for your Software and one COmponent for the Software itself and another one for the Documentation.
In most cases, you only need one Component in a Project.
Member
Copy link

Not that it matters much, but for example for android applications it's pretty much at least always two different components: one for the app and one for the marketplace (play store, fdroid) description. Those use different translation formats, so they can't be a single component, even if you maintain them in the same repository. (ah, you have that below :-))

Maybe just write "In simple cases"?

Also no comma here, I think.

Not that it matters much, but for example for android applications it's pretty much at least always two different components: one for the app and one for the marketplace (play store, fdroid) description. Those use different translation formats, so they can't be a single component, even if you maintain them in the same repository. (ah, you have that below :-)) Maybe just write "In simple cases"? Also no comma here, I think.
JakobDev marked this conversation as resolved
@ -0,0 +15,4 @@
## Create a new Project
On [Codeberg Translate](https://translate.codeberg.org/) log in with your Codeberg Account. Now click on "+" and select "Add new translation project".
Now just enter some Metadata such as the Name, the URL slug (This is just the URL you find your projects. You project will live under the URL `https://translate.codeberg.org/projects/<your slug>`), the Link to the Website (if you
don't have one, just use the URL of your Codeberg Repo) and some instructions, how this Project should be translated (can be empty). This are just Metadata. They have no meaning, when you connect to your Codeberg Repo later.
Member
Copy link

They have no meaning, when you connect to your Codeberg Repo later.

This sentence doesn't really add much (or I don't quite understand what it's supposed to say?)

> They have no meaning, when you connect to your Codeberg Repo later. This sentence doesn't really add much (or I don't quite understand what it's supposed to say?)
Author
Contributor
Copy link

It is supposed to say, that this have no technical purpose, so when something does not work. this URL can't be the reason for that.

It is supposed to say, that this have no technical purpose, so when something does not work. this URL can't be the reason for that.
Owner
Copy link

I recommend to write "This is just metadata, they are not used by Weblate for any purpose apart from showing instructions to translators."

If this is the correct thing.

I recommend to write "This is just metadata, they are not used by Weblate for any purpose apart from showing instructions to translators." If this is the correct thing.
@ -0,0 +19,4 @@
Click on "Save" and you are done.
## Add a Component
You now see your new Projects with no Components at all. Now let's add a Component.
Member
Copy link

s/Projects/project/

(Also maybe not capital case Component either here?)

s/Projects/project/ (Also maybe not capital case Component either here?)
JakobDev marked this conversation as resolved
@ -0,0 +40,4 @@
</picture>
Weblate have searched your Repo for common translation structures and presents you the what was found. If you select one, Weblate will will set some settings automatically. You can change them later or fully configure
The Component manually. Please note, that one Component only works with one translation system in one directory. If you have multiple, you need to add multiple components.
Member
Copy link

s/The Component/the component/

s/The Component/the component/
JakobDev marked this conversation as resolved
@ -0,0 +8,4 @@
Codeberg hosts it's own [Weblate](https://weblate.org) Instance to help Codeberg users localize their Software. This service is called [Codeberg Translate](https://translate.codeberg.org/)
## What is Weblate?
When you write a Software, a Website, a Documentation or something else, you may want to translate it, so it can be used by Users, who don't speak English. But you are facing a problem: You did not speak all languages that exists in the World.
Member
Copy link

s/You did not/You do not/
s/exists/exist/

s/You did not/You do not/ s/exists/exist/
JakobDev marked this conversation as resolved
@ -0,0 +9,4 @@
## What is Weblate?
When you write a Software, a Website, a Documentation or something else, you may want to translate it, so it can be used by Users, who don't speak English. But you are facing a problem: You did not speak all languages that exists in the World.
Thankfully, there are a lot of native speakers who want to translate things in their language. But not all of those translators are coders, so you can't expect them to go to your your Repo, fork it, edit the Code to make the add the Language
Member
Copy link

s/in their/into their/

s/in their/into their/
JakobDev marked this conversation as resolved
@ -0,0 +10,4 @@
## What is Weblate?
When you write a Software, a Website, a Documentation or something else, you may want to translate it, so it can be used by Users, who don't speak English. But you are facing a problem: You did not speak all languages that exists in the World.
Thankfully, there are a lot of native speakers who want to translate things in their language. But not all of those translators are coders, so you can't expect them to go to your your Repo, fork it, edit the Code to make the add the Language
and create a Pull Request. To solve this Problem, Software like Weblate exists. It provides a easy to use GUI for translators. They just say the English (or the other language you use as a base) and can write the translation. They don't need
Member
Copy link

"They just say the English" not sure what that's supposed to mean?

"They just say the English" not sure what that's supposed to mean?
JakobDev marked this conversation as resolved
@ -0,0 +13,4 @@
and create a Pull Request. To solve this Problem, Software like Weblate exists. It provides a easy to use GUI for translators. They just say the English (or the other language you use as a base) and can write the translation. They don't need
to take a look at the Code at all, so everyone, not only coders, can translate your Software.
## Did I need to change my Code?
Member
Copy link

s/Did/Do/

s/Did/Do/
JakobDev marked this conversation as resolved
@ -0,0 +14,4 @@
to take a look at the Code at all, so everyone, not only coders, can translate your Software.
## Did I need to change my Code?
You can't give Weblate your Code and it magically makes it translatable. You need to use a existing translation system such as gettext or Qt Linguist. Which one you should use depends on your used language and toolkit. Take a look at their
Member
Copy link

s/use a/use an/

s/use a/use an/
JakobDev marked this conversation as resolved
@ -0,0 +15,4 @@
## Did I need to change my Code?
You can't give Weblate your Code and it magically makes it translatable. You need to use a existing translation system such as gettext or Qt Linguist. Which one you should use depends on your used language and toolkit. Take a look at their
documentation to learn more. You should end up which are directory which contains the different translations. Each language should have it's own file. e.g. `de.po` for gettext. You now giving Weblate the Link to your Repo and basically
Member
Copy link

s/up which are/up with a/
s/it's/its/

s/up which are/up with a/ s/it's/its/
JakobDev marked this conversation as resolved
@ -0,0 +11,4 @@
Weblate differs into 2 translation formats: monolingual and bilingual.
#### Bilingual
Bilingual means, that the source text live inside the code. See for example thw following example from gettext:
Member
Copy link

s/thw/the/

s/thw/the/
JakobDev marked this conversation as resolved
@ -0,0 +29,4 @@
File mask: This is the path, in which your translations will be placed `*` is the placeholder for the language. e.g. if you enter `translations/*.ts`, a German translation would be placed as `translations/de.ts`.
Monolingual base language file: If you have a Monolingual format, enter the path to your source file here. If not, leave empty.
Edit base file: If you enable this, the source file can be edited in Weblate. If not ticked, it is read only in Weblate. Only available for monolingual formats.
Adding new translation: You can choose, what happens, if a User wan's to add a new language. The Options should be self-explaining.
Member
Copy link

s/self-explaining/self-explanatory/

s/self-explaining/self-explanatory/
JakobDev marked this conversation as resolved
Owner
Copy link

@JakobDev do you intend to continue working on this?

@JakobDev do you intend to continue working on this?
Author
Contributor
Copy link

I totally forgot about this PR. Sorry. I will continue working on this.

I totally forgot about this PR. Sorry. I will continue working on this.
@ -0,0 +7,4 @@
This article will guide you, how to integrate Weblate with Codeberg.
## Projects and Component
Owner
Copy link

Components ?

Component**s** ?
JakobDev marked this conversation as resolved
fnetX left a comment
Copy link

Thank you. I cannot comment on the technical side, because I do not use Weblate often, but this is an excellent start. Some nitpicks on the language that would be great to have, but generally fine to merge+deploy from my side.

Thank you. I cannot comment on the technical side, because I do not use Weblate often, but this is an excellent start. Some nitpicks on the language that would be great to have, but generally fine to merge+deploy from my side.
@ -0,0 +8,4 @@
This article will guide you, how to integrate Weblate with Codeberg.
## Projects and Component
The first thing you may notice, is that Weblate has Projects and Components. A Component is something that can be translated e.g. a Software or a Documentation. A Project is a Collection of Components that belong to the same thing.
Owner
Copy link

may → might

may → might
JakobDev marked this conversation as resolved
@ -0,0 +33,4 @@
- Source language: If the source language of your Project is not English, select it here.
- Source code repository: The URL to your Codeberg Repo e.g. `https://codeberg.org/Codeberg/Documentation`. If you already have a component, that uses this Repo, use `weblate://<project>/<component>` to link it with the existing component instead.
Leave the rest as it is and click "Continue". Weblate will now scan your Repo. and you should see something like this:
Owner
Copy link

no dot between "Repo" and "and you should" ... The sentence does not end there. Or remove "and" and continue in uppercase.

no dot between "Repo" and "and you should" ... The sentence does not end there. Or remove "and" and continue in uppercase.
JakobDev marked this conversation as resolved
@ -0,0 +40,4 @@
<img src="/assets/images/codeberg-translate/getting-started/add-component.choose.png" alt="Image the add component page">
</picture>
Weblate have searched your Repo for common translation structures and presents you the what was found. If you select one, Weblate will set some settings automatically. You can change them later or fully configure
Owner
Copy link

Weblate has searched ... presents you what was found

(person; remove "the")

Weblate **has** searched ... presents **you what** was found (person; remove "the")
JakobDev marked this conversation as resolved
@ -0,0 +43,4 @@
Weblate have searched your Repo for common translation structures and presents you the what was found. If you select one, Weblate will set some settings automatically. You can change them later or fully configure
the component manually. Please note, that one Component only works with one translation system in one directory. If you have multiple, you need to add multiple components.
1. On the following Page, you should select "Gitea pull request" under "Version control system", so Weblate will create a new PR to submit changes to your Repo.
Owner
Copy link

page (lowercase)

Since this PR is not new, I wonder if by now there is "Forgejo" available somewhere?

page (lowercase) Since this PR is not new, I wonder if by now there is "Forgejo" available somewhere?
JakobDev marked this conversation as resolved
@ -0,0 +44,4 @@
the component manually. Please note, that one Component only works with one translation system in one directory. If you have multiple, you need to add multiple components.
1. On the following Page, you should select "Gitea pull request" under "Version control system", so Weblate will create a new PR to submit changes to your Repo.
If you don't have selected a Configuration from Weblate, visit [Manual Component configuration](/codeberg-translate/manual-component-configuration).
Owner
Copy link

If you haven't selected a configuration

If you **haven't** selected a **c**onfiguration
JakobDev marked this conversation as resolved
@ -0,0 +48,4 @@
Now you should just select a Translation License and click "Save". Now you are done on the Weblate side.
2. On the Codeberg side, open your Repo settings and go the Webhooks. Now click "Add Webhook" and select "Gitea" from the drop down. Under "Target URL" enter `https://translate.codeberg.org/hooks/gitea` and click
"Add Webhook". Now Codeberg will notice Weblate about changes in your Repo, so it will be automatically updated.
Owner
Copy link

Codeberg will notify Weblate ...

Codeberg will **notify** Weblate ...
JakobDev marked this conversation as resolved
@ -0,0 +50,4 @@
2. On the Codeberg side, open your Repo settings and go the Webhooks. Now click "Add Webhook" and select "Gitea" from the drop down. Under "Target URL" enter `https://translate.codeberg.org/hooks/gitea` and click
"Add Webhook". Now Codeberg will notice Weblate about changes in your Repo, so it will be automatically updated.
Now you can share to Link to Weblate to your translators.
Owner
Copy link

share the link to Weblate

share **the** **l**ink to Weblate
JakobDev marked this conversation as resolved
@ -0,0 +8,4 @@
Codeberg hosts it's own [Weblate](https://weblate.org) Instance to help Codeberg users localize their Software. This service is called [Codeberg Translate](https://translate.codeberg.org/)
## What is Weblate?
When you write a Software, a Website, a Documentation or something else, you may want to translate it, so it can be used by Users, who don't speak English. But you are facing a problem: You did not speak all languages that exist in the World.
Owner
Copy link

by users (lowercase)

You do not speak ...

by **u**sers (lowercase) You **do** not speak ...
JakobDev marked this conversation as resolved
@ -0,0 +10,4 @@
## What is Weblate?
When you write a Software, a Website, a Documentation or something else, you may want to translate it, so it can be used by Users, who don't speak English. But you are facing a problem: You did not speak all languages that exist in the World.
Thankfully, there are a lot of native speakers who want to translate things in their language. But not all of those translators are coders, so you can't expect them to go to your your Repo, fork it, edit the Code to make the add the Language
and create a Pull Request. To solve this Problem, Software like Weblate exists. It provides a easy to use GUI for translators. They just see the English (or the other language you use as a base) texts and can write the translation. They don't need
Owner
Copy link

problem, software like (lower case)

an easy to use GUI

problem, software like (lower case) an easy to use GUI
JakobDev marked this conversation as resolved
Member
Copy link

I currently have no time to review this again, so I'd suggest going ahead with merging, when others think it's ready. Otherwise it'd just go stale again.

I'll give it a read eventually, when it's live :)

I currently have no time to review this again, so I'd suggest going ahead with merging, when others think it's ready. Otherwise it'd just go stale again. I'll give it a read eventually, when it's live :)
fnetX added the due date 2023年07月11日 2023年07月03日 16:11:33 +02:00
Owner
Copy link

@JakobDev Thank you!

@JakobDev Thank you!
JakobDev deleted branch translate 2023年07月05日 11:23:47 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Codeberg Pages
Issues affecting Codeberg Pages
Documentation Usability
Issues related to using and reading docs.codeberg.org
Forgejo
Good First Issue! 👋
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Question
Kind: Security
Licensing
Part: Generator
This is related to the generation of the documentation, not to the content itself
Priority: High
The priority is high
Priority: Low
The priority is low
Priority: Medium
The priority is medium
Reviewed: Confirmed
Something has been confirmed
Reviewed: Duplicate
Something exists already
Reviewed: Invalid
Something was marked as invalid
Reviewed: Wontfix
Something won't be fixed
Status: Blocked
Status: Help wanted
Contributions are welcome!
Status: In progress
Work is in progress
Status: Needs feedback
Feedback is needed
Status: Ready for Review
Work is completed
Status: Review
Review is in progress / Reviewers wanted
Status: Stale
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

2023年07月12日

Dependencies

No dependencies set.

Reference
Codeberg/Documentation!300
Reference in a new issue
Codeberg/Documentation
No description provided.
Delete branch ":translate"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?