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) {
|
||||
const forbidden = <string[]>json.omitDefaultDeleteReasons
|
||||
deleteReasons = deleteReasons.filter(
|
||||
(dl) => forbidden.indexOf(dl.changesetMessage) < 0
|
||||
(dl) => forbidden.indexOf(dl.changesetMessage) < 0,
|
||||
)
|
||||
}
|
||||
for (const defaultDeleteReason of deleteReasons) {
|
||||
this.deleteReasons.push({
|
||||
changesetMessage: defaultDeleteReason.changesetMessage,
|
||||
explanation:
|
||||
defaultDeleteReason.explanation.Clone(/*Must clone, hides translation otherwise*/),
|
||||
explanation: defaultDeleteReason.explanation,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +90,7 @@ export default class DeleteConfig {
|
|||
if (json.softDeletionTags !== undefined) {
|
||||
this.softDeletionTags = TagUtils.Tag(
|
||||
json.softDeletionTags,
|
||||
`${context}.softDeletionTags`
|
||||
`${context}.softDeletionTags`,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
import ToSvelte from "../Base/ToSvelte.svelte"
|
||||
import * as native from "../../assets/language_native.json"
|
||||
import { TypedTranslation } from "../i18n/Translation"
|
||||
import Tr from "../Base/Tr.svelte"
|
||||
|
||||
const availableTranslationTyped: TypedTranslation<{ native: string }> =
|
||||
Translations.t.communityIndex.available
|
||||
|
@ -46,7 +47,7 @@
|
|||
{resource.resolved?.description}
|
||||
{#if resource.languageCodes?.indexOf($language) >= 0}
|
||||
<div class="thanks w-fit">
|
||||
<ToSvelte construct={() => availableTranslation.Clone()} />
|
||||
<Tr t={availableTranslation}/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{: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()}>
|
||||
<Scissors class="h-6 w-6" />
|
||||
<Tr t={t.splitAgain} />
|
||||
|
|
Loading…
Reference in a new issue