chore: use i18n 'duplicate' instead of 'copy'
This commit is contained in:
@@ -291,7 +291,7 @@ export default defineComponent({
|
|||||||
duplicateRequest({ folderPath, request }) {
|
duplicateRequest({ folderPath, request }) {
|
||||||
saveGraphqlRequestAs(folderPath, {
|
saveGraphqlRequestAs(folderPath, {
|
||||||
...request,
|
...request,
|
||||||
name: request.name + " - Copy",
|
name: `${request.name} - ${this.$t("action.duplicate")}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ export default defineComponent({
|
|||||||
duplicateRequest({ folderPath, request }) {
|
duplicateRequest({ folderPath, request }) {
|
||||||
saveRESTRequestAs(folderPath, {
|
saveRESTRequestAs(folderPath, {
|
||||||
...request,
|
...request,
|
||||||
name: request.name + " - Copy",
|
name: `${request.name} - ${this.$t("action.duplicate")}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
duplicateEnvironment() {
|
duplicateEnvironment() {
|
||||||
if (this.environmentIndex === "Global") {
|
if (this.environmentIndex === "Global") {
|
||||||
createEnvironment("Global-Copy")
|
createEnvironment(`Global - ${this.$t("action.duplicate")}`)
|
||||||
setEnvironmentVariables(
|
setEnvironmentVariables(
|
||||||
environmentsStore.value.environments.length - 1,
|
environmentsStore.value.environments.length - 1,
|
||||||
getGlobalVariables().reduce((gVars, gVar) => {
|
getGlobalVariables().reduce((gVars, gVar) => {
|
||||||
|
|||||||
@@ -87,14 +87,12 @@ const dispatchers = defineDispatchers({
|
|||||||
environments,
|
environments,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const index =
|
|
||||||
environments.filter((env) => env.name === newEnvironment.name).length + 1
|
|
||||||
return {
|
return {
|
||||||
environments: [
|
environments: [
|
||||||
...environments,
|
...environments,
|
||||||
{
|
{
|
||||||
...cloneDeep(newEnvironment),
|
...cloneDeep(newEnvironment),
|
||||||
name: `${newEnvironment.name} ${index}`,
|
name: `${newEnvironment.name} - Duplicate`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user