Skip to content

Commit

Permalink
feat: translate "Starting job" message (#237)
Browse files Browse the repository at this point in the history
* feat: translate "Starting job" message

* Create silent-toes-bow.md
  • Loading branch information
carlbrugger authored Dec 12, 2024
1 parent 427ba68 commit 4b21272
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .changeset/silent-toes-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@flatfile/embedded-utils': patch
'@flatfile/javascript': patch
'@flatfile/react': patch
'@flatfile/vue': patch
---

This release translates the "Starting job" message
9 changes: 6 additions & 3 deletions packages/embedded-utils/src/utils/createListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { FlatfileRecord } from '@flatfile/hooks'
import { Browser, FlatfileEvent, FlatfileListener } from '@flatfile/listener'
import { recordHook } from '@flatfile/plugin-record-hook'
import {
SimpleOnboarding,
NewSpaceFromPublishableKey,
DefaultSubmitSettings,
NewSpaceFromPublishableKey,
SimpleOnboarding,
} from '../types'
import { handlePostMessage } from './handlePostMessage'
import { JobHandler } from './JobHandler'
Expand Down Expand Up @@ -82,7 +82,10 @@ export const createSimpleListener = ({
configure.on('job:ready', async (event) => {
const { jobId, spaceId, workbookId } = event.context
try {
await api.jobs.ack(jobId, { info: 'Starting job', progress: 10 })
await api.jobs.ack(jobId, {
info: 'jobs.messages.startingJob',
progress: 10,
})

const job = new JobHandler(jobId)
const { data: workbookSheets } = await api.sheets.list({
Expand Down
5 changes: 4 additions & 1 deletion packages/javascript/src/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export const createSimpleListener = ({
configure.on('job:ready', async (event) => {
const { jobId, spaceId, workbookId } = event.context
try {
await api.jobs.ack(jobId, { info: 'Starting job', progress: 10 })
await api.jobs.ack(jobId, {
info: 'jobs.messages.startingJob',
progress: 10,
})

const job = new JobHandler(jobId)
const { data: workbookSheets } = await api.sheets.list({
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/hooks/legacy/usePortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const usePortal = (
const { jobId, spaceId, workbookId } = event.context
try {
await api.jobs.ack(jobId, {
info: 'Starting job',
info: 'jobs.messages.startingJob',
progress: 10,
})

Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export const OnSubmitAction = (
info:
onSubmitSettings?.startingJobMessage === null
? undefined
: onSubmitSettings?.startingJobMessage ?? 'Starting job',
: onSubmitSettings?.startingJobMessage ??
'jobs.messages.startingJob',
progress: 10,
})
const job = new JobHandler(jobId)
Expand Down
5 changes: 4 additions & 1 deletion packages/vue/src/utils/createSimpleListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export const createSimpleListener = ({
configure.on('job:ready', async (event: FlatfileEvent) => {
const { jobId, spaceId, workbookId } = event.context
try {
await api.jobs.ack(jobId, { info: 'Starting job', progress: 10 })
await api.jobs.ack(jobId, {
info: 'jobs.messages.startingJob',
progress: 10,
})

const job = new JobHandler(jobId)
const { data: workbookSheets } = await api.sheets.list({
Expand Down

0 comments on commit 4b21272

Please sign in to comment.