Skip to content

Commit

Permalink
feat: replace ID with key
Browse files Browse the repository at this point in the history
Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker committed Nov 6, 2023
1 parent 4e754ce commit d6f466d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/frontend/src/lib/components/docs/DocForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@
<article class="doc-form" in:fade>
<form on:submit|preventDefault={onSubmit}>
<Value ref="doc-id">
<svelte:fragment slot="label">{$i18n.document_form.field_doc_id_label}</svelte:fragment>
<svelte:fragment slot="label">{$i18n.document_form.field_doc_key_label}</svelte:fragment>
<div class="form-doc-id">
<input
id="doc-id"
type="text"
placeholder={$i18n.document_form.field_doc_id_placeholder}
placeholder={$i18n.document_form.field_doc_key_placeholder}
name="doc_id"
bind:value={key}
/>
<button
class="text action start"
type="button"
on:click={() => (key = nanoid())}
aria-label={$i18n.document_form.field_doc_id_btn_auto_id}
aria-label={$i18n.document_form.field_doc_key_btn_auto_key}
>
<IconAutoRenew />
</button>
Expand Down
14 changes: 7 additions & 7 deletions src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@
"document_submission_failed": "Document submission failed!"
},
"document_form": {
"field_doc_id_label": "Doc ID",
"field_doc_id_btn_auto_id": "Auto ID",
"field_doc_id_placeholder": "Document ID",
"field_doc_key_label": "Key",
"field_doc_key_btn_auto_key": "Auto key",
"field_doc_key_placeholder": "Key",
"field_name_label": "Field",
"field_name_placeholder": "Field name",
"field_type_label": "Type",
Expand All @@ -282,10 +282,10 @@
"field_type_number": "Number",
"field_value_true": "True",
"field_value_false": "False",
"btn_add_field": "Add Field",
"btn_add_document": "Add Document",
"title_add_new_document": "Add New Document",
"title_edit_document": "Edit Document"
"btn_add_field": "Add field",
"btn_add_document": "Add document",
"title_add_new_document": "Add new document",
"title_edit_document": "Edit document"
},
"asset": {
"owner": "Owner",
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/src/lib/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@
"document_submission_failed": "Invio del documento non riuscito!"
},
"document_form": {
"field_doc_id_label": "Doc ID",
"field_doc_id_btn_auto_id": "Auto ID",
"field_doc_id_placeholder": "ID documento",
"field_doc_key_label": "Key",
"field_doc_key_btn_auto_key": "Auto key",
"field_doc_key_placeholder": "Key",
"field_name_label": "Field",
"field_name_placeholder": "Nome del campo",
"field_type_label": "Type",
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/src/lib/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@
"document_submission_failed": "文件提交失败!"
},
"document_form": {
"field_doc_id_label": "Doc ID",
"field_doc_id_btn_auto_id": "Auto ID",
"field_doc_id_placeholder": "文件编号",
"field_doc_key_label": "Key",
"field_doc_key_btn_auto_key": "Auto key",
"field_doc_key_placeholder": "Key",
"field_name_label": "Field",
"field_name_placeholder": "字段名称",
"field_type_label": "Type",
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ interface I18nDocument {
}

interface I18nDocument_form {
field_doc_id_label: string;
field_doc_id_btn_auto_id: string;
field_doc_id_placeholder: string;
field_doc_key_label: string;
field_doc_key_btn_auto_key: string;
field_doc_key_placeholder: string;
field_name_label: string;
field_name_placeholder: string;
field_type_label: string;
Expand Down

0 comments on commit d6f466d

Please sign in to comment.