X Tutup
Skip to content

Fix sprite_frames_editor_plugin compilation with deprecated=no#113527

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
LanzaSchneider:fix-compilation-with-deprecated-disabled
Dec 3, 2025
Merged

Fix sprite_frames_editor_plugin compilation with deprecated=no#113527
Repiteo merged 1 commit intogodotengine:masterfrom
LanzaSchneider:fix-compilation-with-deprecated-disabled

Conversation

@LanzaSchneider
Copy link
Contributor

@LanzaSchneider LanzaSchneider commented Dec 3, 2025

Fixes compilation error in sprite_frames_editor_plugin.cpp when building with deprecated=no.

Issue

When compiling Godot with deprecated=no, the following deprecated methods are disabled:

  • format_number()
  • parse_number()
  • percent_sign()

This caused compilation errors in sprite_frames_editor_plugin.cpp which was still using these deprecated APIs.
屏幕截图_20251204_034809

Solution

Updated sprite_frames_editor_plugin.cpp to use the new non-deprecated localization APIs:

  • Replaced TS->format_number() with new equivalent
  • Replaced TS->percent_sign() with new equivalent

@LanzaSchneider LanzaSchneider requested a review from a team December 3, 2025 20:01
@KoBeWi KoBeWi added this to the 4.x milestone Dec 3, 2025
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a regression from #111471, I should have caught that. Thanks for quick spotting and fixing!

The code looks equivalent.

#ifndef DISABLE_DEPRECATED
String TextServer::format_number(const String &p_string, const String &p_language) const {
const StringName lang = p_language.is_empty() ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
return TranslationServer::get_singleton()->format_number(p_string, lang);
}
String TextServer::parse_number(const String &p_string, const String &p_language) const {
const StringName lang = p_language.is_empty() ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
return TranslationServer::get_singleton()->parse_number(p_string, lang);
}
String TextServer::percent_sign(const String &p_language) const {
const StringName lang = p_language.is_empty() ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
return TranslationServer::get_singleton()->get_percent_sign(lang);
}
#endif // DISABLE_DEPRECATED

@kleonc kleonc modified the milestones: 4.x, 4.6 Dec 3, 2025
@Repiteo Repiteo merged commit d1ce454 into godotengine:master Dec 3, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 3, 2025

Thanks!

@LanzaSchneider LanzaSchneider deleted the fix-compilation-with-deprecated-disabled branch December 4, 2025 00:16
@akien-mga akien-mga changed the title Fix sprite_frames_editor_plugin compilation with deprecated=no Fix sprite_frames_editor_plugin compilation with deprecated=no Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup