diff --git a/src/lib/components/pages/ImportProject.svelte b/src/lib/components/pages/ImportProject.svelte
index e29ebc7..d5016b8 100644
--- a/src/lib/components/pages/ImportProject.svelte
+++ b/src/lib/components/pages/ImportProject.svelte
@@ -17,7 +17,7 @@ You should have received a copy of the GNU Affero General Public License along w
/**
* Data populated by SvelteKit
*/
- export let data = null;
+ export let data = {};
diff --git a/src/lib/components/templates/ImportProject.svelte b/src/lib/components/templates/ImportProject.svelte
index f86db68..f6c1dbe 100644
--- a/src/lib/components/templates/ImportProject.svelte
+++ b/src/lib/components/templates/ImportProject.svelte
@@ -18,7 +18,45 @@ You should have received a copy of the GNU Affero General Public License along w
/**
* Required context for populating the template.
*/
- export const data = null;
+ export let data = {};
+
+ /**
+ * Translation keys.
+ */
+ const i18n = {
+ form: {
+ avatar: 'page.import_project.form.avatar',
+ components: 'page.import_project.form.components',
+ fields: {
+ avatar: {
+ label: 'page.import_project.form.fields.avatar.label'
+ },
+ description: {
+ label: 'page.import_project.form.fields.description.label',
+ placeholder: 'page.import_project.form.fields.description.placeholder'
+ },
+ issues: {
+ label: 'page.import_project.form.fields.issues.label'
+ },
+ name: {
+ error: 'page.import_project.form.fields.name.error',
+ label: 'page.import_project.form.fields.name.label',
+ placeholder: 'page.import_project.form.fields.name.placeholder'
+ },
+ pr: {
+ label: 'page.import_project.form.fields.pr.label'
+ },
+ repository: {
+ hint: 'page.import_project.form.fields.repository.hint',
+ label: 'page.import_project.form.fields.repository.label',
+ placeholder: 'page.import_project.form.fields.repository.placeholder'
+ }
+ },
+ submit: 'page.import_project.form.submit'
+ },
+ heading: 'page.import_project.heading',
+ intro: 'page.import_project.intro'
+ };
@@ -26,12 +64,12 @@ You should have received a copy of the GNU Affero General Public License along w
class="w-96 flex flex-col gap-6 mx-auto px-8 py-8 bg-surface-100 border border-surface-300"
name="import-project"
>
-
{$_('page.import_project.heading')}
-
{$_('page.import_project.intro')}
+
{$_(i18n.heading)}
+
{$_(i18n.intro)}
@@ -40,11 +78,11 @@ You should have received a copy of the GNU Affero General Public License along w
name="project-name"
class="input input-error"
type="text"
- placeholder={$_('page.import_project.form.fields.name.placeholder')}
+ placeholder={$_(i18n.form.fields.name.placeholder)}
/>
domain.example/projects/NameUpdateRealtime
@@ -54,19 +92,19 @@ You should have received a copy of the GNU Affero General Public License along w
-
{$_('page.import_project.form.avatar')}
+
{$_(i18n.form.avatar)}
@@ -76,7 +114,7 @@ You should have received a copy of the GNU Affero General Public License along w
class="h-12 flex flex-1 gap-2 items-center justify-center px-4 bg-surface-025 text-surface-400"
>
- {$_('page.import_project.form.fields.avatar.label')}
+ {$_(i18n.form.fields.avatar.label)}