Skip to content

Commit

Permalink
fix(editor): Fix locale plularisation if count is 0 (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIvaniv authored and maspio committed May 25, 2023
1 parent c8b88a1 commit 33b6b28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/editor-ui/src/components/ExecutionsUsage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<n8n-text size="small" :bold="true" color="warning">
{{
locale.baseText('executionUsage.currentUsage.count', {
adjustToNumber: daysLeftOnTrial,
adjustToNumber: daysLeftOnTrial || 0,
})
}}
</n8n-text>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/plugins/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class I18nClass {
key: BaseTextKey,
options?: { adjustToNumber?: number; interpolate?: { [key: string]: string } },
): string {
if (options && options.adjustToNumber) {
if (options?.adjustToNumber !== undefined) {
return this.i18n.tc(key, options.adjustToNumber, options && options.interpolate).toString();
}

Expand Down

0 comments on commit 33b6b28

Please sign in to comment.