Skip to content

Commit d1ce454

Browse files
committed
Merge pull request #113527 from LanzaSchneider/fix-compilation-with-deprecated-disabled
Fix sprite_frames_editor_plugin compilation with deprecated=no
2 parents 8ad45da + e46936c commit d1ce454

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

editor/scene/sprite_frames_editor_plugin.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#include "core/io/resource_loader.h"
3434
#include "core/os/keyboard.h"
35+
#include "core/string/translation_server.h"
3536
#include "editor/docks/filesystem_dock.h"
3637
#include "editor/docks/scene_tree_dock.h"
3738
#include "editor/editor_node.h"
@@ -316,13 +317,15 @@ void SpriteFramesEditor::_sheet_update_zoom_label() {
316317
// (like in most image editors). Its lower bound is clamped to 1 as some people
317318
// lower the editor scale to increase the available real estate,
318319
// even if their display doesn't have a particularly low DPI.
320+
TranslationServer *translation_server = TranslationServer::get_singleton();
321+
String locale = translation_server->get_tool_locale();
319322
if (sheet_zoom >= 10) {
320-
zoom_text = TS->format_number(rtos(Math::round((sheet_zoom / MAX(1, EDSCALE)) * 100)));
323+
zoom_text = translation_server->format_number(rtos(Math::round((sheet_zoom / MAX(1, EDSCALE)) * 100)), locale);
321324
} else {
322325
// 2 decimal places if the zoom is below 10%, 1 decimal place if it's below 1000%.
323-
zoom_text = TS->format_number(rtos(Math::snapped((sheet_zoom / MAX(1, EDSCALE)) * 100, (sheet_zoom >= 0.1) ? 0.1 : 0.01)));
326+
zoom_text = translation_server->format_number(rtos(Math::snapped((sheet_zoom / MAX(1, EDSCALE)) * 100, (sheet_zoom >= 0.1) ? 0.1 : 0.01)), locale);
324327
}
325-
zoom_text += " " + TS->percent_sign();
328+
zoom_text += " " + translation_server->get_percent_sign(locale);
326329
split_sheet_zoom_reset->set_text(zoom_text);
327330
}
328331

0 commit comments

Comments
 (0)