Minor i18n fixes (#2585)

*  Make subcategory render keys consistent

*  Add missing or key

*  Fix default text for multiple value button

*  Simplify subcategory extraction
This commit is contained in:
Iván Ovejero 2021-12-23 12:21:27 +01:00 committed by GitHub
parent cbe2fc2210
commit 0ce26d48e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 12 deletions

View file

@ -65,8 +65,8 @@ export default mixins(genericHelpers)
computed: { computed: {
addButtonText (): string { addButtonText (): string {
if ( if (
!this.parameter.typeOptions && !this.parameter.typeOptions ||
!this.parameter.typeOptions.multipleValueButtonText (this.parameter.typeOptions && !this.parameter.typeOptions.multipleValueButtonText)
) { ) {
return this.$locale.baseText('multipleParameter.addItem'); return this.$locale.baseText('multipleParameter.addItem');
} }

View file

@ -9,7 +9,7 @@
</div> </div>
<div class="action"> <div class="action">
{{ $locale.baseText('nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe') }} {{ $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') }} <a @click="selectWebhook">{{ $locale.baseText('nodeCreator.noResults.webhook') }}</a> {{ $locale.baseText('nodeCreator.noResults.node') }}
</div> </div>
</div> </div>

View file

@ -5,7 +5,7 @@
{{ $locale.baseText(`nodeCreator.subcategoryNames.${subcategoryName}`) }} {{ $locale.baseText(`nodeCreator.subcategoryNames.${subcategoryName}`) }}
</div> </div>
<div v-if="item.properties.description" :class="$style.description"> <div v-if="item.properties.description" :class="$style.description">
{{ $locale.baseText(`nodeCreator.subcategoryDescriptions.${subcategoryDescription}`) }} {{ $locale.baseText(`nodeCreator.subcategoryDescriptions.${subcategoryName}`) }}
</div> </div>
</div> </div>
<div :class="$style.action"> <div :class="$style.action">
@ -24,10 +24,6 @@ export default Vue.extend({
subcategoryName() { subcategoryName() {
return camelcase(this.item.properties.subcategory); return camelcase(this.item.properties.subcategory);
}, },
subcategoryDescription() {
const firstWord = this.item.properties.description.split(' ').shift() || '';
return firstWord.toLowerCase().replace(/,/g, '');
},
}, },
}); });
</script> </script>

View file

@ -413,6 +413,7 @@
"dontWorryYouCanProbablyDoItWithThe": "Dont worry, you can probably do it with the", "dontWorryYouCanProbablyDoItWithThe": "Dont worry, you can probably do it with the",
"httpRequest": "HTTP Request", "httpRequest": "HTTP Request",
"node": "node", "node": "node",
"or": "or",
"requestTheNode": "Request the node", "requestTheNode": "Request the node",
"wantUsToMakeItFaster": "Want us to make it faster?", "wantUsToMakeItFaster": "Want us to make it faster?",
"weDidntMakeThatYet": "We didn't make that... yet", "weDidntMakeThatYet": "We didn't make that... yet",
@ -422,10 +423,10 @@
"searchNodes": "Search nodes..." "searchNodes": "Search nodes..."
}, },
"subcategoryDescriptions": { "subcategoryDescriptions": {
"branches": "Branches, core triggers, merge data", "dataTransformation": "Manipulate data fields, run code",
"http": "HTTP Requests (API calls), date and time, scrape HTML", "files": "Work with CSV, XML, text, images etc.",
"manipulate": "Manipulate data fields, run code", "flow": "Branches, core triggers, merge data",
"work": "Work with CSV, XML, text, images etc." "helpers": "HTTP Requests (API calls), date and time, scrape HTML"
}, },
"subcategoryNames": { "subcategoryNames": {
"dataTransformation": "Data Transformation", "dataTransformation": "Data Transformation",