mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
✏️ Improve naming
This commit is contained in:
parent
8015f99211
commit
b7ba200db0
|
@ -267,7 +267,7 @@ export default mixins(
|
||||||
defaultLocale (): string {
|
defaultLocale (): string {
|
||||||
return this.$store.getters.defaultLocale;
|
return this.$store.getters.defaultLocale;
|
||||||
},
|
},
|
||||||
englishLocale(): boolean {
|
isEnglishLocale(): boolean {
|
||||||
return this.defaultLocale === 'en';
|
return this.defaultLocale === 'en';
|
||||||
},
|
},
|
||||||
...mapGetters(['nativelyNumberSuffixedDefaults']),
|
...mapGetters(['nativelyNumberSuffixedDefaults']),
|
||||||
|
@ -374,7 +374,7 @@ export default mixins(
|
||||||
type?: string,
|
type?: string,
|
||||||
}) {
|
}) {
|
||||||
const allNodeNamesOnCanvas = this.$store.getters.allNodes.map((n: INodeUi) => n.name);
|
const allNodeNamesOnCanvas = this.$store.getters.allNodes.map((n: INodeUi) => n.name);
|
||||||
originalName = this.englishLocale ? originalName : this.translateName(type, originalName);
|
originalName = this.isEnglishLocale ? originalName : this.translateName(type, originalName);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!allNodeNamesOnCanvas.includes(originalName) &&
|
!allNodeNamesOnCanvas.includes(originalName) &&
|
||||||
|
@ -384,7 +384,7 @@ export default mixins(
|
||||||
}
|
}
|
||||||
|
|
||||||
let natives: string[] = this.nativelyNumberSuffixedDefaults;
|
let natives: string[] = this.nativelyNumberSuffixedDefaults;
|
||||||
natives = this.englishLocale ? natives : natives.map(name => {
|
natives = this.isEnglishLocale ? natives : natives.map(name => {
|
||||||
const type = name.toLowerCase().replace('_', '');
|
const type = name.toLowerCase().replace('_', '');
|
||||||
return this.translateName(type, name);
|
return this.translateName(type, name);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue