Skip to content
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

TagFix_Tree_Lang_fr: fix suggestion with | and voir aussi-list included #2361

Open
Famlam opened this issue Oct 14, 2024 · 1 comment
Open

Comments

@Famlam
Copy link
Collaborator

Famlam commented Oct 14, 2024

https://osmose.openstreetmap.fr/nl/issue/0aa40099-8f6d-51eb-1269-4e5f754f2961

def liste_des_arbres_fruitiers(self):
reline = re.compile(r"\[\[([^:]*)$")
data = urlread(u"https://fr.wikipedia.org/wiki/Liste_des_arbres_fruitiers?action=raw", 1)
#data = open(u"Liste_des_arbres_fruitiers?action=raw").read()
data = data.split("]]")
for line in data:
for res in reline.findall(line):
for n in res.split('|'):
self.Tree[self.normalize(n)] = {'species:fr':res}

I spotted this while working on #2358

  1. A tree with name = Grenadier in French-speaking countries triggers item=class=3120
    The proposed fix is species:fr = Grenadier commun|Grenadier
    Probably it should be either species:fr = Grenadier commun or species:fr = Grenadier, rather than a fix with a |

  2. In addition I think this plugin incorrectly uses the Voir aussi-list as well to make fixes

@Famlam
Copy link
Collaborator Author

Famlam commented Oct 18, 2024

Regarding the first point:
Similar things as Grenadier commun|Grenadier will probably happen with:

  • Prunus avium|Merisier
  • Olivier (arbre)|Olivier
  • Noix du Brésil|Noyer du Brésil

Fixing it (assuming it's truely an error) likely isn't too difficult, but I'll need someone who speaks French to tell me whether species:fr should be the thing before or after the | :)
Or maybe it can be either, or varies, but in that case we should probably modify the autofix suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant