Commit graph

14 commits

Author SHA1 Message Date
Jascha Ezra Urbach fadbc76aaa
Merge pull request #2789 from bpeel/translatable-shelf-name
Fix two places where the reading status shelf name wasn’t translated
2023-04-15 16:59:59 +02:00
Neil Roberts 9092c9c80c Add a translatable name for the "stopped-reading" status shelf 2023-04-06 16:03:35 +02:00
Neil Roberts b0f90d05f2 Move the shelf names to a dict instead of a chain of if statements
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.
2023-04-06 16:02:24 +02:00
Josh Soref 764bc0c204 spelling: produce
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref d2d087dcb7 spelling: identifiername
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Mouse Reeve 742d97b177 Python formatting 2022-07-07 12:23:10 -07:00
Mouse Reeve 076ba6f0ae Dramatically reduce cache duration for reading statuses
I originally set this for a very long timeout because this value should
be invalidated when it needs to be by the models, and if that worked
perfectly, this would reduce queries dramatically for books that show up
in ones feed frequently, but don't change status (for example, a book
you read and your friend is currently posting about). In practice, of
course, there are errors in invalidating this cache which leave this
value appearing extremely broken and it's next to impossible to fix.

This change makes each of the timeouts related to reading an hour, which
will still give performance benefit when browsing the site (especially
for loading the same book multiple times on a page), but resolve
naturally if the cache gets into a bad state.
2022-07-07 12:06:06 -07:00
Mouse Reeve 4905652e22 Handle stopped reading special case in javascript
This should be refactored, but maybe not today
2022-05-26 12:23:13 -07:00
Mouse Reeve dfe0656eb4 Typo fix 2022-05-26 11:38:36 -07:00
Mouse Reeve 1f6fbd8d29 Fixes stopped reading button logic
The stopped state is similar to finished
2022-05-26 11:28:54 -07:00
Mouse Reeve 7d6032e110 Fixes calls to filter 2022-02-28 11:18:03 -08:00
Mouse Reeve 0f5fd6be15 Move translations to filter 2022-02-28 11:05:12 -08:00
Mouse Reeve f86016ba33 Python formatting for black update 2022-01-30 07:01:38 -08:00
Mouse Reeve 8746409e6d Adds shelf tags file 2022-01-18 11:20:27 -08:00