Skip to content

Commit

Permalink
🔀 Merge branch 'fix-i18n-executions-list'
Browse files Browse the repository at this point in the history
  • Loading branch information
janober committed Dec 20, 2021
2 parents de971de + d126933 commit 419c719
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n",
"version": "0.155.1",
"version": "0.155.2",
"description": "n8n Workflow Automation Tool",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
Expand Down Expand Up @@ -112,7 +112,7 @@
"lodash.get": "^4.4.2",
"mysql2": "~2.3.0",
"n8n-core": "~0.97.0",
"n8n-editor-ui": "~0.122.0",
"n8n-editor-ui": "~0.122.1",
"n8n-nodes-base": "~0.153.0",
"n8n-workflow": "~0.80.0",
"oauth-1.0a": "^2.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n-editor-ui",
"version": "0.122.0",
"version": "0.122.1",
"description": "Workflow Editor UI for n8n",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
Expand Down
6 changes: 4 additions & 2 deletions packages/editor-ui/src/components/ExecutionsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@
</el-table-column>
<el-table-column :label="$locale.baseText('executionsList.status')" width="122" align="center">
<template slot-scope="scope" align="center">

<n8n-tooltip placement="top" >
<div slot="content" v-html="statusTooltipText(scope.row)"></div>
<span class="status-badge running" v-if="scope.row.stoppedAt === undefined">
<span class="status-badge running" v-if="scope.row.waitTill">
{{ $locale.baseText('executionsList.waiting') }}
</span>
<span class="status-badge running" v-else-if="scope.row.stoppedAt === undefined">
{{ $locale.baseText('executionsList.running') }}
</span>
<span class="status-badge success" v-else-if="scope.row.finished">
Expand Down
7 changes: 4 additions & 3 deletions packages/editor-ui/src/components/mixins/genericHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ export const genericHelpers = mixins(showMessage).extend({
displayTimer (msPassed: number, showMs = false): string {
if (msPassed < 60000) {
if (showMs === false) {
return `${this.$locale.number(Math.floor(msPassed / 1000), 'decimal')} ${this.$locale.baseText('genericHelpers.sec')}`;
return `${Math.floor(msPassed / 1000)} ${this.$locale.baseText('genericHelpers.sec')}`;
}

return `${this.$locale.number(msPassed / 1000, 'decimal')} ${this.$locale.baseText('genericHelpers.sec')}`;
return `${msPassed / 1000} ${this.$locale.baseText('genericHelpers.sec')}`;
}

const secondsPassed = Math.floor(msPassed / 1000);
const minutesPassed = Math.floor(secondsPassed / 60);
const secondsLeft = (secondsPassed - (minutesPassed * 60)).toString().padStart(2, '0');

return `${this.$locale.number(minutesPassed, 'decimal')}:${this.$locale.number(secondsPassed, 'decimal')} ${this.$locale.baseText('genericHelpers.min')}`;
return `${minutesPassed}:${secondsLeft} ${this.$locale.baseText('genericHelpers.min')}`;
},
editAllowedCheck (): boolean {
if (this.isReadOnly) {
Expand Down
3 changes: 2 additions & 1 deletion packages/editor-ui/src/plugins/i18n/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ As a convenience, the base text file may contain the special key `reusableBaseTe
},
```

<!--
As a convenience, the base text file may also contain the special key `numberFormats` to localize numbers. For more information, refer to Vue i18n's [number localization](https://kazupon.github.io/vue-i18n/guide/number.html#number-localization).

```json
Expand All @@ -87,7 +88,7 @@ As a convenience, the base text file may also contain the special key `numberFor
},
},
}
```
``` -->

#### Interpolation

Expand Down
4 changes: 3 additions & 1 deletion packages/editor-ui/src/plugins/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@
"mode": "Mode",
"modes": {
"error": "error",
"integrated": "integrated",
"manual": "manual",
"retry": "retry",
"trigger": "trigger"
"trigger": "trigger",
"webhook": "webhook"
},
"name": "@:reusableBaseText.name",
"openPastExecution": "Open Past Execution",
Expand Down

0 comments on commit 419c719

Please sign in to comment.