|
32 | 32 |
|
33 | 33 | #include "core/io/resource_loader.h" |
34 | 34 | #include "core/os/keyboard.h" |
| 35 | +#include "core/string/translation_server.h" |
35 | 36 | #include "editor/docks/filesystem_dock.h" |
36 | 37 | #include "editor/docks/scene_tree_dock.h" |
37 | 38 | #include "editor/editor_node.h" |
@@ -316,13 +317,15 @@ void SpriteFramesEditor::_sheet_update_zoom_label() { |
316 | 317 | // (like in most image editors). Its lower bound is clamped to 1 as some people |
317 | 318 | // lower the editor scale to increase the available real estate, |
318 | 319 | // 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(); |
319 | 322 | 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); |
321 | 324 | } else { |
322 | 325 | // 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); |
324 | 327 | } |
325 | | - zoom_text += " " + TS->percent_sign(); |
| 328 | + zoom_text += " " + translation_server->get_percent_sign(locale); |
326 | 329 | split_sheet_zoom_reset->set_text(zoom_text); |
327 | 330 | } |
328 | 331 |
|
|
0 commit comments