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

Create a system user for "Imported" translations #3403

Open
mathjazz opened this issue Oct 9, 2024 · 0 comments
Open

Create a system user for "Imported" translations #3403

mathjazz opened this issue Oct 9, 2024 · 0 comments
Labels
P4 We expect it to be fixed someday task

Comments

@mathjazz
Copy link
Collaborator

mathjazz commented Oct 9, 2024

For translations imported from VCS, the Translation.user field isn't set and the translations appear as "Imported" in the UI. We sometimes need to create in-memory instances of User objects to handle the "Imported" user along with other translation authors more easily:

u = t.user or User(username="Imported", first_name="Imported", email="imported")

User(username="Imported", first_name="Imported", email="imported")

Rather than doing that, we should create an actual system_user representing the "Imported" user. It will also save us from things like:

if self.username == "Imported":
return ("", "Imported")

@mathjazz mathjazz added task P4 We expect it to be fixed someday labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 We expect it to be fixed someday task
Projects
None yet
Development

No branches or pull requests

1 participant