From 43e323dce549d3cda34a992500baa8c00a588abf Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 15 Nov 2025 10:06:42 +0800 Subject: [PATCH] Remove `TranslationPO` --- core/io/translation_loader_po.cpp | 2 +- core/string/translation_po.cpp | 34 ---------------------------- core/string/translation_po.h | 37 ------------------------------- 3 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 core/string/translation_po.cpp delete mode 100644 core/string/translation_po.h diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp index 8b970ba7e3e..a5d94b7c281 100644 --- a/core/io/translation_loader_po.cpp +++ b/core/io/translation_loader_po.cpp @@ -364,7 +364,7 @@ void TranslationLoaderPO::get_recognized_extensions(List *p_extensions) } bool TranslationLoaderPO::handles_type(const String &p_type) const { - return (p_type == "Translation") || (p_type == "TranslationPO"); + return p_type == "Translation"; } String TranslationLoaderPO::get_resource_type(const String &p_path) const { diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp deleted file mode 100644 index 6c4a84f4b4c..00000000000 --- a/core/string/translation_po.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************/ -/* translation_po.cpp */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -#include "translation_po.h" - -// This file is intentionally left empty. -// It makes sure that `TranslationPO` exists, for compatibility. diff --git a/core/string/translation_po.h b/core/string/translation_po.h deleted file mode 100644 index 7548e227314..00000000000 --- a/core/string/translation_po.h +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************/ -/* translation_po.h */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -#pragma once - -#include "core/string/translation.h" - -class TranslationPO : public Translation { - GDCLASS(TranslationPO, Translation); -};