diff --git a/src/monstergenerator.cpp b/src/monstergenerator.cpp index 76d7efb32e10f..7fc39dfbb71ab 100644 --- a/src/monstergenerator.cpp +++ b/src/monstergenerator.cpp @@ -888,8 +888,7 @@ void MonsterGenerator::load_species( const JsonObject &jo, const std::string &sr void species_type::load( const JsonObject &jo, const std::string & ) { optional( jo, was_loaded, "description", description ); - optional( jo, was_loaded, "footsteps", footsteps, "footsteps." ); - footsteps = _( footsteps ); + optional( jo, was_loaded, "footsteps", footsteps, to_translation( "footsteps." ) ); const auto flag_reader = enum_flags_reader { "monster flag" }; optional( jo, was_loaded, "flags", flags, flag_reader ); diff --git a/src/monstergenerator.h b/src/monstergenerator.h index ac00ab8bd5866..c946be24f1af2 100644 --- a/src/monstergenerator.h +++ b/src/monstergenerator.h @@ -28,13 +28,13 @@ struct species_type { species_id id; bool was_loaded = false; translation description; - std::string footsteps; + translation footsteps; enum_bitset flags; enum_bitset anger; enum_bitset fear; enum_bitset placate; std::string get_footsteps() const { - return footsteps; + return footsteps.translated(); } species_type(): id( species_id::NULL_ID() ) { diff --git a/src/mtype.cpp b/src/mtype.cpp index b606a67b57fdf..a312e5e2d2a19 100644 --- a/src/mtype.cpp +++ b/src/mtype.cpp @@ -234,5 +234,5 @@ std::string mtype::get_footsteps() const for( const species_id &s : species ) { return s.obj().get_footsteps(); } - return "footsteps."; + return _( "footsteps." ); }