mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Translate order by
- Cleanup the store. - Fix tests.
This commit is contained in:
parent
16d8a42d9b
commit
245be52ac8
@ -1,29 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<filter-menu-section :divider="false" class="date-sort-filter">
|
<filter-menu-section :divider="false" class="date-sort-filter">
|
||||||
<template #filter-list>
|
<template #filter-list>
|
||||||
<!-- Wolle 👇🏼 translations & click
|
|
||||||
<labeled-button
|
|
||||||
icon="user-plus"
|
|
||||||
:label="$t('filter-menu.following')"
|
|
||||||
:filled="filteredByUsersFollowed"
|
|
||||||
:title="$t('contribution.filterFollow')"
|
|
||||||
@click="toggleFilteredByFollowed(currentUser.id)"
|
|
||||||
/> -->
|
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<labeled-button
|
<labeled-button
|
||||||
icon="sort-amount-asc"
|
icon="sort-amount-asc"
|
||||||
:label="'Newest first'"
|
:label="$t('filter-menu.order.newest.label')"
|
||||||
:filled="orderBy === 'createdAt_desc'"
|
:filled="orderBy === 'createdAt_desc'"
|
||||||
:title="'Sort posts by the newest first'"
|
:title="$t('filter-menu.order.newest.hint')"
|
||||||
@click="toggleOrder('createdAt_desc')"
|
@click="toggleOrder('createdAt_desc')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<labeled-button
|
<labeled-button
|
||||||
icon="sort-amount-desc"
|
icon="sort-amount-desc"
|
||||||
:label="'Oldest first'"
|
:label="$t('filter-menu.order.oldest.label')"
|
||||||
:filled="orderBy === 'createdAt_asc'"
|
:filled="orderBy === 'createdAt_asc'"
|
||||||
:title="'Sort posts by the oldest first'"
|
:title="$t('filter-menu.order.oldest.hint')"
|
||||||
@click="toggleOrder('createdAt_asc')"
|
@click="toggleOrder('createdAt_asc')"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<following-filter />
|
<following-filter />
|
||||||
</div>
|
</div>
|
||||||
<div class="filter-menu-options">
|
<div class="filter-menu-options">
|
||||||
<h2 class="title">{{ 'Sorted by …' }}</h2> <!-- Wolle -->
|
<h2 class="title">{{ $t('filter-menu.order-by') }}</h2> <!-- Wolle -->
|
||||||
<date-sort-filter />
|
<date-sort-filter />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -333,9 +333,20 @@
|
|||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"categories": "Themenkategorien",
|
"categories": "Themenkategorien",
|
||||||
"emotions": "Emotionen",
|
"emotions": "Emotionen",
|
||||||
"filter-by": "Filtern nach...",
|
"filter-by": "Filtern nach ...",
|
||||||
"following": "Benutzern, denen ich folge",
|
"following": "Benutzern, denen ich folge",
|
||||||
"languages": "Sprachen"
|
"languages": "Sprachen",
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": "Sortiere die Neuesten nach vorn",
|
||||||
|
"label": "Neueste zuerst"
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": "Sortiere die Ältesten nach vorn",
|
||||||
|
"label": "Älteste zuerst"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"order-by": "Sortieren nach ..."
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Folgen",
|
"follow": "Folgen",
|
||||||
@ -779,18 +790,6 @@
|
|||||||
"thanks": "Danke!",
|
"thanks": "Danke!",
|
||||||
"tribunal": "Registergericht"
|
"tribunal": "Registergericht"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": "Neueste"
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": "Älteste"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "Neue Nutzungsbedingungen",
|
"newTermsAndConditions": "Neue Nutzungsbedingungen",
|
||||||
"termsAndConditionsNewConfirm": "Ich habe die neuen Nutzungsbedingungen durchgelesen und stimme zu.",
|
"termsAndConditionsNewConfirm": "Ich habe die neuen Nutzungsbedingungen durchgelesen und stimme zu.",
|
||||||
|
|||||||
@ -333,9 +333,20 @@
|
|||||||
"all": "All",
|
"all": "All",
|
||||||
"categories": "Categories of Content",
|
"categories": "Categories of Content",
|
||||||
"emotions": "Emotions",
|
"emotions": "Emotions",
|
||||||
"filter-by": "Filter by...",
|
"filter-by": "Filter by ...",
|
||||||
"following": "Users I follow",
|
"following": "Users I follow",
|
||||||
"languages": "Languages"
|
"languages": "Languages",
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": "Sort posts by the newest first",
|
||||||
|
"label": "Newest first"
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": "Sort posts by the oldest first",
|
||||||
|
"label": "Oldest first"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"order-by": "Order by ..."
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Follow",
|
"follow": "Follow",
|
||||||
@ -779,18 +790,6 @@
|
|||||||
"thanks": "Thanks!",
|
"thanks": "Thanks!",
|
||||||
"tribunal": "Registry court"
|
"tribunal": "Registry court"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": "Newest"
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": "Oldest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "New Terms and Conditions",
|
"newTermsAndConditions": "New Terms and Conditions",
|
||||||
"termsAndConditionsNewConfirm": "I have read and agree to the new terms of conditions.",
|
"termsAndConditionsNewConfirm": "I have read and agree to the new terms of conditions.",
|
||||||
|
|||||||
@ -280,9 +280,19 @@
|
|||||||
"all": "Todas",
|
"all": "Todas",
|
||||||
"categories": "Categorías de contenido",
|
"categories": "Categorías de contenido",
|
||||||
"emotions": "Emociones",
|
"emotions": "Emociones",
|
||||||
"filter-by": "Filtrar por...",
|
"filter-by": "Filtrar por ...",
|
||||||
"following": "Usuarios que sigo",
|
"following": "Usuarios que sigo",
|
||||||
"languages": "Idiomas"
|
"languages": "Idiomas",
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Más reciente"
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Más antiguo"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Seguir",
|
"follow": "Seguir",
|
||||||
@ -702,18 +712,6 @@
|
|||||||
"thanks": "¡Gracias!",
|
"thanks": "¡Gracias!",
|
||||||
"tribunal": "Tribunal de registro"
|
"tribunal": "Tribunal de registro"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": "Más reciente"
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": "Más antiguo"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "Nuevos términos de uso",
|
"newTermsAndConditions": "Nuevos términos de uso",
|
||||||
"termsAndConditionsNewConfirm": "He leído y acepto los nuevos términos de uso.",
|
"termsAndConditionsNewConfirm": "He leído y acepto los nuevos términos de uso.",
|
||||||
|
|||||||
@ -269,9 +269,19 @@
|
|||||||
"all": "Toutes",
|
"all": "Toutes",
|
||||||
"categories": "Catégories de contenu",
|
"categories": "Catégories de contenu",
|
||||||
"emotions": "Émotions",
|
"emotions": "Émotions",
|
||||||
"filter-by": "Filtrer par...",
|
"filter-by": "Filtrer par ...",
|
||||||
"following": "Utilisateurs que je suis",
|
"following": "Utilisateurs que je suis",
|
||||||
"languages": "Langues"
|
"languages": "Langues",
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Plus récent"
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Le plus ancien"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Suivre",
|
"follow": "Suivre",
|
||||||
@ -670,18 +680,6 @@
|
|||||||
"thanks": "Merci!",
|
"thanks": "Merci!",
|
||||||
"tribunal": "Tribunal de registre"
|
"tribunal": "Tribunal de registre"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": "Plus récent"
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": "Le plus ancien"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "Nouvelles conditions générales",
|
"newTermsAndConditions": "Nouvelles conditions générales",
|
||||||
"termsAndConditionsNewConfirm": "J'ai lu et accepté les nouvelles conditions générales.",
|
"termsAndConditionsNewConfirm": "J'ai lu et accepté les nouvelles conditions générales.",
|
||||||
|
|||||||
@ -279,7 +279,17 @@
|
|||||||
"emotions": null,
|
"emotions": null,
|
||||||
"filter-by": null,
|
"filter-by": null,
|
||||||
"following": null,
|
"following": null,
|
||||||
"languages": null
|
"languages": null,
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": null
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": null
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": null,
|
"follow": null,
|
||||||
@ -620,18 +630,6 @@
|
|||||||
"thanks": null,
|
"thanks": null,
|
||||||
"tribunal": "registro tribunale"
|
"tribunal": "registro tribunale"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": null
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "Nuovi Termini e Condizioni",
|
"newTermsAndConditions": "Nuovi Termini e Condizioni",
|
||||||
"termsAndConditionsNewConfirm": "Ho letto e accetto le nuove condizioni generali di contratto.",
|
"termsAndConditionsNewConfirm": "Ho letto e accetto le nuove condizioni generali di contratto.",
|
||||||
|
|||||||
@ -315,9 +315,19 @@
|
|||||||
"all": "Todos",
|
"all": "Todos",
|
||||||
"categories": "Categorias de Conteúdo",
|
"categories": "Categorias de Conteúdo",
|
||||||
"emotions": "Emoções",
|
"emotions": "Emoções",
|
||||||
"filter-by": "Filtrar por...",
|
"filter-by": "Filtrar por ...",
|
||||||
"following": "Usuários que eu sigo",
|
"following": "Usuários que eu sigo",
|
||||||
"languages": "Idiomas"
|
"languages": "Idiomas",
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Mais recentes"
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Mais antigos"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Seguir",
|
"follow": "Seguir",
|
||||||
@ -655,18 +665,6 @@
|
|||||||
"thanks": "Obrigado(a)!",
|
"thanks": "Obrigado(a)!",
|
||||||
"tribunal": "tribunal de registo"
|
"tribunal": "tribunal de registo"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": "Mais recentes"
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": "Mais antigos"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "Novos Termos e Condições",
|
"newTermsAndConditions": "Novos Termos e Condições",
|
||||||
"termsAndConditionsNewConfirm": "Eu li e concordo com os novos termos de condições.",
|
"termsAndConditionsNewConfirm": "Eu li e concordo com os novos termos de condições.",
|
||||||
|
|||||||
@ -280,9 +280,19 @@
|
|||||||
"all": "Все",
|
"all": "Все",
|
||||||
"categories": "Категории",
|
"categories": "Категории",
|
||||||
"emotions": "",
|
"emotions": "",
|
||||||
"filter-by": "Другие фильтры",
|
"filter-by": "Другие фильтры ...",
|
||||||
"following": "Мои подписки",
|
"following": "Мои подписки",
|
||||||
"languages": "Языки"
|
"languages": "Языки",
|
||||||
|
"order": {
|
||||||
|
"newest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Сначала новые"
|
||||||
|
},
|
||||||
|
"oldest": {
|
||||||
|
"hint": null,
|
||||||
|
"label": "Сначала старые"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Подписаться",
|
"follow": "Подписаться",
|
||||||
@ -702,18 +712,6 @@
|
|||||||
"thanks": "Спасибо!",
|
"thanks": "Спасибо!",
|
||||||
"tribunal": "Суд регистрации"
|
"tribunal": "Суд регистрации"
|
||||||
},
|
},
|
||||||
"store": {
|
|
||||||
"posts": {
|
|
||||||
"orderBy": {
|
|
||||||
"newest": {
|
|
||||||
"label": "Сначала новые"
|
|
||||||
},
|
|
||||||
"oldest": {
|
|
||||||
"label": "Сначала старые"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"termsAndConditions": {
|
"termsAndConditions": {
|
||||||
"newTermsAndConditions": "Новые условия и положения",
|
"newTermsAndConditions": "Новые условия и положения",
|
||||||
"termsAndConditionsNewConfirm": "Я прочитал(а) и согласен(на) с новыми условиями.",
|
"termsAndConditionsNewConfirm": "Я прочитал(а) и согласен(на) с новыми условиями.",
|
||||||
|
|||||||
@ -39,8 +39,8 @@ describe('PostIndex', () => {
|
|||||||
// value: 'createdAt_desc',
|
// value: 'createdAt_desc',
|
||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
'posts/selectedOrder': () => () => 'createdAt_desc',
|
// 'posts/selectedOrder': () => () => 'createdAt_desc',
|
||||||
'posts/orderIcon': () => 'sort-amount-desc',
|
// 'posts/orderIcon': () => 'sort-amount-desc',
|
||||||
'posts/orderBy': () => 'createdAt_desc',
|
'posts/orderBy': () => 'createdAt_desc',
|
||||||
'auth/user': () => {
|
'auth/user': () => {
|
||||||
return { id: 'u23' }
|
return { id: 'u23' }
|
||||||
|
|||||||
@ -109,17 +109,17 @@ export const getters = {
|
|||||||
// label: $t(option.key),
|
// label: $t(option.key),
|
||||||
// }
|
// }
|
||||||
// }),
|
// }),
|
||||||
selectedOrder: (state) => ({ $t }) => {
|
// Wolle selectedOrder: (state) => ({ $t }) => {
|
||||||
return {
|
// return {
|
||||||
...state.order,
|
// ...state.order,
|
||||||
label: $t(state.order.key),
|
// label: $t(state.order.key),
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
orderBy(state) {
|
orderBy(state) {
|
||||||
// return state.order.value
|
// return state.order.value
|
||||||
return state.order
|
return state.order
|
||||||
},
|
},
|
||||||
orderIcon(state) {
|
// Wolle orderIcon(state) {
|
||||||
return state.order.icon
|
// return state.order.icon
|
||||||
},
|
// },
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user