Browse Source

fix: i18n for Header and Params of webhook editor

pull/6519/head
Muhammed Mustafa 12 months ago
parent
commit
2551e359b9
  1. 6
      packages/nc-gui/components/api-client/Headers.vue
  2. 10
      packages/nc-gui/components/api-client/Params.vue
  3. 8
      packages/nc-gui/lang/en.json

6
packages/nc-gui/components/api-client/Headers.vue

@ -69,7 +69,7 @@ const filterOption = (input: string, option: Option) => option.value.toUpperCase
<div class="text-left font-normal ml-2">{{ $t('labels.headerName') }}</div> <div class="text-left font-normal ml-2">{{ $t('labels.headerName') }}</div>
</th> </th>
<th> <th>
<div class="text-left font-normal ml-2">{{ $t('labels.value') }}</div> <div class="text-left font-normal ml-2">{{ $t('placeholder.value') }}</div>
</th> </th>
<th class="w-8"></th> <th class="w-8"></th>
</tr> </tr>
@ -89,7 +89,7 @@ const filterOption = (input: string, option: Option) => option.value.toUpperCase
v-model:value="headerRow.name" v-model:value="headerRow.name"
class="nc-input-hook-header-key" class="nc-input-hook-header-key"
:options="headerList" :options="headerList"
:placeholder="$t('labels.key')" :placeholder="$t('placeholder.key')"
:filter-option="filterOption" :filter-option="filterOption"
/> />
</a-form-item> </a-form-item>
@ -99,7 +99,7 @@ const filterOption = (input: string, option: Option) => option.value.toUpperCase
<a-form-item class="form-item"> <a-form-item class="form-item">
<a-input <a-input
v-model:value="headerRow.value" v-model:value="headerRow.value"
:placeholder="$t('labels.value')" :placeholder="$t('placeholder.value')"
class="!rounded-md nc-input-hook-header-value" class="!rounded-md nc-input-hook-header-value"
/> />
</a-form-item> </a-form-item>

10
packages/nc-gui/components/api-client/Params.vue

@ -24,11 +24,11 @@ const deleteParamRow = (i: number) => {
<thead class="h-8"> <thead class="h-8">
<tr> <tr>
<th> <th>
<div class="text-left font-normal ml-2">Parameter Name</div> <div class="text-left font-normal ml-2">{{ $t('title.parameterName') }}</div>
</th> </th>
<th> <th>
<div class="text-left font-normal ml-2">Value</div> <div class="text-left font-normal ml-2">{{ $t('placeholder.value') }}</div>
</th> </th>
<th class="w-8"> <th class="w-8">
@ -41,13 +41,13 @@ const deleteParamRow = (i: number) => {
<tr v-for="(paramRow, idx) in vModel" :key="idx" class="!h-2 overflow-hidden"> <tr v-for="(paramRow, idx) in vModel" :key="idx" class="!h-2 overflow-hidden">
<td class="px-2"> <td class="px-2">
<a-form-item class="form-item"> <a-form-item class="form-item">
<a-input v-model:value="paramRow.name" placeholder="Key" class="!rounded-lg" /> <a-input v-model:value="paramRow.name" :placeholder="$t('placeholder.key')" class="!rounded-lg" />
</a-form-item> </a-form-item>
</td> </td>
<td class="px-2"> <td class="px-2">
<a-form-item class="form-item"> <a-form-item class="form-item">
<a-input v-model:value="paramRow.value" placeholder="Value" class="!rounded-lg" /> <a-input v-model:value="paramRow.value" :placeholder="$t('placeholder.value')" class="!rounded-lg" />
</a-form-item> </a-form-item>
</td> </td>
@ -69,7 +69,7 @@ const deleteParamRow = (i: number) => {
<td :colspan="12" class=""> <td :colspan="12" class="">
<NcButton size="small" type="secondary" @click="addParamRow"> <NcButton size="small" type="secondary" @click="addParamRow">
<div class="flex flex-row items-center gap-x-1"> <div class="flex flex-row items-center gap-x-1">
<div>Add Parameter</div> <div>{{ $t('activity.addParameter') }}</div>
<component :is="iconMap.plus" class="flex mx-auto" /> <component :is="iconMap.plus" class="flex mx-auto" />
</div> </div>
</NcButton> </NcButton>

8
packages/nc-gui/lang/en.json

@ -268,6 +268,7 @@
"isNotNull": "is not null" "isNotNull": "is not null"
}, },
"title": { "title": {
"parameterName": "Parameter Name",
"currencyLocale": "Currency Locale", "currencyLocale": "Currency Locale",
"currencyCode": "Currency Code", "currencyCode": "Currency Code",
"searchMembers": "Search Members", "searchMembers": "Search Members",
@ -368,12 +369,14 @@
} }
}, },
"labels": { "labels": {
"headerName": "Header Name",
"icon": "Icon", "icon": "Icon",
"max": "Max", "max": "Max",
"binaryEncodingFormat": "Binary encoding format", "binaryEncodingFormat": "Binary encoding format",
"syntax": "Syntax", "syntax": "Syntax",
"examples": "Examples", "examples": "Examples",
"durationInfo": "A duration of time in minutes or seconds (e.g. 1:23).", "durationInfo": "A duration of time in minutes or seconds (e.g. 1:23).",
"addHeader": "Add Header",
"enterDefaultUrlOptional": "Enter default URL (Optional)", "enterDefaultUrlOptional": "Enter default URL (Optional)",
"negative": "Negative", "negative": "Negative",
"default": "Default", "default": "Default",
@ -561,6 +564,7 @@
"addFiles": "Add File(s)", "addFiles": "Add File(s)",
"hideInUI": "Hide in UI", "hideInUI": "Hide in UI",
"addBase": "Add Base", "addBase": "Add Base",
"addParameter": "Add Parameter",
"editBase": "Edit Base", "editBase": "Edit Base",
"enterText": "Enter text", "enterText": "Enter text",
"okEditBase": "Ok & Edit Base", "okEditBase": "Ok & Edit Base",
@ -807,7 +811,9 @@
"decimal5": "1.00000", "decimal5": "1.00000",
"decimal6": "1.000000", "decimal6": "1.000000",
"decimal7": "1.0000000", "decimal7": "1.0000000",
"decimal8": "1.00000000" "decimal8": "1.00000000",
"value": "Value",
"key": "Key"
}, },
"msg": { "msg": {
"optimizedQueryDisabled": "Optimized query is disabled", "optimizedQueryDisabled": "Optimized query is disabled",

Loading…
Cancel
Save