Skip to content

Commit

Permalink
chore: add translations and set up for adding roles remotely for a user
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed Apr 11, 2024
1 parent 2e5beaa commit 380f6ee
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 106 deletions.
28 changes: 28 additions & 0 deletions frontend/src/assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,34 @@
"required": "This field is required",
"deadline": "The deadline must be after the start date"
},
"admin": {
"title": "Admin",
"keyword": "Keyword",
"search": "Search",
"edit": "Edit",
"cancel": "Cancel",
"save": "Save",
"users": {
"title": "Users",
"id": "ID",
"username": "Username",
"email": "Email",
"roles": "Roles"
},
"user": "User",
"assistants": {
"title": "Assistants"
},
"assistant": "Assistant",
"students": {
"title": "Students"
},
"student": "Student",
"teachers": {
"title": "Teachers"
},
"teacher": "Teacher"
},
"primevue": {
"startsWith": "Starts with",
"contains": "Contains",
Expand Down
32 changes: 13 additions & 19 deletions frontend/src/assets/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,37 +141,31 @@
},
"admin": {
"title": "Beheerder",
"keyword": "Trefwoord",
"search": "Zoektocht",
"edit": "Bewerken",
"cancel": "Annuleer",
"save": "Sla op",
"users": {
"title": "Gebruikers",
"create": "Gebruiker aanmaken",
"edit": "Gebruiker bewerken"
"id": "ID",
"username": "Gebruikersnaam",
"email": "E-mail",
"roles": "Functies"
},
"user": "Gebruiker",
"assistants": {
"title": "Assistenten"
},
"assistant": "Assistent",
"students": {
"title": "Studenten"
},
"student": "Student",
"teachers": {
"title": "Leerkrachten"
}
},
"admin": {
"title": "Beheerder",
"users": {
"title": "Gebruikers",
"create": "Gebruiker aanmaken",
"edit": "Gebruiker bewerken"
},
"assistants": {
"title": "Assistenten"
},
"students": {
"title": "Studenten"
},
"teachers": {
"title": "Leerkrachten"
}
"teacher": "Leerkracht"
},
"primevue": {
"accept": "Ja",
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/layout/admin/AdminHeader.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<script setup lang="ts"></script>
<script setup lang="ts">
import LanguageSelector from '@/components/LanguageSelector.vue';
</script>

<template />
<template>
<LanguageSelector />
</template>

<style scoped lang="scss"></style>
12 changes: 6 additions & 6 deletions frontend/src/components/layout/admin/AdminSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ const { t } = useI18n();
const items = ref([
{
label: t('admin.users.title'),
label: 'admin.users.title',
items: [
{
label: t('admin.users.title'),
label: 'admin.users.title',
route: 'admin-users',
},
{
label: t('admin.assistants.title'),
label: 'admin.assistants.title',
},
{
label: t('admin.students.title'),
label: 'admin.students.title',
},
{
label: t('admin.teachers.title'),
label: 'admin.teachers.title',
},
],
},
Expand Down Expand Up @@ -53,7 +53,7 @@ const items = ref([
<template #item="{ item, props }">
<RouterLink :to="{ name: item.route }">
<a v-ripple class="flex align-items-center" v-bind="props.action">
<span class="ml-2">{{ item.label }}</span>
<span class="ml-2">{{ t(item.label) }}</span>
<span
v-if="item.shortcut"
class="ml-auto border-1 surface-border border-round surface-100 text-xs p-1"
Expand Down
Loading

0 comments on commit 380f6ee

Please sign in to comment.