[12:32:59]
<+212696609233> D
[12:32:59]
<+212696609233> 😃
[12:47:23]
<+212696609233> freddewitt: 🙂🙂🙂🙂🙂🙂
[12:48:06]
<+212696609233> 🫦
[18:17:02]
<m606> Hello, I would like to submit a PR to fix an issue with the auto readme generation.
Schematically, I am looking to get the locale of all existing README files in an array. Could you please guide me on what would be the correct path to look in for the existing README files in any app branch's root ?
```python
file_list = [f for f in os.listdir('.') if os.path.isfile(f)]
locales = [name.split('_')[-1] for name in file_list]
```
[18:18:02]
<m606> Hello, I would like to submit a PR to fix an issue with the auto readme generation from [regen_readme_in_batch.py](https://github.com/YunoHost/apps/blob/master/tools/readme_generator/regen_readme_in_batch.py)
Schematically, I am looking to get the locale of all existing README files in an array. Could you please guide me on what would be the correct path to look in for the existing README files in any app branch's root ?
```python
file_list = [f for f in os.listdir('.') if os.path.isfile(f)]
locales = [name.split('_')[-1] for name in file_list]
```
[18:24:19]
<m606> Hello, I would like to submit a PR to fix an issue with the auto readme generation from [regen_readme_in_batch.py](https://github.com/YunoHost/apps/blob/master/tools/readme_generator/regen_readme_in_batch.py)
Schematically, I am looking to get the locale of all existing README files in an array. Could you please guide me on what would be the correct path to look in for the existing README files in any app branch's root ?
```python
file_list = [f for f in os.listdir(READMES_FOLDER) if os.path.isfile(f)]
locales = [name.split('_')[-1] for name in file_list]
```
i.e. what should READMES_FOLDER be replaced with (in terms of relative path I believe)?
[18:27:12]
<Bram> You probably want to use the variable "folder" here
[18:27:49]
<Bram> The one defined line 66 which is the used to tell git where to clone the repository line 74
[18:27:58]
<Bram> What bug are you trying to fix?
[18:32:03]
<Bram> FYI this script has only been launched manually once of twice, the automatic git push you might get are from another script
[18:34:43]
<m606> > <@Bram_:matrix.org> FYI this script has only been launched manually once of twice, the automatic git push you might get are from another script
oh, like an unrelated github workflow script ?
[18:36:12]
<m606> not really a bug but following up to to an issue biefly discussed with you, Emy & tituspijean last week, willing to improve the current behavior of readme auto-update which does not regen a readme (with automatic version number update) for a language which is not fully translated (even if it was fully translated in the past and thus created the readme), leading in some cases to some README left in the master branch but not updated.
[18:39:44]
<m606> like this one ? https://github.com/YunoHost/apps/actions/runs/8510487445/workflow
[18:41:20]
<Bram> ah right, I wanted to work on those issue but life ™
[18:41:26]
<Bram> let me point you out where to do that
[18:42:18]
<Bram> > <@m606:matrix.org> oh, like an unrelated github workflow script ?
it's a webhooks that we run on our infra, both this webhook and the regen_in_batch call the same code
[18:42:21]
<Bram> the webhook is here https://github.com/YunoHost/apps/blob/master/tools/readme_generator/webhook.py
[18:42:55]
<Bram> this is where we detect if the README is fully translatable https://github.com/YunoHost/apps/blob/master/tools/readme_generator/make_readme.py#L59-L89
[18:43:06]
<Bram> we want to switch from "we need 100% of translatable string" to something like 95%
[18:43:53]
<Bram> this is where we define the list of READMEs to include in ALL_README.md https://github.com/YunoHost/apps/blob/master/tools/readme_generator/make_readme.py#L170-L186
[18:44:16]
<Bram> we want to switch from "only list the fully translated README" to "list all already existing README"
[18:44:32]
<Bram> (or at least that's my plan)
[18:44:41]
<m606> yes that was also my proposal!
[18:44:53]
<m606> i mean the second part
[18:45:04]
<Bram> cool :)
[18:51:17]
<Bram> don't hesitate if you need guidance or have other questions but I might not answer immediately (I have a pain crisis to deal with) (it's common for me dw)
[18:55:32]
<m606> Sorry to hear that, good luck with the crisis.
Thanks for the guidance, I am not familiar with the webhook stuff, but I will check it. Basically my plan was something like : list all existing readme locales, and then run `generate_READMEs()` only if readme locale is 100% available OR if README already exists in master branch.
[18:56:15]
<m606> the 100% rule could be reduced to 95% if you prefer, it would impact only creation of new readmes.
[19:45:49]
<Bram> I'm not sure if we prefer updated but not fully translated README or outdated README :/
[19:45:49]
<Bram> the reason why we wanted to not translate README if the translation is not fully available was to avoid having half translated READMEs which would be a bad UX, updating existing README would break this rule
[19:45:49]
<Bram> I guess we'll have to discuss that, I don't know which solution would be the best
[19:46:10]
<m606> In my opinion:
1. For readme language versions which have never been created so far, create them only if fully translated (or 95% or...)
2. For readme language version that were already created (because 100% translated at a certain point) and which are now missing translation updates (<100%):
a. do nothing, i.e. keep the old readme. It appears to me as the most misleading behavior.
b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script only changes the version number which is likely to be there in every readmes.
c. remove the old readme. I'd rather do that than doing nothing.
[19:46:10]
<m606> In my opinion:
1. For readme language versions which have never been created so far, create them only if fully translated (or 95% or...)
1. For readme language version that were already created (because 100% translated at a certain point) and which are now missing translation updates (<100%):
a. do nothing, i.e. keep the old readme. current behavior, which appears to me as the most misleading one.
b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script only changes the version number which is likely to be there in every readmes.
c. remove the old readme. I'd rather do that than doing nothing.
[19:46:12]
<m606> In my opinion:
1. For readme language versions which have never been created so far, create them only if fully translated (or 95% or...)
1. For readme language version that were already created (because 100% translated at a certain point) and which are now missing translation updates (<100%):
a. do nothing, i.e. keep the old readme. current behavior, which appears to me as the most misleading one.
b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script only changes the version number which is likely to be there in every readmes. A warning could also be added at the top the readme, to say that this Readme is not fully translated and might lack some indications, and invite user to check an other language and/or help translating it.
c. remove the old readme. I'd rather do that than doing nothing.
[19:55:05]
<m606> > <@oniricorpe:im.emelyne.eu> > b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script only changes the version number which is likely to be there in every readmes. A warning could also be added at the top the readme, to say that this Readme is not fully translated and might lack some indications, and invite user to check an other language and/or help translating it.
>
> that's not true, the script regen entirely the README files each time
I meant - if the translation in the given language has not moved (even though the original content has changed in the original language), not much would change after regen but the version number
[19:55:05]
<Émy - OniriCorpe> > b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script only changes the version number which is likely to be there in every readmes. A warning could also be added at the top the readme, to say that this Readme is not fully translated and might lack some indications, and invite user to check an other language and/or help translating it.
that's not true, the script regen entirely the README files each time
[19:55:05]
<Émy - OniriCorpe> yes but it's not what the script do for now
[19:55:05]
<Émy - OniriCorpe> > b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script only changes the version number which is likely to be there in every readmes. A warning could also be added at the top the readme, to say that this Readme is not fully translated and might lack some indications, and invite user to check an other language and/or help translating it.
that's not true, the sript regen entirely the README files each time
[19:55:08]
<m606> ah yes you are right, in case b, it would simply not regen but leave the old readme (I update my answer above).
[19:55:22]
<m606> ah yes you are right, in case a, it would simply not regen but leave the old readme (I update my answer above).
[19:56:45]
<Bram> FYI right now the script already leaves untouched old README that it won't regen so that's probably already what you want
[19:57:52]
<Bram> Ah, I read everything : b seems to make a lot of sens yeah
[19:57:52]
<Bram> And indeed a is the curent behavior
[19:58:40]
<m606> In my opinion:
1. For readme language versions which have never been created so far, create them only if fully translated (or 95% or...)
1. For readme language version that were already created (because 100% translated at a certain point) and which are now missing translation updates (<100%):
a. do nothing, i.e. keep the old readme. current behavior, which appears to me as the most misleading one.
b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script would only changes the version number which is likely to be there in every readmes. A warning could also be added at the top the readme, to say that this Readme is not fully translated and might lack some indications, and invite user to check an other language and/or help translating it.
c. remove the old readme. I'd rather do that than doing nothing.
[20:00:15]
<m606> In my opinion:
1. For readme language versions which have never been created so far, create them only if fully translated (or 95% or...)
1. For readme language version that were already created (because 100% translated at a certain point) and which are now missing translation updates (<100%):
a. do nothing, i.e. keep the old readme. current behavior, which appears to me as the most misleading one.
b. update the readme whatever the current translation status. I would favor this option. Basically the auto update script would only change the version number which is likely to be there in every readmes. A warning could also be added at the top the readme, to say that this Readme is not fully translated and might lack some indications, and invite user to check an other language and/or help translating it.
c. remove the old readme. I'd rather do that than doing nothing.
[20:00:18]
<m606> right, I updated my message above in case b, with "**would** only change the version number" (as this is not the case currently).