User: joe Date: 02 Dec 26 09:33 Revision: 96560e547c3d8832617cb920b376e2b08131cd5d Summary: Merge branch '2026.2' into 2026.3 TeamCity URL: http://ci.mcdev.io:80/viewModification.html?tab=vcsModificationFiles&modId=10832&personal=false Index: src/main/kotlin/asset/MCDevBundle.kt =================================================================== --- src/main/kotlin/asset/MCDevBundle.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/asset/MCDevBundle.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -47,5 +47,5 @@ fun pointer(@PropertyKey(resourceBundle = BUNDLE) key: String) = Supplier { invoke(key) } fun pointer(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any?) = - Supplier { invoke(key, params) } + Supplier { invoke(key, *params) } } Index: src/main/kotlin/creator/custom/CreatorTemplateProcessor.kt =================================================================== --- src/main/kotlin/creator/custom/CreatorTemplateProcessor.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/creator/custom/CreatorTemplateProcessor.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -57,8 +57,6 @@ import java.util.function.Consumer import kotlin.io.path.createDirectories import kotlin.io.path.writeText -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.launch interface ExternalTemplatePropertyProvider { @@ -73,7 +71,7 @@ class CreatorTemplateProcessor( propertyGraph: PropertyGraph, wizardContext: WizardContext, - scope: CoroutineScope, + session: CreatorSession, private val externalPropertyProvider: ExternalTemplatePropertyProvider, ) { @@ -81,7 +79,7 @@ private set private var properties: MutableMap> = mutableMapOf() - var context: CreatorContext = CreatorContext(propertyGraph, properties, wizardContext, scope) + var context: CreatorContext = CreatorContext(propertyGraph, properties, wizardContext, session) fun initBuiltinProperties() { val projectNameProperty = externalPropertyProvider.projectNameProperty @@ -256,7 +254,7 @@ if (context.wizardContext.isCreatingNewProject) { TemplateService.instance.registerFinalizerAction(project, finalizeAction) } else { - context.scope.launch { finalizeAction() } + TemplateService.instance.launchFinalizer(project, context.scope, finalizeAction) } } Index: src/main/kotlin/creator/custom/providers/BuiltinTemplateProvider.kt =================================================================== --- src/main/kotlin/creator/custom/providers/BuiltinTemplateProvider.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/creator/custom/providers/BuiltinTemplateProvider.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -57,6 +57,11 @@ } } + override fun clearCache() { + super.clearCache() + repoUpdated = false + } + override suspend fun loadTemplates( context: WizardContext, repo: MinecraftSettings.TemplateRepo Index: src/main/kotlin/creator/custom/providers/RemoteTemplateProvider.kt =================================================================== --- src/main/kotlin/creator/custom/providers/RemoteTemplateProvider.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/creator/custom/providers/RemoteTemplateProvider.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -67,7 +67,7 @@ open class RemoteTemplateProvider : TemplateProvider { - private var updatedTemplates = mutableSetOf() + private val updatedTemplates = mutableSetOf() override val label: String = MCDevBundle("template.provider.remote.label") @@ -88,6 +88,13 @@ } } + /** + * Makes the next [init] update every repo again. + */ + internal open fun clearCache() { + updatedTemplates.clear() + } + protected suspend fun doUpdateRepo( indicator: ProgressIndicator, repoName: String, @@ -95,7 +102,7 @@ authType: RemoteAuthType, credentials: String ): Boolean { - indicator.text2 = "Updating remote repository $repoName" + indicator.text2 = MCDevBundle("creator.ui.custom.remote.updating", repoName) val repoUrl = replaceVariables(originalRepoUrl, TemplateDescriptor.LATEST_FORMAT_VERSION) @@ -281,7 +288,7 @@ .align(AlignX.FILL) .columns(COLUMNS_LARGE) .bindText(basicAuthUsernameProperty) - .addValidationRule("Must not be blank") { field -> + .addValidationRule(MCDevBundle("creator.validation.blank")) { field -> authTypeProperty.get() == RemoteAuthType.BASIC && field.text.isBlank() } }.visibleIf(authTypeProperty.equalsTo(RemoteAuthType.BASIC)) @@ -298,7 +305,7 @@ .align(AlignX.FILL) .columns(COLUMNS_LARGE) .bindText(bearerTokenProperty) - .addValidationRule("Must not be blank") { field -> + .addValidationRule(MCDevBundle("creator.validation.blank")) { field -> authTypeProperty.get() == RemoteAuthType.BEARER && field.password.all { it.isWhitespace() } } }.visibleIf(authTypeProperty.equalsTo(RemoteAuthType.BEARER)) @@ -309,7 +316,7 @@ .bindItem(gitAuthProviderProperty) .validationOnApply { box -> if (authTypeProperty.get() == RemoteAuthType.GIT_HTTP && box.item == null) { - error("A provider must be selected") + error(MCDevBundle("creator.ui.custom.remote.git_http_provider.required")) } else null } }.visibleIf(authTypeProperty.equalsTo(RemoteAuthType.GIT_HTTP)) @@ -320,7 +327,7 @@ .bindItem(gitAuthAccountProperty) .validationOnApply { box -> if (authTypeProperty.get() == RemoteAuthType.GIT_HTTP && box.item == null) { - error("An account must be selected") + error(MCDevBundle("creator.ui.custom.remote.git_http_account.required")) } else null } }.visibleIf(authTypeProperty.equalsTo(RemoteAuthType.GIT_HTTP)) @@ -330,7 +337,7 @@ .align(AlignX.FILL) .columns(COLUMNS_LARGE) .bindText(headerNameProperty) - .addValidationRule("Must not be blank") { field -> + .addValidationRule(MCDevBundle("creator.validation.blank")) { field -> authTypeProperty.get() == RemoteAuthType.HEADER && field.text.all { it.isWhitespace() } } }.visibleIf(authTypeProperty.equalsTo(RemoteAuthType.HEADER)) Index: src/main/kotlin/errorreporter/ErrorReporter.kt =================================================================== --- src/main/kotlin/errorreporter/ErrorReporter.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/errorreporter/ErrorReporter.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -3,7 +3,7 @@ * * https://mcdev.io/ * - * Copyright (C) 2025 minecraft-dev + * Copyright (C) 2026 minecraft-dev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -117,7 +117,7 @@ sentryEvent.setExtra("last_action", IdeaLogger.ourLastActionId) - val task = object : Task.Backgroundable(project, "Submitting error report", true) { + val task = object : Task.Backgroundable(project, MCDevBundle("error_reporter.submit.progress"), true) { override fun run(indicator: ProgressIndicator) { val opts = SentryOptions().apply { dsn = "https://e4e537f6f896904a3ec0586bce8c9a57@sentry.mcdev.io/1" } // Marked internal, but I have no idea what the intended way to do this, everything I can find online @@ -145,7 +145,11 @@ NotificationType.INFORMATION, ).setImportant(false).notify(project) - val reportInfo = SubmittedReportInfo(null, "Event $id", SubmittedReportInfo.SubmissionStatus.NEW_ISSUE) + val reportInfo = SubmittedReportInfo( + null, + MCDevBundle("error_reporter.report.link", id.toString()), + SubmittedReportInfo.SubmissionStatus.NEW_ISSUE, + ) consumer.consume(reportInfo) } } Index: src/main/kotlin/platform/minecraft/fabricloom/FabricLoomDecompileSourceProvider.kt =================================================================== --- src/main/kotlin/platform/minecraft/fabricloom/FabricLoomDecompileSourceProvider.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/platform/minecraft/fabricloom/FabricLoomDecompileSourceProvider.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -20,6 +20,7 @@ package com.demonwav.mcdev.platform.minecraft.fabricloom +import com.demonwav.mcdev.asset.MCDevBundle import com.demonwav.mcdev.platform.forge.inspections.sideonly.Side import com.demonwav.mcdev.platform.forge.inspections.sideonly.SideOnlyUtil import com.demonwav.mcdev.util.findModule @@ -89,9 +90,9 @@ private class DecompileAction(val decompiler: FabricLoomData.Decompiler) : AttachSourcesProvider.AttachSourcesAction { - override fun getName(): String = "Decompile with ${decompiler.name}" + override fun getName(): String = MCDevBundle("minecraft.decompile.with", decompiler.name) @Suppress("DialogTitleCapitalization") // Minecraft is a proper noun - override fun getBusyText(): String = "Decompiling Minecraft..." + override fun getBusyText(): String = MCDevBundle("minecraft.decompile.busy") @Deprecated("Deprecated in AttachSourcesAction") override fun perform(orderEntriesContainingFile: List): ActionCallback { Index: src/main/kotlin/platform/minecraft/fabricloom/TinyUnscrambler.kt =================================================================== --- src/main/kotlin/platform/minecraft/fabricloom/TinyUnscrambler.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/platform/minecraft/fabricloom/TinyUnscrambler.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -20,6 +20,7 @@ package com.demonwav.mcdev.platform.minecraft.fabricloom +import com.demonwav.mcdev.asset.MCDevBundle import com.demonwav.mcdev.facet.MinecraftFacet import com.demonwav.mcdev.platform.fabric.FabricModuleType import com.intellij.openapi.module.ModuleManager @@ -45,7 +46,7 @@ private val symbolPattern = Regex("(([\\w$]+\\.)*(class_\\d+\\$?)+)|((?:field|method)_\\d+)") - override fun getPresentableName() = "Remap Tiny names" + override fun getPresentableName() = MCDevBundle("minecraft.unscrambler.tiny") class SettingsComponent(val mappings: Map) : JPanel(GridLayoutManager(1, 2)) { @@ -55,7 +56,7 @@ init { mappingsBox.renderer = textListCellRenderer { "[$it] ${mappings[it]}" } add( - JBLabel("Mappings: "), + JBLabel(MCDevBundle("minecraft.unscrambler.mappings")), GridConstraints( 0, 0, Index: src/main/kotlin/platform/mixin/expression/gui/MEFlowWindowService.kt =================================================================== --- src/main/kotlin/platform/mixin/expression/gui/MEFlowWindowService.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/platform/mixin/expression/gui/MEFlowWindowService.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -3,7 +3,7 @@ * * https://mcdev.io/ * - * Copyright (C) 2025 minecraft-dev + * Copyright (C) 2026 minecraft-dev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -20,6 +20,7 @@ package com.demonwav.mcdev.platform.mixin.expression.gui +import com.demonwav.mcdev.asset.MCDevBundle import com.demonwav.mcdev.platform.mixin.util.shortName import com.intellij.openapi.application.EDT import com.intellij.openapi.components.Service @@ -67,7 +68,9 @@ } val content = chooseContent(toolWindow, clazz, method) ?: return Messages.showErrorDialog( - project, "Failed to create flow diagram", "Error" + project, MCDevBundle( + "mixin.flow_diagram.create_failed", + ), MCDevBundle("mixin.flow_diagram.create_failed.title") ) toolWindow.contentManager.setSelectedContent(content) toolWindow.activate { @@ -86,7 +89,7 @@ } private suspend fun createContent(clazz: ClassNode, method: MethodNode): Content? = - withBackgroundProgress(project, "Creating Flow Diagram") compute@{ + withBackgroundProgress(project, MCDevBundle("mixin.flow_diagram.creating")) compute@{ val diagram = withContext(Dispatchers.Default) { FlowDiagram.create(project, scope, clazz, method) } ?: return@compute null Index: src/main/kotlin/update/PluginUpdater.kt =================================================================== --- src/main/kotlin/update/PluginUpdater.kt (revision 2fb0e13166664fb22ad7a2951e718be185100cdb) +++ src/main/kotlin/update/PluginUpdater.kt (revision 96560e547c3d8832617cb920b376e2b08131cd5d) @@ -20,6 +20,7 @@ package com.demonwav.mcdev.update +import com.demonwav.mcdev.asset.MCDevBundle import com.demonwav.mcdev.util.McdevHttp import com.demonwav.mcdev.util.McdevReflection import com.demonwav.mcdev.util.forEachNotNull @@ -60,7 +61,7 @@ val finalUpdate = updateStatus ApplicationManager.getApplication().invokeLater({ callback(finalUpdate) }, ModalityState.any()) } catch (_: Exception) { - PluginUpdateStatus.CheckFailed("Minecraft Development plugin update check failed") + PluginUpdateStatus.CheckFailed(MCDevBundle("update.check_failed.generic")) } } @@ -80,17 +81,17 @@ } null - } ?: return PluginUpdateStatus.CheckFailed("Unexpected plugin repository response") + } ?: return PluginUpdateStatus.CheckFailed(MCDevBundle("update.check_failed.unexpected_response")) if (responseDoc.name != "plugin-repository") { - return PluginUpdateStatus.CheckFailed("Unexpected plugin repository response") + return PluginUpdateStatus.CheckFailed(MCDevBundle("update.check_failed.unexpected_response")) } if (responseDoc.children.isEmpty()) { return PluginUpdateStatus.LatestVersionInstalled } val newVersion = responseDoc.getChild("category")?.getChild("idea-plugin")?.getChild("version")?.text - ?: return PluginUpdateStatus.CheckFailed("Couldn't find plugin version in repository response") + ?: return PluginUpdateStatus.CheckFailed(MCDevBundle("update.check_failed.no_version")) val plugin = PluginManagerCore.getPlugin(PluginUtil.PLUGIN_ID)!! val pluginNode = PluginNode(PluginUtil.PLUGIN_ID) @@ -111,7 +112,7 @@ RepositoryHelper.loadPluginModels(host, null, null) .map { it.getDescriptor() } } catch (_: IOException) { - return PluginUpdateStatus.CheckFailed("Checking custom plugin repository $host failed") + return PluginUpdateStatus.CheckFailed(MCDevBundle("update.check_failed.custom_repo", host)) } val minecraftPlugin = plugins.firstOrNull { plugin -> plugin.pluginId == PluginUtil.PLUGIN_ID } @@ -131,7 +132,7 @@ val plugin = update.pluginDescriptor val downloader = PluginDownloader.createDownloader(plugin, update.hostToInstallFrom, null) ProgressManager.getInstance().run( - object : Task.Backgroundable(null, "Downloading plugin", true) { + object : Task.Backgroundable(null, MCDevBundle("update.downloading"), true) { override fun run(indicator: ProgressIndicator) { try { val status = downloader.prepareToInstall(indicator)