Refactoring: remove some obsoleted calls to "Clone()"
This commit is contained in:
parent
594709ea95
commit
8690ad35bb
3 changed files with 6 additions and 6 deletions
|
@ -58,14 +58,13 @@ export default class DeleteConfig {
|
||||||
} else if (json.omitDefaultDeleteReasons) {
|
} else if (json.omitDefaultDeleteReasons) {
|
||||||
const forbidden = <string[]>json.omitDefaultDeleteReasons
|
const forbidden = <string[]>json.omitDefaultDeleteReasons
|
||||||
deleteReasons = deleteReasons.filter(
|
deleteReasons = deleteReasons.filter(
|
||||||
(dl) => forbidden.indexOf(dl.changesetMessage) < 0
|
(dl) => forbidden.indexOf(dl.changesetMessage) < 0,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
for (const defaultDeleteReason of deleteReasons) {
|
for (const defaultDeleteReason of deleteReasons) {
|
||||||
this.deleteReasons.push({
|
this.deleteReasons.push({
|
||||||
changesetMessage: defaultDeleteReason.changesetMessage,
|
changesetMessage: defaultDeleteReason.changesetMessage,
|
||||||
explanation:
|
explanation: defaultDeleteReason.explanation,
|
||||||
defaultDeleteReason.explanation.Clone(/*Must clone, hides translation otherwise*/),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +90,7 @@ export default class DeleteConfig {
|
||||||
if (json.softDeletionTags !== undefined) {
|
if (json.softDeletionTags !== undefined) {
|
||||||
this.softDeletionTags = TagUtils.Tag(
|
this.softDeletionTags = TagUtils.Tag(
|
||||||
json.softDeletionTags,
|
json.softDeletionTags,
|
||||||
`${context}.softDeletionTags`
|
`${context}.softDeletionTags`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
import ToSvelte from "../Base/ToSvelte.svelte"
|
import ToSvelte from "../Base/ToSvelte.svelte"
|
||||||
import * as native from "../../assets/language_native.json"
|
import * as native from "../../assets/language_native.json"
|
||||||
import { TypedTranslation } from "../i18n/Translation"
|
import { TypedTranslation } from "../i18n/Translation"
|
||||||
|
import Tr from "../Base/Tr.svelte"
|
||||||
|
|
||||||
const availableTranslationTyped: TypedTranslation<{ native: string }> =
|
const availableTranslationTyped: TypedTranslation<{ native: string }> =
|
||||||
Translations.t.communityIndex.available
|
Translations.t.communityIndex.available
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
{resource.resolved?.description}
|
{resource.resolved?.description}
|
||||||
{#if resource.languageCodes?.indexOf($language) >= 0}
|
{#if resource.languageCodes?.indexOf($language) >= 0}
|
||||||
<div class="thanks w-fit">
|
<div class="thanks w-fit">
|
||||||
<ToSvelte construct={() => availableTranslation.Clone()} />
|
<Tr t={availableTranslation}/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else if step === "has_been_split"}
|
{:else if step === "has_been_split"}
|
||||||
<Tr cls="thanks" t={t.hasBeenSplit.Clone().SetClass("font-bold thanks block w-full")} />
|
<Tr cls="thanks " t={t.hasBeenSplit} />
|
||||||
<button on:click={() => downloadWay()}>
|
<button on:click={() => downloadWay()}>
|
||||||
<Scissors class="h-6 w-6" />
|
<Scissors class="h-6 w-6" />
|
||||||
<Tr t={t.splitAgain} />
|
<Tr t={t.splitAgain} />
|
||||||
|
|
Loading…
Reference in a new issue