Skip to content

Commit

Permalink
add translation
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongHo Park committed Jul 5, 2024
1 parent 35b50fe commit e740a5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions frontend/src/lib/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ the [Linguistics Institute at Payap University](https://li.payap.ac.th/) in Chia
"user_needs_to_relogin": "Added members will need to log out and back in again before they see the new project.",
"invalid_email_address": "Invalid email address: {email}",
},
"add_org": {
"add_button": "Add Organization",
"modal_title": "Choose organization",
"submit_button": "Add Organization"
},
"bulk_add_members": {
"add_button": "Bulk Add/Create Members",
"explanation": "Adds all the entered logins and emails to this project. New accounts will be created automatically for users that don't have one yet.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<script lang="ts">
import { BadgeButton } from '$lib/components/Badges';
import { FormModal } from '$lib/components/modals';
import { z } from 'zod';
import { _addProjectToOrg } from './+page';
import t from '$lib/i18n';
import { Select } from '$lib/forms';
import { _addProjectToOrg } from './+page';
import type { Organization } from '$lib/gql/types';
import { FormModal } from '$lib/components/modals';
import { BadgeButton } from '$lib/components/Badges';
export let orgList;
export let orgList: Partial<Organization>[] = [];
export let projectId: string;
const schema = z.object({
Expand All @@ -30,14 +32,14 @@
</script>

<BadgeButton variant="badge-success" icon="i-mdi-account-plus-outline" on:click={openModal}>
{'Add Organization'}
{$t('project_page.add_org.add_button')}
</BadgeButton>

<FormModal bind:this={formModal} {schema} let:errors>
<span slot="title">{'Choose Organization'}</span>
<span slot="title">{$t('project_page.add_org.modal_title')}</span>
<Select
id="org"
label={'organization'}
label={$t('project_page.organizations')}
bind:value={$form.orgId}
error={errors.orgId}
on:change
Expand All @@ -46,4 +48,5 @@
<option value={org.id}>{org.name}</option>
{/each}
</Select>
<span slot="submitText">{$t('project_page.add_org.submit_button')}</span>
</FormModal>

0 comments on commit e740a5c

Please sign in to comment.