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