Changes for page Weblate Configuration
Last modified by Simon Urli on 2021/09/17 10:28
From version 20.1
edited by Simon Urli
on 2021/09/17 10:03
on 2021/09/17 10:03
Change comment:
Upload new image "weblate-new-component-step-2.png", version 1.1
To version 22.1
edited by Simon Urli
on 2021/09/17 10:28
on 2021/09/17 10:28
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -6,10 +6,10 @@ 6 6 7 7 = Add new component = 8 8 9 -Each source translation file on a git repository is handled by aWeblate component. Whenever a committer adds a new source translation file,she should also creates the corresponding Weblate component. Before adding the new component, there's two question the contributor shouldcheck:9 +Each source translation file on a git repository is handled by its own Weblate component. This means that you can have several components for the same git repository. Whenever a committer adds a new source translation file, they should also creates the corresponding Weblate component. Before adding the new component, there's two question the contributor should ask themselves: 10 10 11 -1. what's the format of the new source translation she added? The XWiki Translation Formats are described [[there>>doc:Community.XWiki Translations Formats.WebHome]].12 -1. is there already an existing component for the repository where the source translation file has been added? if the file has been added to xwiki-commons, xwiki-rendering or xwiki-platform, the answer is yes. If the file has been added to a repository of xwiki-contrib, then y oushould check if there is already a component for this repository on Weblate.11 +1. what's the format of the new source translation they add? The XWiki Translation Formats are described [[there>>doc:Community.XWiki Translations Formats.WebHome]]. 12 +1. is there already an existing component for the repository where the source translation file has been added? if the file has been added to xwiki-commons, xwiki-rendering or xwiki-platform, the answer is yes. If the file has been added to a repository of xwiki-contrib, then they should check if there is already a component for this repository on Weblate. 13 13 14 14 When you answered those questions, click on the top-right menu on "Add a new translation component". If you don't see this menu then it means you don't have the rights for creating a component. 15 15 ... ... @@ -25,15 +25,39 @@ 25 25 == Adding a component for a new repository == 26 26 27 27 For adding a component for a new repository, you need to select "From version control" on the UI of adding new components. That's normally the default option. 28 +Adding a component from version control is done in two steps: 29 +1. first step is to indicate the information for cloning the repository 30 +1. second step, when the repository is cloned, is to specify format and location of the translation source. 28 28 29 29 {{gallery}} 30 -image:from-version-control.png 33 +image:weblate-new-component-step1.png 34 +image:weblate-new-component-step2.png 31 31 {{/gallery}} 32 32 37 +=== Information for cloning the repository === 33 33 39 +You need to fill the following information: 40 +* //Component name//: the pretty name of the component to display in Weblate UI, by convention it should be the name of the Maven module 41 +* //URL slug//: this should be automatically derived from the component name, in theory you should not have to modify it. Note that it cannot be changed after the component creation. 42 +* //Project//: you have the choice between XWiki Commons, XWiki Rendering, XWiki Platform or XWiki Contrib. In theory you should only create new component from version control for XWiki Contrib. 43 +* //Version control system//: pay attention to select GitHub, otherwise there will be issues with the credentials for cloning. 44 +* //Source code repository//: it should be the https URL of the Github repository. 45 +* //Repository branch//: it should be either master or main. 46 + 47 +Once all those information are filled you can click Continue. The repository will be cloned, and Weblate might try to detect automatically the translation files to use: next screen will propose either to chose a path or to fill information manually. 48 + 49 +=== Format and location of the translation source === 50 + 51 +In order to finish configuring the component, you need to fill the information about the exact location of the translation source, and its format: 52 +* //Translation license//: the license should be set and it should be the same than the repository, most of the time for XWiki it should be GNU Lesser Public License v2.1 only 53 +* //Repository push URL//: don't forget to copy the repository URL there, since leaving it blanks means the changes won't be push 54 +* //File format//: be careful to select the right XWiki format there: you should normally chose only option among "XWiki Java Properties", "XWiki Page Properties" or "XWiki Full Page". For information about the formats check [[the related documentation>>doc:Community.XWiki Translations Formats.WebHome]] 55 +* //File mask//: this should be the exact location where the new translation file will be created with a mask represented by "*" which will be replaced by the actual locale of the language. For example: ##my/module/src/main/resources/ApplicationResources_*.properties## 56 +* //Monolingual base language file//: this is the path of the source translation file, for example: ##my/module/src/main/resources/ApplicationResources.properties## 57 + 58 +Normally you should not have to modify the other options, you can click continue and Weblate will bring you to the component. If you made a mistake somewhere, you can always change one of the setting of the created component by going to the menu "Manage" and "Settings" when on the component. 59 + 34 34 == Adding a component for an existing repository == 35 35 36 36 If the second question's answer is yes, then you need to add a component for a repository already existing. 37 37 38 - 39 -= Add new screenshot =
- weblate-new-component-step-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.surli - Size
-
... ... @@ -1,0 +1,1 @@ 1 +86.4 KB - Content