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

Fix i18n executions list #2583

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/editor-ui/src/components/ExecutionsList.vue
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
Expand Up @@ -9,7 +9,7 @@
</div>
<div class="action">
{{ $locale.baseText('nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe') }}
<a @click="selectHttpRequest">{{ $locale.baseText('nodeCreator.noResults.httpRequest') }}</a> or
<a @click="selectHttpRequest">{{ $locale.baseText('nodeCreator.noResults.httpRequest') }}</a> {{ $locale.baseText('nodeCreator.noResults.or') }}
<a @click="selectWebhook">{{ $locale.baseText('nodeCreator.noResults.webhook') }}</a> {{ $locale.baseText('nodeCreator.noResults.node') }}
</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions packages/editor-ui/src/components/mixins/genericHelpers.ts
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
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
5 changes: 4 additions & 1 deletion packages/editor-ui/src/plugins/i18n/locales/en.json
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 Expand Up @@ -411,6 +413,7 @@
"dontWorryYouCanProbablyDoItWithThe": "Don’t worry, you can probably do it with the",
"httpRequest": "HTTP Request",
"node": "node",
"or": "or",
"requestTheNode": "Request the node",
"wantUsToMakeItFaster": "Want us to make it faster?",
"weDidntMakeThatYet": "We didn't make that... yet",
Expand Down