Fix translation string error in /terms#1307
Fix translation string error in /terms#1307katydidnot merged 4 commits intoWikipediaLibrary:masterfrom
Conversation
jsnshrmn
left a comment
There was a problem hiding this comment.
Thanks for your work on this! Can you explain the translation changes? Typically, if we have an issue with a message string, we change the message in source and then let cicd handle updates to the i18n files in locale.
There was a problem hiding this comment.
I had the same question Jason had about the messages being populated from CI/CD.
And a minor fix:
When I ran the tests there was a linter error.
Here's the output:
WARN[0000] /Users/katherinegraessle/Workspace/TWLight/docker-compose.yml: `version` is obsolete
WARN[0000] /Users/katherinegraessle/Workspace/TWLight/docker-compose.override.yml: `version` is obsolete
[Tue Jun 18 15:26:31 UTC 2024]
black --target-version py311 --check TWLight
would reformat /app/TWLight/users/oauth.py
Oh no! 💥 💔 💥
1 file would be reformatted, 245 files would be left unchanged.
--- /app/TWLight/users/oauth.py 2024-06-18 15:00:44.018872+00:00
+++ /app/TWLight/users/oauth.py 2024-06-18 15:26:33.123470+00:00
@@ -261,17 +261,17 @@
request.session["user_created"] = created
# The authenticate() function of a Django auth backend must return
# the user.
return user
-
+
# Implementation for https://docs.djangoproject.com/en/4.2/ref/contrib/auth/#django.contrib.auth.get_user
def get_user(self, user_id):
user = User.objects.filter(pk=user_id).first()
if user is None:
logger.warning("OAuthBackend.get_user: User does not exist")
- return user
+ return user
class OAuthInitializeView(View):
"""
Ask Wikipedia for a temporary key/secret for the user, and redirect
You can fix these issues by running the following command on your host
docker exec CONTAINER /venv/bin/black -t py311 /app/TWLight ```
I think the translation changes happened when I ran |
That makes sense; can you drop them from this pr? |
4bf97d6 to
2fdb670
Compare
2fdb670 to
6482c88
Compare
Co-authored-by: Jason Sherman <jsnshrmn@users.noreply.github.com>
6482c88 to
b29663b
Compare
Ok, after about an hour of fighting Git, I think this is ready |
We update the strings in our application code. Then our CI runs a job that extracts all of the messages for i18n. Then translatewiki pulls those messages. Then people update translatewiki. Then translate wiki commits new translations to our message files. But we should never update the non english non-qqq messages in master. And those messages (english and qqq) we should only update indirectly by updating our strings and comments in our source code. |
Thank you, this is helpful. |
6305a64 to
b29663b
Compare
Description
Fixes a translation string in Spanish which caused the
/termspage to error out.Rationale
This fixes the
/termspage, which new users who picked Spanish as their UI language must agree to before using the library.Phabricator Ticket
T366620
How Has This Been Tested?
Tested manually that the page is loading correctly in Spanish and in other languages.
Screenshots of your changes (if appropriate):
Types of changes
What types of changes does your code introduce? Add an
xin all the boxes that apply: