-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: Enhance UserContribution description with language code for templates from different sites #66
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
base: main
Are you sure you want to change the base?
refactor: Enhance UserContribution description with language code for templates from different sites #66
Conversation
… templates from different sites
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.
Pull Request Overview
This PR fixes a bug where red interlanguage links were incorrectly shown by enhancing the description logic for UserContribution templates.
- Added logic to check if a template’s language code differs from the revision article’s language, and conditionally append it.
- Updated the description format in templateremoval.py to include the language code when relevant.
- Updated POT-Creation-Date in locale files for fi_FI, gl_ES, nb_NO. - Adjusted line numbers for various messages in localization files to reflect code changes. - Corrected translations for several messages in Finnish, Galician, and Norwegian Bokmål. - Fixed the template removal rule to correctly handle language codes in the description.
|
Thanks for this! I would prefer to base it on the changes in #55 though, because that one does things a bit differently – including removing the |
That should not be a problem. I will look into this issue again when #55 is merged. |
| #, python-format | ||
| msgid "removal of {{tl|%(template)s}}" | ||
| msgstr "{{tx|%(template)s}} txantiloia kentzea" | ||
| msgid "removal of {{tl|%(template)s%(lang)s}}" |
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.
This won't be correct without a |. Also, unfortunately, the {{tl}} template works differently in different languages – the feature of linking to other languages seems to be Norwegian-specific. I think it's better to use [[Template:%(template)s]].
(This goes for all uses of {{tl}}, of course, not just this specific one.)
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.
Duh, never mind the first part – %(lang)s includes the |.
Co-authored-by: Jon Harald Søby <jhsoby@gmail.com>
Co-authored-by: Jon Harald Søby <jhsoby@gmail.com>
Description
This PR fixes a bug that caused red interlanguage links to appear for other Wikipedia language versions.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Fixes #65
Tested?
Added to documentation?
[optional] Are there any pre- or post-deployment tasks we need to perform?
Needs to run
make allfor the bot.