From 33d9b40386f11c18d14a72bfbf76cb50bd386ade Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sun, 6 Oct 2024 11:38:05 +0800 Subject: [PATCH] Fix "No loader found" error after editing PO file PO files used to be loaded as simple `Translation` resources. We later added a dedicated `TranslationPO` resource for it. But the loader still thinks it can only handle `Translation` resources, so it refuses to load the updated `TranslationPO` resource. --- core/io/translation_loader_po.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp index 578cd91c522..812fbc774e9 100644 --- a/core/io/translation_loader_po.cpp +++ b/core/io/translation_loader_po.cpp @@ -31,7 +31,6 @@ #include "translation_loader_po.h" #include "core/io/file_access.h" -#include "core/string/translation.h" #include "core/string/translation_po.h" Ref TranslationLoaderPO::load_translation(Ref f, Error *r_error) { @@ -361,7 +360,7 @@ void TranslationLoaderPO::get_recognized_extensions(List *p_extensions) } bool TranslationLoaderPO::handles_type(const String &p_type) const { - return (p_type == "Translation"); + return (p_type == "Translation") || (p_type == "TranslationPO"); } String TranslationLoaderPO::get_resource_type(const String &p_path) const {