-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Convert namespaces to regular templates #1518
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.25%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Ok. Clever. But do we really want to mess the code so deep ? If we do need to treat some namespaces differently, maybe we should just do it in clean() instead of artificially add templates to process them down the line in each language? |
I like the current idea, mostly because when the one-time job to handle new templates will be done, it's almost fully automated for upcoming namespace changes (even if it's unlikely to happen on a regular basis).
It seems we are lucky enough: those templates always start with a capital letter. It should be OK. |
OK, that's not true for Italian, at least. But it doesn't mess with current templates either. |
I moved out from I'm surprised that English is not using any namespaces. The last patch for German will come soon. |
The wiktionary API gave back the "canonical" namespace name in english I guess if Fichier needs to be handled differently, then in other languages all namespaces with canonical "File" will have to as well. |
Given the "missing template" line reported by the CI, for now no need to handle more templates. |
Do you plan to work on another solution? Or let's put it like that: do you dislike that proposal enough to reject the patch? :) |
Trying something shorter as we speak |
Superseded by #1530. |
Fixes #1494
Another proposal. It requires more code, and we will need to handle new templates when we discover them.