mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
launcher changes
This commit is contained in:
@@ -15,6 +15,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "translation.h"
|
||||
#include "Logs.h"
|
||||
#include "Globals.h"
|
||||
#include "MOVER.h"
|
||||
|
||||
void locale::init()
|
||||
{
|
||||
@@ -285,4 +286,29 @@ std::string locale::label_cab_control(std::string const &Label)
|
||||
"" );
|
||||
}
|
||||
|
||||
const std::string& locale::coupling_name(int c)
|
||||
{
|
||||
static std::unordered_map<coupling, std::string> coupling_names =
|
||||
{
|
||||
{ coupling::faux, STRN("faux") },
|
||||
{ coupling::coupler, STRN("coupler") },
|
||||
{ coupling::brakehose, STRN("brake hose") },
|
||||
{ coupling::control, STRN("control") },
|
||||
{ coupling::highvoltage, STRN("high voltage") },
|
||||
{ coupling::gangway, STRN("gangway") },
|
||||
{ coupling::mainhose, STRN("main hose") },
|
||||
{ coupling::heating, STRN("heating") },
|
||||
{ coupling::permanent, STRN("permanent") },
|
||||
{ coupling::uic, STRN("uic") }
|
||||
};
|
||||
|
||||
static std::string unknown(STRN("unknown"));
|
||||
|
||||
auto it = coupling_names.find(static_cast<coupling>(c));
|
||||
if (it != coupling_names.end())
|
||||
return lookup_s(it->second);
|
||||
else
|
||||
return lookup_s(unknown);
|
||||
}
|
||||
|
||||
locale Translations;
|
||||
|
||||
Reference in New Issue
Block a user