feat: Translation Service (#844)

Co-authored-by: mrwoowoo <github@hiqaq.com>
Co-authored-by: LiamD-Flop <40887493+LiamD-Flop@users.noreply.github.com>
This commit is contained in:
Yimura
2023-02-01 19:46:33 +01:00
committed by GitHub
parent ef3decba53
commit d4f2960c77
79 changed files with 1183 additions and 779 deletions

View File

@ -11,7 +11,7 @@ namespace big
{
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
if (ImGui::Checkbox("Preview", &g.spawn_vehicle.preview_vehicle))
if (ImGui::Checkbox("PREVIEW"_T.data(), &g.spawn_vehicle.preview_vehicle))
{
if (!g.spawn_vehicle.preview_vehicle)
{
@ -27,7 +27,7 @@ namespace big
strncpy(plate_buf, g.spawn_vehicle.plate.c_str(), 9);
ImGui::SetNextItemWidth(300.f);
components::input_text_with_hint("Plate", "Plate Number", plate_buf, sizeof(plate_buf), ImGuiInputTextFlags_None, [] {
components::input_text_with_hint("PLATE"_T, "PLATE_NUMBER"_T, plate_buf, sizeof(plate_buf), ImGuiInputTextFlags_None, [] {
g.spawn_vehicle.plate = plate_buf;
});
@ -36,9 +36,9 @@ namespace big
const auto& class_arr = g_gta_data_service->vehicle_classes();
ImGui::SetNextItemWidth(300.f);
if (ImGui::BeginCombo("Vehicle Class", selected_class == -1 ? "ALL" : class_arr[selected_class].c_str()))
if (ImGui::BeginCombo("VEHICLE_CLASS"_T.data(), selected_class == -1 ? "ALL"_T.data() : class_arr[selected_class].c_str()))
{
if (ImGui::Selectable("ALL", selected_class == -1))
if (ImGui::Selectable("ALL"_T.data(), selected_class == -1))
{
selected_class = -1;
}
@ -63,7 +63,7 @@ namespace big
static char search[64];
ImGui::SetNextItemWidth(300.f);
components::input_text_with_hint("Model Name", "Search", search, sizeof(search), ImGuiInputTextFlags_None);
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
if (ImGui::ListBoxHeader("###vehicles", { 300, static_cast<float>(*g_pointers->m_resolution_y - 188 - 38 * 4) }))
@ -80,7 +80,7 @@ namespace big
{
const auto& item = g_gta_data_service->vehicle_by_hash(veh_hash);
components::selectable(std::format("Current Vehicle [{}]", item.m_display_name), false, [] {
components::selectable(std::vformat("SPAWN_VEHICLE_CURRENT_VEHICLE"_T, std::make_format_args(item.m_display_name)), false, [] {
if (self::veh)
{
Vector3 spawn_location = vehicle::get_spawn_location(g.spawn_vehicle.spawn_inside);
@ -92,7 +92,7 @@ namespace big
if (veh == 0)
{
g_notification_service->push_error("Vehicle", "Unable to spawn vehicle");
g_notification_service->push_error("VEHICLE"_T.data(), "UNABLE_TO_SPAWN_VEHICLE"_T.data());
}
else
{
@ -162,7 +162,7 @@ namespace big
if (veh == 0)
{
g_notification_service->push_error("Vehicle", "Unable to spawn vehicle");
g_notification_service->push_error("VEHICLE"_T.data(), "UNABLE_TO_SPAWN_VEHICLE"_T.data());
}
else
{
@ -196,7 +196,7 @@ namespace big
}
else
{
ImGui::Text("No vehicles in registry.");
ImGui::Text("NO_VEHICLE_IN_REGISTRY"_T.data());
}
ImGui::ListBoxFooter();
}