-
Notifications
You must be signed in to change notification settings - Fork 223
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
"translation progress issue" reading #531
Comments
Here's the Node.js module that does it. First, I have the full tutorial tree, then I loop over articles and parse the issue. const tutorial = require('engine/koa/tutorial');
const TutorialTree = tutorial.TutorialTree;
const Article = tutorial.Article;
const markit = require('engine/markit');
module.exports = async function(progressIssue) {
await tutorial.boot();
const articles = TutorialTree.instance().getAll().filter(entry => entry instanceof Article);
let restMap = new Map();
let info = progressIssue.body.match(/\* \[.+/g) || [];
for(let item of info) {
let [all, checked, rest] = item.match(/\* \[(.)\] (.*)/);
checked = Boolean(checked.trim());
rest = rest.trim();
let translator = rest.match(/\(@(.*)\)/);
translator = translator && translator[1].trim();
let prNumber = rest.match(/ #(\d+)/);
prNumber = prNumber && prNumber[1];
let record = {
checked,
rest,
translator,
prNumber
};
for(let article of articles) {
if (rest.startsWith(article.title)) {
record.rest = record.rest.slice(article.title.length).trim();
restMap.set(article.title, record);
} else if (rest.startsWith(markit.escape(article.title))) {
record.rest = record.rest.slice(markit.escape(article.title).length).trim();
restMap.set(article.title, record);
} else if (rest.startsWith(`[${article.title}]`) || rest.startsWith(`[${markit.escape(article.title)}]`)) {
record.rest = rest.match(/\[.*?\]\(.*?\)(.*)/).pop().trim();
restMap.set(article.title, record);
}
}
}
return restMap;
}; |
Maybe keep the format compatible instead? E.g. add the date after the PR number. Like this:
Or are tables better (they're not sortable in GitHub)? What do other maintainers think? |
thanks! "other maintainers" or maybe spanish is a special case, we had LOTS of translators, when we freed one article the space was claimed quickly. should we put the suggestion in the eng repo? |
People taking an article and giving up is a general problem. It happens with every repo, just because, well, people are people. Usually, not a big deal, but surely we could help here. So, there should be a script walks over PRs, gets dates (easy to do) and does.. What? |
Already done. But I suggest to add the date into the issue the moment the translator takes it. So no search needed. No need to walk PRs, just the comments, I took the date from there (last claim) and PR from your list. I asumed user followed procedure, they all did. |
Yes maybe you are right. I bet most langs have just a few translators. Maybe they dont need it. Spanish community is big. There was a moment with few translations done and nearly all art were taken. |
If the date is needed only for the script, then we don't have to show it in the issue. |
if the date is in the issue, we dont need the script ok, only one must survive. the script also filters. and can add some sort (didnt need it) what a shame - just found another bug. |
Dates may be needed for manual cleanup... What else? Is there any other need? The script can run daily, to check the dates and cleanup. |
Date is all what I needed In fact this is the actual report my script showed before the last manual cleanup (today list is 8 )
very few and under control, thats why I say we dont need anything here now. btw, I just "fixed" the count ( 165 of 173 tasks ) by marking the example line |
A script can easily retrieve the dates from github, given the PR number. As you describe it, there's no need for a date in the issue (meant for humans to read). |
We dont care PR. going further we only care claimed articles with NO PR from script 2020-12-27 is the date of the (last [art] ) comment with 👍 from BOT
2a) Bot could be a nice killer too, say "erase @ translators older than 3 months with no PR" |
Ah, I get it. You mean claimed articles w/o PR. Yes, the info should be in the issue. So, a table or a list? |
without. w/o, wo. What's happening to my brain. sorry. no prefference... I put the script on glitchme, about order, the only I used was claimed date, but I prioritized 1st section before start cleaning the other 2 |
it works for me, didnt put the links before because i'm not proud of the code, ( so many things I'd do differenly!) but the result probed to be really useful, it helped me a lot in the past year, https://joaquinelio-zone17.glitch.me/ lang/issue fr / 3, de / 1 |
Hi @iliakan, I'm closing this. (only one article left! ) But you may use the suggestion: May another suggestion: |
Sorry for not implementing this yet, @joaquinelio , I think the idea is good. |
Hi @iliakan
Not very important,
woulld you kindly share the regex to read the translation progress lines?
just the regex, I have a little bug in mine.
Suggestion for other repos:
You may want to add "Date claimed" next to the user when it claims it.
date helped maintainers to decide the too-long-claimed articles to free
The text was updated successfully, but these errors were encountered: