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 multiple issues from user exports config changes #3238

Merged
merged 8 commits into from
Mar 1, 2024

Conversation

hughrun
Copy link
Contributor

@hughrun hughrun commented Jan 20, 2024

  • improve nginx config
  • fix DATA_UPLOAD_MAX_MEMORY_SIZE default not being an int
  • translate fallback value in id_to_username template tag
  • make location of setting to turn on user exports easier to locate for admins

fixes #3227
fixes #3231
fixes #3232
fixes #3236

- improve nginx config
- fix DATA_UPLOAD_MAX_MEMORY_SIZE default not being an int
- translate fallback value in id_to_username template tag
- make location of setting to turn on user exports easier to locate for admins

fixes bookwyrm-social#3227
fixes bookwyrm-social#3231
fixes bookwyrm-social#3232
fixes bookwyrm-social#3236
@hughrun hughrun requested a review from mouse-reeve January 20, 2024 02:24
@hughrun
Copy link
Contributor Author

hughrun commented Jan 20, 2024

I'm not at all confident about the nginx changes (at the very least there's surely a more succinct way to do this) so advice on that would be welcome.

@mouse-reeve I'm also not entirely confident I'm using blocktrans properly here. I couldn't work out how to use the {% url 'blah' %} tag inside a translated string.

@mouse-reeve
Copy link
Member

mouse-reeve commented Feb 3, 2024

I found some other translation issues, so I went through and fixed the lot. To your specific question, you can set the url variable using as to assign the output of a template function to a variable: {% url 'settings-imports' as url %}. Then the blocktrans tag should contain as little HTML as possible, so the <br> tag should live outside the translation block, and there shouldn't be line breaks or trailing whitespace, so I added trimmed to remove it:

        <br/>
        {% url 'settings-imports' as url %}
        {% blocktrans trimmed %}
            User exports settings can be changed from <a href="{{ url }}">the Imports page</a> in the Admin dashboard.
        {% endblocktrans %}

mouse-reeve and others added 2 commits February 3, 2024 07:04
Since arithmetic is not allowed in .env files, a change in unit for
the variable seems most usable.
@hughrun hughrun marked this pull request as draft February 6, 2024 07:25
@hughrun hughrun marked this pull request as ready for review February 7, 2024 07:57
@hughrun
Copy link
Contributor Author

hughrun commented Feb 7, 2024

@bookwyrm-social/code-review this is ready for final review.

There is still an issue with the reverse-proxy nginx config however I'm going to log that as a separate issue rather than bog down this PR, as I'm probably not the best person to fix it.

Thanks @dato and @mouse-reeve for your help!

@mouse-reeve mouse-reeve merged commit 354388c into bookwyrm-social:main Mar 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants