Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added translation keys #709

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions plugins/view-mapped/src/view-mapped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function viewMappedPlugin() {

try {
// First, we acknowledge the job
await tick(10, 'Updating the table to only view mapped fields')
await tick(10, 'plugins.viewMapped.updatingTable')

// Retrieving the info on the custom job we created in the listener above, and storing that info in its own "customJobInfo" variable
const customJobInfo = await api.jobs.get(jobId)
Expand All @@ -59,7 +59,7 @@ export function viewMappedPlugin() {
mappedFields.push(destinationFieldKey)
}

await tick(30, 'Updating the table to only view mapped fields')
await tick(30, 'plugins.viewMapped.updatingTable')

// Making an API call to only get the "data" property out of the response, and saving it as its own "fetchedWorkbook" variable
// We need to make this API call and cannot just use what's inside of "workbookOne" because we need data in a specific format
Expand All @@ -82,7 +82,7 @@ export function viewMappedPlugin() {
return fields.length > 0 ? fields : null
})

await tick(50, 'Halfway there, hang tight...')
await tick(50, 'plugins.viewMapped.halfway')

const sheets = workbook.sheets.map((sheet, index) => {
const mappedWorkbookFields = filteredWorkbookFields[index]
Expand All @@ -102,7 +102,7 @@ export function viewMappedPlugin() {
}
})

await tick(80, 'Almost done...')
await tick(80, 'plugins.viewMapped.almostDone')

// Updating each sheet in a workbook to only contain fields that a user mapped. This ensures that when the table with data loads, only mapped fields will be displayed
await api.workbooks.update(workbookId, {
Expand All @@ -116,7 +116,7 @@ export function viewMappedPlugin() {
// Completing the job with an appropriate message to the user
return {
outcome: {
message: 'Table update complete. Please audit the data',
message: 'plugins.viewMapped.complete',
acknowledge: false,
},
}
Expand All @@ -127,7 +127,7 @@ export function viewMappedPlugin() {
JSON.stringify(error, null, 2)
)
throw new Error(
'An error occured while updating the workbook. See Event Logs.'
'plugins.viewMapped.error'
)
}
})
Expand Down
Loading