aboutsummaryrefslogtreecommitdiff
path: root/extension/src
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-30 18:49:43 +0100
committer hop311 <hop3114@gmail.com>2024-01-31 00:05:17 +0100
commit3ab346c80dff3fe3f00556a1b253325b8d39a009 (patch)
tree90f772bc6f3fea8c86a82452ff3914831c0a0349 /extension/src
parent069f07a16daf04982677182caf39498e1539f3f0 (diff)
Update openvic-simulation to OpenVicProject/OpenVic-Simulation@068c13e
Update scripts to OpenVicProject/scripts@21d1427
Diffstat (limited to 'extension/src')
-rw-r--r--extension/src/openvic-extension/utility/Utilities.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/extension/src/openvic-extension/utility/Utilities.cpp b/extension/src/openvic-extension/utility/Utilities.cpp
index 4cf515f..a3fa40a 100644
--- a/extension/src/openvic-extension/utility/Utilities.cpp
+++ b/extension/src/openvic-extension/utility/Utilities.cpp
@@ -46,13 +46,13 @@ String Utilities::float_to_formatted_string(float val) {
/* Date formatted like this: "January 1, 1836" (with the month localised, if possible). */
String Utilities::date_to_formatted_string(Date date) {
- std::string const& month_name = date.get_month_name();
+ const String month_name = std_view_to_godot_string_name(date.get_month_name());
const String day_and_year = " " + String::num_int64(date.get_day()) + ", " + String::num_int64(date.get_year());
TranslationServer const* server = TranslationServer::get_singleton();
if (server != nullptr) {
- return server->translate(std_to_godot_string_name(month_name)) + day_and_year;
+ return server->translate(month_name) + day_and_year;
} else {
- return std_to_godot_string(month_name) + day_and_year;
+ return month_name + day_and_year;
}
}