-
Notifications
You must be signed in to change notification settings - Fork 44
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
Added scripts to create translators_*.info #141
Conversation
The Bash script creates `translators_*.info` from `*_*.ts`. Changes of `translators_*.info` will be committed to new branch "translators-action" and a pull request created. This will done automatically 1 times a day by Github actions
@yan12125 or @luis-pereira, would you please review it? I'm not good at this -- as you may already know ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with shell scripts, so I didn't review the scripts but just guess the intention from the scripts. The overall idea looks great. Thanks for this PR!
However, I'm a little worried about using shell scripts. Is there an LXQt developer good at shell scripts? If not, those scripts may get stale sooner or later, and we might go back to maintaining translators' info manually then.
outdir=$base/../list | ||
|
||
cd $base | ||
ts=`find . -name *_*$1.ts` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe desktop files like https://github.com/lxqt/pcmanfm-qt/blob/master/pcmanfm/translations/pcmanfm-qt_zh_CN.desktop should be considered as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will also add code for desktop files.
I'm always here. Just don't forget to assign or tag me. |
Great! Do you mind to check if those shell scripts look good, too? |
Yeah, I like them |
This is checked and implicitly approved. It's not merged only because an explicit approval is missing. Since I don't have enough knowledge in this area, I can't merge it for 0.16.0. Please consider it for the next release! |
It looks quite nice as logic, parsing git log for "*_.desktop.yaml" would include the former .desktop files. |
cd $dir | ||
echo "gitlog: $fn" | ||
echo -e "\nF:$fn" >> $outp | ||
git log --use-mailmap --no-merges --pretty=format:"%H" $fn | xargs -n1 git log -1 --numstat --shortstat --pretty=format:"H:%H%ns:%s%nA:%aN %aE%na:%an %ae%nD:%ai" >> $outp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recently, git-log can't get the translator's name and email.
qps $ git log -1 --numstat --shortstat --pretty=format:"H:%H%ns:%s%nA:%aN %aE%na:%an %ae%nD:%ai" 89a914dde31aa4249e10d136d4943fc0ba9b9b45
H:89a914dde31aa4249e10d136d4943fc0ba9b9b45
s:Weblate commits (#255)
A:LXQtBot [email protected]
a:LXQtBot [email protected]
D:2020-10-30 15:24:34 +0800
3 3 src/translations/qps_ja.ts
1 file changed, 3 insertions(+), 3 deletions(-)
qps $
I'll think of another way.
I see #97 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because they are "co-authored by" in default?
I see no automatic way to generate reports in json in weblate atm
https://docs.weblate.org/en/weblate-4.2.1/devel/reporting.html#translation-progress-reporting
And as I edited those "enter" shortkey translations I'm cited for many languages. Last 30 days:
[{"Portuguese": [["[email protected]", "S\u00e9rgio Marques", 2], ["[email protected]", "Hugo Carvalho", 1615]]}, {"Chinese (Simplified)": [["[email protected]", "Kaijie Chen", 349]]}, {"Danish": [["[email protected]", "Standreas", 1], ["[email protected]", "scootergrisen", 111]]}, {"Finnish": [["[email protected]", "Teemu Sirvi\u00f6", 181]]}, {"Italian": [["[email protected]", "Saverio Brancaccio", 5], ["[email protected]", "Standreas", 145]]}, {"Japanese": [["[email protected]", "Masamichi Ito", 222]]}, {"German": [["[email protected]", "Standreas", 5], ["[email protected]", "Ettore Atalan", 44]]}, {"Russian": [["[email protected]", "Golubev Alexander", 1], ["[email protected]", "Dmitry Astankov", 49]]}, {"Lithuanian": [["[email protected]", "Moo", 36]]}, {"Swedish": [["[email protected]", "Standreas", 1]]}, {"Spanish": [["[email protected]", "Standreas", 1], ["[email protected]", "jogama", 4]]}, {"Portuguese (Brazil)": [["[email protected]", "Standreas", 1], ["[email protected]", "EltonFF", 44]]}, {"Turkish": [["[email protected]", "Dr. Ayhan YAL\u00c7INSOY", 11], ["[email protected]", "Mehmet Akif", 108]]}, {"Hungarian": [["[email protected]", "Standreas", 1], ["[email protected]", "zoli111", 213]]}, {"Czech": [["[email protected]", "Standreas", 1], ["[email protected]", "p-bo", 145]]}, {"Greek": [["[email protected]", "Dimitrios Glentadakis", 3]]}, {"Bulgarian": [["[email protected]", "Standreas", 2], ["[email protected]", "Viliyan Yordanov", 21], ["[email protected]", "Mincho Kondarev", 89], ["[email protected]", "Mincho Kondarev", 3204]]}, {"Basque": [["[email protected]", "Bittor Poza", 84]]}, {"Hebrew": [["[email protected]", "Yaron Shahrabani", 97]]}, {"Dutch": [["[email protected]", "Standreas", 1]]}, {"Chinese (Traditional)": [["[email protected]", "Kaijie Chen", 1], ["[email protected]", "Chih-Hsuan Yen", 3]]}]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a permission for you, not sure if it works.
If not you could have admin rights.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS: thinking about this new rule is about "downloading translation reports", probably it will not work for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have permission yet. But I don't need permission now.
If a command can get "Translation reports" without admin rights, I use it in the shell script.
Command: curl
or wlc
or wget
...
For 1 year I've been testing the scripts in my repository. I found it difficult to make a complete list of all the translators with the scripts. |
Fixes #113
The Bash script creates
translators_*.info
from*_*.ts
.Changes of
translators_*.info
will be committed to new branch "translators-action" and a pull request created.This will done automatically 1 times a day by Github actions.
Steps:
Please see https://github.com/ito32bit/lxqt-about/blob/patch3-translators/.github/workflows/create_translators_pr.yml
/translators/.mailmap
to all repositories*_*.ts
*.info
*.info
to directory/traslatorsinfo
Excluding the commits of the following :
*_*.ts
,*.desktop
and*.desktop.in
Sample:
https://github.com/ito32bit/lxqt-about/actions
translators_*.info
https://github.com/ito32bit/lxqt-about/tree/master/translatorsinfo