-
Notifications
You must be signed in to change notification settings - Fork 93
Translations #898
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
base: master
Are you sure you want to change the base?
Translations #898
Conversation
code/templates/property.html
Outdated
<p> | ||
<aside class="aside-note"> | ||
<mark>TRANSLATION</mark> | ||
<div> |
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.
To do; styling similar as entity.html
@@ -3,6 +3,17 @@ | |||
|
|||
<h1>{{ number }} {{ entity}}</h1> | |||
|
|||
<p> |
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.
To do; styling similar as entity.html
Some changes during review
c&p from Ghesselink#1
I'm sorry, I didn't consider that
Does this mean we'll still translate the entire html and load only the 'active' translation, or do we then just create .mo files and do the translation on request (when loading the page)? In that case, we can still cache these .mo files based on newly incoming translations in the
I'm having another look at it, but I've had some issues with loading these from the .md locally. Furthermore, this way we're completed sure that the translated text is the same as the original. However, as you mentioned, when we move away from caching based on translations and track changes in the md file too this will be redundant.
It's a bit of a mix with terminology sometimes. 'Translations' can mean a couple of things now already;
Perhaps we can better rename this to cached_translations or similar, and store the http responses in redis (?) |
I would say create all .mo files at startup and when there are changes to the translations. Most likely in poller.py I still don't really understand the load_original (and how it interacts with caching). Could you give some example values and how it's not possible to get these from the compiled .mo?
You mean the html cache? fyi caching is easy to do for ex in nginx https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/ Let me know how you think we can advance on finalizing this? |
Brief summary of current structure;
The script compiles .po files into .mo files and stores them in the cache, but only if the cache is not already populated. Otherwise, the translations are retrieved directly from the cache and made available on the server, with the language preference stored in a cookie on the frontend and translations passed to HTML via (server.py) render_template.
Todo