From 9186f08c3c6cad014c671ca152c78d9d2ee307e6 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:02:42 -0400 Subject: [PATCH] shared_translation: Deobfuscate auto time zone --- src/yuzu/configuration/shared_translation.cpp | 98 ++++++++++--------- 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index a1030efb0..f120a632c 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/time_zone.h" #include "yuzu/configuration/shared_translation.h" #include @@ -309,52 +310,57 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(Region, Korea, "Korea"), PAIR(Region, Taiwan, "Taiwan"), }}); - translations->insert({typeid(Settings::TimeZone), - { - PAIR(TimeZone, Auto, "Auto"), - PAIR(TimeZone, Default, "Default"), - PAIR(TimeZone, Cet, "CET"), - PAIR(TimeZone, Cst6Cdt, "CST6CDT"), - PAIR(TimeZone, Cuba, "Cuba"), - PAIR(TimeZone, Eet, "EET"), - PAIR(TimeZone, Egypt, "Egypt"), - PAIR(TimeZone, Eire, "Eire"), - PAIR(TimeZone, Est, "EST"), - PAIR(TimeZone, Est5Edt, "EST5EDT"), - PAIR(TimeZone, Gb, "GB"), - PAIR(TimeZone, GbEire, "GB-Eire"), - PAIR(TimeZone, Gmt, "GMT"), - PAIR(TimeZone, GmtPlusZero, "GMT+0"), - PAIR(TimeZone, GmtMinusZero, "GMT-0"), - PAIR(TimeZone, GmtZero, "GMT0"), - PAIR(TimeZone, Greenwich, "Greenwich"), - PAIR(TimeZone, Hongkong, "Hongkong"), - PAIR(TimeZone, Hst, "HST"), - PAIR(TimeZone, Iceland, "Iceland"), - PAIR(TimeZone, Iran, "Iran"), - PAIR(TimeZone, Israel, "Israel"), - PAIR(TimeZone, Jamaica, "Jamaica"), - PAIR(TimeZone, Kwajalein, "Kwajalein"), - PAIR(TimeZone, Libya, "Libya"), - PAIR(TimeZone, Met, "MET"), - PAIR(TimeZone, Mst, "MST"), - PAIR(TimeZone, Mst7Mdt, "MST7MDT"), - PAIR(TimeZone, Navajo, "Navajo"), - PAIR(TimeZone, Nz, "NZ"), - PAIR(TimeZone, NzChat, "NZ-CHAT"), - PAIR(TimeZone, Poland, "Poland"), - PAIR(TimeZone, Portugal, "Portugal"), - PAIR(TimeZone, Prc, "PRC"), - PAIR(TimeZone, Pst8Pdt, "PST8PDT"), - PAIR(TimeZone, Roc, "ROC"), - PAIR(TimeZone, Rok, "ROK"), - PAIR(TimeZone, Singapore, "Singapore"), - PAIR(TimeZone, Turkey, "Turkey"), - PAIR(TimeZone, Uct, "UCT"), - PAIR(TimeZone, WSu, "W-SU"), - PAIR(TimeZone, Wet, "WET"), - PAIR(TimeZone, Zulu, "Zulu"), - }}); + translations->insert( + {typeid(Settings::TimeZone), + { + {static_cast(Settings::TimeZone::Auto), + tr("Auto (%1)", "Auto select time zone") + .arg(QString::fromStdString(Settings::GetTimeZoneString()))}, + {static_cast(Settings::TimeZone::Default), + tr("Default (%1)", "Default time zone") + .arg(QString::fromStdString(Common::TimeZone::GetDefaultTimeZone()))}, + PAIR(TimeZone, Cet, "CET"), + PAIR(TimeZone, Cst6Cdt, "CST6CDT"), + PAIR(TimeZone, Cuba, "Cuba"), + PAIR(TimeZone, Eet, "EET"), + PAIR(TimeZone, Egypt, "Egypt"), + PAIR(TimeZone, Eire, "Eire"), + PAIR(TimeZone, Est, "EST"), + PAIR(TimeZone, Est5Edt, "EST5EDT"), + PAIR(TimeZone, Gb, "GB"), + PAIR(TimeZone, GbEire, "GB-Eire"), + PAIR(TimeZone, Gmt, "GMT"), + PAIR(TimeZone, GmtPlusZero, "GMT+0"), + PAIR(TimeZone, GmtMinusZero, "GMT-0"), + PAIR(TimeZone, GmtZero, "GMT0"), + PAIR(TimeZone, Greenwich, "Greenwich"), + PAIR(TimeZone, Hongkong, "Hongkong"), + PAIR(TimeZone, Hst, "HST"), + PAIR(TimeZone, Iceland, "Iceland"), + PAIR(TimeZone, Iran, "Iran"), + PAIR(TimeZone, Israel, "Israel"), + PAIR(TimeZone, Jamaica, "Jamaica"), + PAIR(TimeZone, Kwajalein, "Kwajalein"), + PAIR(TimeZone, Libya, "Libya"), + PAIR(TimeZone, Met, "MET"), + PAIR(TimeZone, Mst, "MST"), + PAIR(TimeZone, Mst7Mdt, "MST7MDT"), + PAIR(TimeZone, Navajo, "Navajo"), + PAIR(TimeZone, Nz, "NZ"), + PAIR(TimeZone, NzChat, "NZ-CHAT"), + PAIR(TimeZone, Poland, "Poland"), + PAIR(TimeZone, Portugal, "Portugal"), + PAIR(TimeZone, Prc, "PRC"), + PAIR(TimeZone, Pst8Pdt, "PST8PDT"), + PAIR(TimeZone, Roc, "ROC"), + PAIR(TimeZone, Rok, "ROK"), + PAIR(TimeZone, Singapore, "Singapore"), + PAIR(TimeZone, Turkey, "Turkey"), + PAIR(TimeZone, Uct, "UCT"), + PAIR(TimeZone, WSu, "W-SU"), + PAIR(TimeZone, Wet, "WET"), + PAIR(TimeZone, Zulu, "Zulu"), + }}); translations->insert({typeid(Settings::AudioMode), { PAIR(AudioMode, Mono, "Mono"),