Difference between revisions of "TDE Weblate Translation Workspace"
imported>Michele Calgaro (Review of section 1 and 2) |
imported>Michele Calgaro |
||
Line 44: | Line 44: | ||
=='''Start with registration'''== |
=='''Start with registration'''== |
||
− | To work |
+ | To work on translations, you first need to register and log in into TWTW. All your work will be credited into TGW with your name as author. |
− | To register, use the [https://mirror.git.trinitydesktop.org/weblate/accounts/register/ Register] button in the upper right corner of the |
+ | To register, use the [https://mirror.git.trinitydesktop.org/weblate/accounts/register/ Register] button in the upper right corner of the TWTW page. After registration you will receive a confirmation email to activate your account. Confirm your activation, set your password and choose the language of the TWTW interface and the languages you want to contribute to in your profile settings. |
− | Although |
+ | Although TWTW allows you to work as an unregistered user, it's not a good idea. In such case, you are only allowed to make suggestions for translations but someone else would have to actually make the changes. Chances are this would never be done since there are not enough translators for each language to review and approve the proposals. Making suggestions is not forbidden, but it is highly recommended to register and create your own translations. |
=='''Work on translations'''== |
=='''Work on translations'''== |
||
− | In order to work on translations, you must first of all be logged in. Then |
+ | In order to work on translations, you must first of all be logged in. Then select the component you want to translate and based on the results of the checks and the status of the translations, you can choose which strings you want to deal with and start working on translations. |
===Component selection=== |
===Component selection=== |
||
Line 60: | Line 60: | ||
# If you just want to translate, but it's not important to you what component, you can use Suggested translations on the Dashboard. |
# If you just want to translate, but it's not important to you what component, you can use Suggested translations on the Dashboard. |
||
#* You get a list of ten components in your language so you can choose one.<br/><br/>[[File:TDE_Weblate_suggested.png|642px]]<br/> |
#* You get a list of ten components in your language so you can choose one.<br/><br/>[[File:TDE_Weblate_suggested.png|642px]]<br/> |
||
− | # If you want to translate a specific part – such as |
+ | # If you want to translate a specific part – such as for example the TDEPowersave application – you have to choose the corresponding project and component. In this example, the project is ''applications'' and the compoment ''tdepowersave''. |
− | #* If you use the ''Projects'' in the top bar, you get a component with a list of all the languages for which the component has already been translated. |
+ | #* If you use the ''Projects'' button in the top bar, you get a component with a list of all the languages for which the component has already been translated. |
− | #* If you use the links below |
+ | #* If you use the links below the ''Dashboard'' – like ''applications'' – you get the component directly in your language.<br/><br/>[[File:TDE_Weblate_component_languages.png|642px]]<br/> |
− | # If you want to translate |
+ | # If you want to translate a string that appeared on the screen but you do not know which components this string belongs to, you can use the search functionality. |
− | #* In the Dashboard use Tools / Search, type the string you want to search for |
+ | #* In the Dashboard use ''Tools / Search'', type the string you want to search for (for example Closing applications), select your language if it is not already selected and click on the ''Search'' button.<br/><br/>[[File:TDE_Weblate_search_string.png|642px]]<br/> |
− | #* In search |
+ | #* In the search result page, you can then click either the component name or the specific occurrence of the string. If you use a component name, then you will be able to select the strings you want to translate. If you use a specific occurrence of a string, the editor will be opened directly on that specific occurrence of the string.<br/><br/>[[File:TDE_Weblate_search_results.png|642px]]<br/> |
− | #* |
+ | #* <span style="color:#ff0000">'''NOTE''' please try minimizing the use of the search functionality as much as possible – it is currently slow and very memory intensive.</span> |
+ | |||
===Strings selection=== |
===Strings selection=== |
Revision as of 14:41, 16 May 2019
About Weblate
Weblate is an open source web-based translation management system that simplifies translation of strings in a project into multiple languages. It has a tight integration with version control tools used to manage the project source code and provides a simple and clean user interface, quality checks and automatic linking to source files.
TDE Weblate Translation Workspace (TWTW)
The TDE Weblate Translation Workspace (TWTW) is a self-hosted instance of Weblate designed to manage TDE translations. It is tightly integrated with TDE Gitea Workspace (TGW) and provides:
- a simple and clean user interface for working on translations
- integrated quality checks of translations
- displaying of referenced source files in TGW
- retrieving translations and templates from TGW
- automatic updating of translations according to the templates
- automated committing of translations back into TGW
- proper crediting of translators in commit messages
- consistent updating of strings from both stable and development branches
Thanks to TWTW users can simply focus on the translation work without having to worry about how to get the translation template files, how to update them and how to send their changes back to developers. Even users without any coding knowledge will be able to successfully contribute to improve translation strings and make TDE an even better environment.
Integration with TGW
TWTW manages its own copy of the source code repositories, but is very tightly integrated with TGW.
Commits into TGW automatically trigger the update of TWTW correspondent repositories. If some strings have changed and any translation template file has been updated, TWTW will automatically update the translation files for each language and immediately push them back to TGW. The translation files are therefore primarily maintained up to date by this mechanism.
User translation work consist in updating the changed strings into each of the modified translation files. When users work on translations, individual translated strings are not immediately pushed into TGW. In order for translators to have enough time to work and check their translations and to avoid having too many micro commits, changes are pushed into TGW after a delay of one day.
Strings from both stable and development branches will be presented to the users as a single unit. TWTW takes care of all the background work necessary to merge, split and push back to the appropriate branches. In this way, users are given the possibility to update both the current stable version and the next upcoming release.
Structure of translations
Each individual translation template file in TGW is represented in TWTW as a component. Components are grouped into projects (such as tdelibs, tdebase,applications ...) in order to ease navigation and workflow. Component names have been chosen so that translators can easily determine to which program and part they belong to.
Using TDE Weblate
Start with registration
To work on translations, you first need to register and log in into TWTW. All your work will be credited into TGW with your name as author.
To register, use the Register button in the upper right corner of the TWTW page. After registration you will receive a confirmation email to activate your account. Confirm your activation, set your password and choose the language of the TWTW interface and the languages you want to contribute to in your profile settings.
Although TWTW allows you to work as an unregistered user, it's not a good idea. In such case, you are only allowed to make suggestions for translations but someone else would have to actually make the changes. Chances are this would never be done since there are not enough translators for each language to review and approve the proposals. Making suggestions is not forbidden, but it is highly recommended to register and create your own translations.
Work on translations
In order to work on translations, you must first of all be logged in. Then select the component you want to translate and based on the results of the checks and the status of the translations, you can choose which strings you want to deal with and start working on translations.
Component selection
There are several ways to select a component to translate:
- If you just want to translate, but it's not important to you what component, you can use Suggested translations on the Dashboard.
- If you want to translate a specific part – such as for example the TDEPowersave application – you have to choose the corresponding project and component. In this example, the project is applications and the compoment tdepowersave.
- If you want to translate a string that appeared on the screen but you do not know which components this string belongs to, you can use the search functionality.
- In the Dashboard use Tools / Search, type the string you want to search for (for example Closing applications), select your language if it is not already selected and click on the Search button.
- In the search result page, you can then click either the component name or the specific occurrence of the string. If you use a component name, then you will be able to select the strings you want to translate. If you use a specific occurrence of a string, the editor will be opened directly on that specific occurrence of the string.
- NOTE please try minimizing the use of the search functionality as much as possible – it is currently slow and very memory intensive.
- In the Dashboard use Tools / Search, type the string you want to search for (for example Closing applications), select your language if it is not already selected and click on the Search button.
Strings selection
TDE Weblate performs many useful checks to help improve the quality of translations. After selecting a component, you have the option to choose the strings that you want to deal with. Strings selection is based on test results.
After selecting the strings, the translating editor will be opened.
Translating with full editor
The full editor is used to gradually translate individual strings. The full editor interface provides a large amount of translated string information – translation checks results, links to string locations in the source code, nearby strings, other translations of the same string, comments, and possibly also screenshots.
Once you edit the string, the flag that the string needs to be edited (the fuzzy flag) is automatically turned off. The keyboard icon provides information about using keyboard shortcuts that may be useful.
Translating with zen editor
The Zen editor is used to translate all selected strings within a single long page. Therefore, additional information about individual translations is limited compared to full editor.
Changes in translation are saved automatically when you move to the next string. Once you edit the string, the flag that the string needs to be edited (the fuzzy flag) is automatically turned off. The Edit button can be used to switch back to the full editor.
Adding a new language
After selecting a component, there may be a situation where the translation does not exist in your language. Because translation templates are part of the GIT repositories, TDE Weblate allows to create translations for new languages.
- To start a translation for a new language:
- Use Projects in the top bar to select the project and then the component.
- On the component page use Tools / Start new translation or Start new translation button below the list of existing languages.
- Select your language from the list and click Start new translation button.
A new translation will be created.
When a new translation is created, it automatically pushes a commit with translation for a new language into TGW. Similarly, translation can be removed from TDE Weblate. Again, commit will be automatically pushed to remove the translation from TGW. However, deleting translations requires administrative privileges in TDE Weblate.
Checking tests results
TDE Weblate includes several tests to check translations. Of course, these tests will not solve the grammar check or to check the translations for inaccurate or incomplete. Such checks must be done by the translator himself. TDE Weblate tests perform syntax checking. For example, whether the translation ends with a period as the original, whether the translation contains tags for C formatting as they were in the original, whether the html / xml tags in the translation text are correctly paired, and so on.
The results of checks for individual translations are displayed during the translation in the full editor. The test results can also be used to select strings to translate. If you want to focus on correcting these checks, there is a page that shows the results of checks for all of the components.
- For check results for all components:
- Use Languages in the to bar to select you language
- On the language page use Tools / Failing checks
Results of all failed checks for your language will be listed.
- Select a check whose results you want to address.
- Select the project and the component whose translations you want to fix.
An editor will be opened where you can fix the translation.