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

Fix two places where the reading status shelf name wasn’t translated #2789

Merged
merged 3 commits into from
Apr 15, 2023

Conversation

bpeel
Copy link
Contributor

@bpeel bpeel commented Apr 6, 2023

  • In the list of shelves on the page for a book, the name of the reading status shelf was always in English.
  • The “stopped-reading” status shelf was never translated.
Previously in the list of shelves on the page for a book it was always
using the English name of the shelf for the shelf of the reading status.
The main reason to do this is that if we try to add another name then
pylint will complain that there are too many return statements. It might
be slightly faster too.

If I understand correctly it doesn’t matter that the _ function is being
called at module load time because it is mapped to gettext_lazy so the
actual translation will be done when the string is used.
@bpeel
Copy link
Contributor Author

bpeel commented Apr 6, 2023

I’ve added another commit to try to fix the pylint problem. Sorry about that.

@jaschaurbach
Copy link
Member

@bpeel We all had been there forgetting pylint ;)

@jaschaurbach jaschaurbach merged commit fadbc76 into bookwyrm-social:main Apr 15, 2023
@bpeel bpeel deleted the translatable-shelf-name branch April 15, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants