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