fixed frontend localization
This commit is contained in:
parent
e05019d2b1
commit
4f09970130
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -25,6 +25,7 @@
|
||||
|
||||
<script type="application/javascript">
|
||||
window.IMPORT_ID = {{pk}};
|
||||
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
|
||||
</script>
|
||||
|
||||
{% render_bundle 'import_response_view' %}
|
||||
|
@ -61,6 +61,8 @@
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
|
||||
window.RECIPE_ID = {{recipe.pk}};
|
||||
window.USER_SERVINGS = {{ user_servings }};
|
||||
window.SHARE_UID = '{{ share }}';
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
<script type="application/javascript">
|
||||
window.IMAGE_PLACEHOLDER = "{% static 'assets/recipe_no_image.svg' %}"
|
||||
|
||||
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
|
||||
</script>
|
||||
|
||||
{% render_bundle 'recipe_search_view' %}
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.refreshData()
|
||||
|
||||
this.$i18n.locale = window.CUSTOM_LOCALE
|
||||
setInterval(() => {
|
||||
if ((this.import_id !== null) && window.navigator.onLine && this.import_info.running) {
|
||||
this.refreshData()
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 1vh">
|
||||
<a class="btn btn-primary btn-block text-uppercase"
|
||||
:href="resolveDjangoUrl('data_import_url')">{{ $t('Url_Import') }}</a>
|
||||
:href="resolveDjangoUrl('data_import_url')">{{ $t('Import') }}</a>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 1vh">
|
||||
<button class="btn btn-primary btn-block text-uppercase" @click="resetSearch">
|
||||
@ -281,6 +281,8 @@ export default {
|
||||
})
|
||||
|
||||
this.refreshData()
|
||||
|
||||
this.$i18n.locale = window.CUSTOM_LOCALE
|
||||
},
|
||||
watch: {
|
||||
settings: {
|
||||
|
@ -196,6 +196,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.loadRecipe(window.RECIPE_ID)
|
||||
this.$i18n.locale = window.CUSTOM_LOCALE
|
||||
},
|
||||
methods: {
|
||||
loadRecipe: function (recipe_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user