Difference between revisions of "Weblate"

From GnuCash
Jump to: navigation, search
(Maintainer: Setup, Workflow)
(Workflow: closed/rejected PRs moved to Language_Administration#All)
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
On 2020-12-14 https://hosted.weblate.org/projects/gnucash was created.
+
Weblate is a web based translation tool. On 2020-12-14 {{URL:wl}} was created.
;Status: consider it still as experimental.
+
;Status: consider it still as experimental and there are still unimplemented ideas in [[Improve Localization Process#Remaining Ideas by Repos]].
The page is organized by roles.
+
This page is organized by roles.
  
 
[[Category:I18N]][[Category:L10N]]
 
[[Category:I18N]][[Category:L10N]]
Line 7: Line 7:
 
==General==
 
==General==
 
Many pages @ weblate link context sensitive help by <code>i</code> in a circle.
 
Many pages @ weblate link context sensitive help by <code>i</code> in a circle.
:[https://docs.weblate.org/en/latest/index.html Weblate Documentation]
+
:[{{URL:wl_doc}}index.html Weblate Documentation]
 +
 
 +
===Setup===
 +
{| class="wikitable"
 +
|-
 +
! scope="col"| WebLate Component
 +
! scope="col"| GitHub Repository:location
 +
! scope="col"| Notes
 +
|- style="vertical-align:top;"
 +
| [{{URL:wl}}glossary/ Glossary]
 +
| [{{GitURL}}/gnucash/tree/maint/po/glossary gnucash:po/glossary]
 +
| linked project, part of Program
 +
 
 +
|- style="vertical-align:top;"
 +
| [{{URL:wl}}gnucash/ Program]
 +
| [{{GitURL}}/gnucash/tree/maint/po gnucash:po]
 +
|
 +
 
 +
|- style="vertical-align:top;"
 +
| [{{URL:wl}}website/ Website]
 +
| [{{GitURL}}/gnucash-htdocstree/master/po gnucash-htdocs:po]
 +
|
 +
|}
 +
;Glossary: It tries to collect the common GnuCash specific terminology of all other components.
 +
:After it is completed, it can be uploaded into Weblates Gnucash glossary.
 +
:Currently it is using and ancient style of context "context: term" as MsgId.
 +
:;Questions and tasks:
 +
::# Should MsgId "context: term" be converted to MsgContext, MsgId? Pros and cons?
 +
::# Review of sources for updated lists
 +
::# Other missing conventions?
 +
::;Problem: In the current configuration users can mark terms in other components for adding to the glossary—if they add the weblate flag <tt>terminology</tt> ''for all languages''. This additions conflict with out style of creating the glossary, but after reverting the commits, they seem to get generated again.
 +
;Website: Set priority<ref "bulk edit">https://hosted.weblate.org/projects/gnucash/website/#bulk-edit search: "location:index", add flag: "priority:101" …</ref> (default=100) to
 +
:105 for location:global
 +
:104 for location:header
 +
:103 for location:menu
 +
:102 for location:footer
 +
:101 for location:index
 +
:100 (remains)
 +
:99 for location:2.6-release as the page is currently not linked, but should be merged into features.
  
 
==Translator==
 
==Translator==
Line 18: Line 56:
 
==Coder==
 
==Coder==
 
With weblate you get feedback, where Translators have problems with your messages.
 
With weblate you get feedback, where Translators have problems with your messages.
[https://hosted.weblate.org/projects/gnucash/gnucash/en/ Overview Program Source Messages]
+
[{{URL:wl}}gnucash/en/ Overview Program Source Messages]
 
Tasks by priority:
 
Tasks by priority:
# [https://hosted.weblate.org/translate/gnucash/gnucash/en/?q=label:%22Source%20needs%20review%22 label:"Source needs review"]
+
# [{{URL:wl}}gnucash/en/?q=label:%22Source%20needs%20review%22 label:"Source needs review"]
# [https://hosted.weblate.org/translate/gnucash/gnucash/en/?offset=1&q=check%3Amultiple_failures&sort_by=-num_failing_checks Multiple failing checks] This is usually an indication that something could be done to improve the source string. [https://docs.weblate.org/en/latest/user/checks.html#check-multiple-failures Info]
+
# [{{URL:wl}}gnucash/en/?offset=1&q=check%3Amultiple_failures&sort_by=-num_failing_checks Multiple failing checks] This is usually an indication that something could be done to improve the source string. [{{URL:wl_doc}}user/checks.html#check-multiple-failures Info]
 
:;Tip:In both cases at the bottom select
 
:;Tip:In both cases at the bottom select
 
:# <tt>Comments</tt>,  
 
:# <tt>Comments</tt>,  
Line 32: Line 70:
  
 
;Project settings: Some are derived from our status as <tt>libre hosted</tt> project.
 
;Project settings: Some are derived from our status as <tt>libre hosted</tt> project.
:https://hosted.weblate.org/settings/gnucash/#access is set public meaning:
+
:{{URL:wl_set}}#access is set public meaning:
 
:* visible for all,
 
:* visible for all,
 
:* every registered user can translate,
 
:* every registered user can translate,
 
:* unregistered can attach suggestions.
 
:* unregistered can attach suggestions.
  
:To avoid chaos in https://hosted.weblate.org/settings/gnucash/#workflow
+
:To avoid chaos in {{URL:wl_set}}#workflow
:* [https://docs.weblate.org/en/latest/workflows.html#reviews Review] is activated, ideally a Gnucash Language :Team should have at least 2 reviewers (and unlimited users), confirming each others changes.
+
:* [{{URL:wl_doc}}workflows.html#reviews Review] is activated, ideally a Gnucash Language :Team should have at least 2 reviewers (and unlimited users), confirming each others changes.
  
 
;Component settings:
 
;Component settings:
Line 48: Line 86:
 
::*Change is older than period defined as <tt>Age of changes to commit</tt> on Component configuration.
 
::*Change is older than period defined as <tt>Age of changes to commit</tt> on Component configuration.
  
===Setup===
+
;Weblate PRs:
{| class="wikitable"
+
:Welblate collects all commits for the same component in one '''pull request'''.
|-
+
:One '''commit''' colletcs all changes by the same author.
! scope="col"| WebLate Component
+
:(verify: concurrent changes by different authors on the same message/file/component).
! scope="col"| GitHub Repository/location
+
:A new PR is created, after the old got merged.
! scope="col"| Notes
+
 
|- style="vertical-align:top;"
+
===Workflow===
| [https://hosted.weblate.org/projects/gnucash/glossary/ Glossary]
+
;Before pushing a msgmerge: or, if Pushs (of Pull Requests)<ref name="Push on commit">The first commit creates a Pull Request at Github.
| [https://github.com/Gnucash/gnucash/tree/maint/po/glossary glossary]
+
:On each further commit the PR is force pushed.
| linked project, part of Program
+
:Also after each change in the github repos, the PR gets rebased and force pushed.
 +
:After the PR is merged (or otherwise closed?), the whole procedure starts again.
 +
That means you will have to rebase your interim work on the repo.</ref> are disabled, you can get the current status of commits at {{URL:wl}}#repository or do it separate for real components.
 +
:;Tip: Set URL={{URL:wl_git}}gnucash/ # for gnucash (program and glossary) or
 +
:::URL={{URL:wl_git}}website/ # for ht-docs, then <syntaxhighlight lang="sh">
 +
git remote add weblate $URL
 +
</syntaxhighlight> to your repo. Then you can ''preview'' pending commits by: <syntaxhighlight lang="sh">git fetch weblate</syntaxhighlight>
 +
:If there are '''pending commits''' – their merge will result in conflicts after the push of a msgmerge –
 +
:# Only required, if ''GitHub'' <tt>Settings->Hooks</tt> are misconfigured: '''rebase''' the weblate repo(s):
 +
:#*all together: {{URL:wl}}#repository
 +
:#*or per component: {{URL:wl}}gnucash/#repository …
 +
:#:you need to zoom the window to see the buttons;
 +
:#:''Reason'': merge conflicts would lock the repository and require manually resolving of the conflicts;
 +
:# Only required, if <tt>Push on commit</tt><ref name="Push on commit" /> is ''disabled'' or you want to see a change ''immediately'': '''push''', to create PRs;
 +
:# '''review''' the PR
 +
:## Follow the component specific process in [[Language_Administration#Components]],
 +
:## ''optional:'' '''Comment''' at Github or Weblate
 +
:##:The github committer is the <tt>weblate bot</tt> – he will not dicuss with you.
 +
:##:*Some translators have a github account, too. Then you can ping them with <tt>@<github_name_of_the_translator></tt>
 +
:##:*In all other cases it is better to comment on the changes at weblate:
 +
:##:# Open the file in weblate,
 +
:##:# Search the message,
 +
:##:# set the status to "needs editing[?]", which results in the ''fuzzy flag'' in the po file,
 +
:##:# Add a comment for target group other translators. Unfortunately they are ''not stored'' in the po file.
 +
:# '''merge''' the PRs via {{BuildServer}};
 +
:#;Note: Weblate does not recognize closed/'''rejected PR'''s and will create a new PR with the same stupid commit.
 +
:#:For the current workaround look in [[Language_Administration#All]].
  
|- style="vertical-align:top;"
+
;After pushing a msgmerge: If you click the clock symbol (component update in progress), https://hosted.weblate.org/progress/gnucash/gnucash/?info=1 opens.
| [https://hosted.weblate.org/projects/gnucash/gnucash/ Program]
+
:A push can result in a
| [https://github.com/Gnucash/gnucash/tree/maint/po gnucash]
+
:;conflict: The component gets locked and an alarm is sent to admins. You have to resolve the conflict locally and push it. After that you can unlock the component again.
|
 
  
|- style="vertical-align:top;"
+
===Running Tests===
| [https://hosted.weblate.org/projects/gnucash/website/ Website]
+
Before running tests like ''adding something in the webinterface'' lock the component in https://hosted.weblate.org/projects/gnucash/COMPONENT/#repository. Else our busy translators will update their parts.
| [https://github.com/Gnucash/gnucash-htdocstree/master/po gnucash-htdocs]
 
|
 
|}
 
  
===Workflow===
+
==References==
As long as Pushs of Pull Requests are not enabled, start with https://hosted.weblate.org/projects/gnucash/#repository or do it separate for real components.
+
<References />
:;Tip: remote add weblate to your repo. Then you can preview pending commits.
 
If there are pending commits
 
# rebase (you need to zoom the window to see the button);
 
# push, to create PRs;
 
# review and merge the PRs via {{BuildServer}};
 
# rebase. Now all lines should show 0.
 

Latest revision as of 03:46, 25 January 2022

Weblate is a web based translation tool. On 2020-12-14 https://hosted.weblate.org/projects/gnucash/ was created.

Status
consider it still as experimental and there are still unimplemented ideas in Improve Localization Process#Remaining Ideas by Repos.

This page is organized by roles.

General

Many pages @ weblate link context sensitive help by i in a circle.

Weblate Documentation

Setup

WebLate Component GitHub Repository:location Notes
Glossary gnucash:po/glossary linked project, part of Program
Program gnucash:po
Website gnucash-htdocs:po
Glossary
It tries to collect the common GnuCash specific terminology of all other components.
After it is completed, it can be uploaded into Weblates Gnucash glossary.
Currently it is using and ancient style of context "context: term" as MsgId.
Questions and tasks
  1. Should MsgId "context: term" be converted to MsgContext, MsgId? Pros and cons?
  2. Review of sources for updated lists
  3. Other missing conventions?
Problem
In the current configuration users can mark terms in other components for adding to the glossary—if they add the weblate flag terminology for all languages. This additions conflict with out style of creating the glossary, but after reverting the commits, they seem to get generated again.
Website
Set priority[1] (default=100) to
105 for location:global
104 for location:header
103 for location:menu
102 for location:footer
101 for location:index
100 (remains)
99 for location:2.6-release as the page is currently not linked, but should be merged into features.

Translator

Everybody
can add suggestions as anomymous.
Everybody with a weblate account
can translate and gets mentioned in the po file. In the current configuration a review is required.
Our former language maintainers
are asked to tell us their weblate name, to get Review rights.

Ideally no checks should fail. In some cases, the mistake is in the source string. Then please report them by a comment or label.

Coder

With weblate you get feedback, where Translators have problems with your messages. Overview Program Source Messages Tasks by priority:

  1. label:"Source needs review"
  2. Multiple failing checks This is usually an indication that something could be done to improve the source string. Info
Tip
In both cases at the bottom select
  1. Comments,
  2. Other languages
to get an impression of the problem.

Maintainer

Concept

Weblate is more anarchistic than our hierarchical thinking with core devs accepting or rejecting patches:

Project settings
Some are derived from our status as libre hosted project.
https://hosted.weblate.org/settings/gnucash/#access is set public meaning:
  • visible for all,
  • every registered user can translate,
  • unregistered can attach suggestions.
To avoid chaos in https://hosted.weblate.org/settings/gnucash/#workflow
  • Review is activated, ideally a Gnucash Language :Team should have at least 2 reviewers (and unlimited users), confirming each others changes.
Component settings
Suggestions are enabled, but Suggestion voting and Autoaccept suggestions are currently not.
Lazy commits
The changes in this mode are committed once any of the following conditions are fulfilled:
  • Somebody else changes an already changed string.
  • A merge from upstream occurs.
  • An explicit commit is requested.
  • Change is older than period defined as Age of changes to commit on Component configuration.
Weblate PRs
Welblate collects all commits for the same component in one pull request.
One commit colletcs all changes by the same author.
(verify: concurrent changes by different authors on the same message/file/component).
A new PR is created, after the old got merged.

Workflow

Before pushing a msgmerge
or, if Pushs (of Pull Requests)[2] are disabled, you can get the current status of commits at https://hosted.weblate.org/projects/gnucash/#repository or do it separate for real components.
Tip
Set URL=https://hosted.weblate.org/git/gnucash/gnucash/ # for gnucash (program and glossary) or
URL=https://hosted.weblate.org/git/gnucash/website/ # for ht-docs, then
git remote add weblate $URL
to your repo. Then you can preview pending commits by:
git fetch weblate
If there are pending commits – their merge will result in conflicts after the push of a msgmerge –
  1. Only required, if GitHub Settings->Hooks are misconfigured: rebase the weblate repo(s):
    you need to zoom the window to see the buttons;
    Reason: merge conflicts would lock the repository and require manually resolving of the conflicts;
  2. Only required, if Push on commit[2] is disabled or you want to see a change immediately: push, to create PRs;
  3. review the PR
    1. Follow the component specific process in Language_Administration#Components,
    2. optional: Comment at Github or Weblate
      The github committer is the weblate bot – he will not dicuss with you.
      • Some translators have a github account, too. Then you can ping them with @<github_name_of_the_translator>
      • In all other cases it is better to comment on the changes at weblate:
      1. Open the file in weblate,
      2. Search the message,
      3. set the status to "needs editing[?]", which results in the fuzzy flag in the po file,
      4. Add a comment for target group other translators. Unfortunately they are not stored in the po file.
  4. merge the PRs via code.gnucash.org;
    Note
    Weblate does not recognize closed/rejected PRs and will create a new PR with the same stupid commit.
    For the current workaround look in Language_Administration#All.
After pushing a msgmerge
If you click the clock symbol (component update in progress), https://hosted.weblate.org/progress/gnucash/gnucash/?info=1 opens.
A push can result in a
conflict
The component gets locked and an alarm is sent to admins. You have to resolve the conflict locally and push it. After that you can unlock the component again.

Running Tests

Before running tests like adding something in the webinterface lock the component in https://hosted.weblate.org/projects/gnucash/COMPONENT/#repository. Else our busy translators will update their parts.

References

  1. https://hosted.weblate.org/projects/gnucash/website/#bulk-edit search: "location:index", add flag: "priority:101" …
  2. 2.0 2.1 The first commit creates a Pull Request at Github.
    On each further commit the PR is force pushed.
    Also after each change in the github repos, the PR gets rebased and force pushed.
    After the PR is merged (or otherwise closed?), the whole procedure starts again.
    That means you will have to rebase your interim work on the repo.