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
invite email translation now happens on the fly #1250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we need a level of indirection here. Adding {% trans %}
blocks in the templates should be working.
If it's not, we need to figure out why :-)
.gitignore
Outdated
@@ -18,3 +18,5 @@ ihatemoney/budget.db | |||
.python-version | |||
.coverage* | |||
prof | |||
*.ipynb | |||
*/.ipynb_checkpoints/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these should be better in your global ~/.gitignore
file maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didnt know that was possible! fixed
@@ -1,3 +1,5 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we need the extra spaces here. Any reason you added them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Anyway, thanks for taking a look at this =D |
aight well you know what they say about the perfect and the good |
@@ -17,4 +17,4 @@ ihatemoney/budget.db | |||
.idea | |||
.python-version | |||
.coverage* | |||
prof | |||
prof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, do not remove the newline at the end of files :-)
@@ -0,0 +1,3 @@ | |||
{% trans %} | |||
{{ untranslated_text }} | |||
{% endtrans %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Have you tried to understand what's going on here? If it's not working then we need to understand why and potentially open a bug upstream :) |
Thanks for the proposed change, but that's not the way we work here. And in general I believe it's not the right approach to contribute to open source projects. About the change itself: have you verified it actually works? That is: 1) that you were able to extract the text to translate into the translation catalog, and 2) that a translation of this text in the catalog correctly shows up. It seems to me that the indirection will prevent the extraction from working. |
Hi @afriedman412. I'm sorry to see your comments and understand your frustration. I can only hope you understand ours. As @zorun mentioned, the "Take it or leave it" is not how we chose to work on this project. We are open to the conversation, but as maintainers have the final say into what's merged or not, and code quality is one of our concerns. So, let me try to be more precise in my feedback: I'm surprised we have to do an indirection here in the code, and I don't understand why we have to do it. It seems that something weird is happening, and might be related to how we configured Jinja, or how we call it. I also want to add that I'm only criticizing here the code you wrote, and not you. Again : thanks for your contribution here, and I hope you're well. Don't hesitate to ask if you need some help. PS : Thanks @zorun for the clarifications and help here 👍 |
hi -- thanks for revisiting this! it looks like this is going to take a bit more hands-on translation work than I expected, so I'll pass on it for now. |
Fixes #869
Invite emails were hard coded and could not be translated using the existing code base. This change runs the (already rendered) email body through a Jinja
{% trans %}
tag.There's a new function to do this (
utils. translate_template_text
) and it can be generalized to other emails if need be!