mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-10 22:34:20 +00:00
Compare commits
2 Commits
yannikblos
...
map-per-la
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
876616ad1d | ||
|
|
88c0860a3c |
@@ -237,7 +237,7 @@ public class EditorHostFragment
|
||||
for (LocalizedName name : sNames)
|
||||
languages.add(name.lang);
|
||||
args.putStringArrayList(LanguagesFragment.EXISTING_LOCALIZED_NAMES, languages);
|
||||
args.putBoolean(LanguagesFragment.INCLUDE_LOCAL_LANGUAGE, false);
|
||||
args.putBoolean(LanguagesFragment.IS_MAP_LANGUAGE_SELECTION, false);
|
||||
editWithFragment(Mode.LANGUAGE, R.string.choose_language, args, LanguagesFragment.class, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Set;
|
||||
public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
{
|
||||
final static String EXISTING_LOCALIZED_NAMES = "ExistingLocalizedNames";
|
||||
final static String INCLUDE_LOCAL_LANGUAGE = "IncludeLocalLanguage";
|
||||
final static String IS_MAP_LANGUAGE_SELECTION = "IsMapLanguageSelection";
|
||||
|
||||
public interface Listener
|
||||
{
|
||||
@@ -39,8 +39,8 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
protected LanguagesAdapter createAdapter()
|
||||
{
|
||||
Bundle args = getArguments();
|
||||
boolean includeLocalLanguage =
|
||||
args != null ? args.getBoolean(INCLUDE_LOCAL_LANGUAGE) : true;
|
||||
boolean isMapLanguageSelection =
|
||||
args != null ? args.getBoolean(IS_MAP_LANGUAGE_SELECTION) : true;
|
||||
Set<String> existingLanguages =
|
||||
args != null ? new HashSet<>(args.getStringArrayList(EXISTING_LOCALIZED_NAMES)) : new HashSet<>();
|
||||
|
||||
@@ -52,8 +52,14 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
for (int i = 0; i < systemLocales.size(); i++)
|
||||
systemLanguages.add(null);
|
||||
|
||||
for (Language lang : Editor.nativeGetSupportedLanguages(false))
|
||||
// service languages are old_name, alt_name, ...
|
||||
boolean includeServiceLangs = !isMapLanguageSelection;
|
||||
|
||||
for (Language lang : Editor.nativeGetSupportedLanguages(includeServiceLangs))
|
||||
{
|
||||
if (existingLanguages.contains(lang.code))
|
||||
continue;
|
||||
|
||||
// Separately extract system languages
|
||||
for (int i = 0; i < systemLocales.size(); i++)
|
||||
{
|
||||
@@ -65,7 +71,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
}
|
||||
}
|
||||
|
||||
if (existingLanguages.contains(lang.code) || systemLanguages.contains(lang))
|
||||
if (systemLanguages.contains(lang))
|
||||
continue;
|
||||
|
||||
languages.add(lang);
|
||||
@@ -75,7 +81,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
|
||||
languages.addAll(0, systemLanguages.stream().filter(Objects::nonNull).toList());
|
||||
|
||||
if (includeLocalLanguage) {
|
||||
if (isMapLanguageSelection) {
|
||||
String localLanguageLabel = getString(R.string.pref_maplanguage_local);
|
||||
Language localLanguage = new Language(DEFAULT_LANG_CODE, localLanguageLabel);
|
||||
languages.add(0, localLanguage);
|
||||
|
||||
@@ -19,6 +19,9 @@ NS_SWIFT_NAME(SettingsBridge)
|
||||
+ (BOOL)zoomButtonsEnabled;
|
||||
+ (void)setZoomButtonsEnabled:(BOOL)zoomButtonsEnabled;
|
||||
|
||||
+ (BOOL)compassCalibrationEnabled;
|
||||
+ (void)setCompassCalibrationEnabled:(BOOL)compassCalibrationEnabled;
|
||||
|
||||
+ (MWMTheme)theme;
|
||||
+ (void)setTheme:(MWMTheme)theme;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace
|
||||
{
|
||||
char const * kAutoDownloadEnabledKey = "AutoDownloadEnabled";
|
||||
char const * kZoomButtonsEnabledKey = "ZoomButtonsEnabled";
|
||||
char const * kCompassCalibrationEnabledKey = "CompassCalibrationEnabled";
|
||||
char const * kMapLanguageCode = "MapLanguageCode";
|
||||
char const * kRoutingDisclaimerApprovedKey = "IsDisclaimerApproved";
|
||||
|
||||
@@ -115,6 +116,18 @@ NSString * const kUDFileLoggingEnabledKey = @"FileLoggingEnabledKey";
|
||||
[MWMMapViewControlsManager manager].zoomHidden = !zoomButtonsEnabled;
|
||||
}
|
||||
|
||||
+ (BOOL)compassCalibrationEnabled
|
||||
{
|
||||
bool enabled = true;
|
||||
UNUSED_VALUE(settings::Get(kCompassCalibrationEnabledKey, enabled));
|
||||
return enabled;
|
||||
}
|
||||
|
||||
+ (void)setCompassCalibrationEnabled:(BOOL)compassCalibrationEnabled
|
||||
{
|
||||
settings::Set(kCompassCalibrationEnabledKey, static_cast<bool>(compassCalibrationEnabled));
|
||||
}
|
||||
|
||||
+ (MWMTheme)theme
|
||||
{
|
||||
if ([MWMCarPlayService shared].isCarplayActivated) {
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "E-posstuurfout";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompaskalibrering";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Langtik weer op die kaart om die koppelvlak te sien";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "حدث خطأ في إرسال البريد الإلكتروني";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "معايرة البوصلة";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "اضغط مطولاً على الخريطة مرة أخرى لرؤية الواجهة";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "E-poçt göndərmə xətası";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompas kalibrlənməsi";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "İnterfeysi görmək üçün yenidən xəritəyə uzun müddət toxunun";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Памылка пры адпраўцы пошты";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Каліброўка компаса";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Паўторнае працяглае націсканне верне бачнасць інтэрфейсу";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Грешка при изпращане на поща";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Калибриране на компас";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Докоснете отново картата, за да видите интерфейса";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "S'ha produït un error en enviar el correu";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibratge de la brúixola";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Toqueu llargament el mapa de nou per veure la interfície";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Chyba při odesílání emailu";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kalibrace kompasu";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Dlouhým klepnutím na mapu znovu zobrazíte rozhraní";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Mailforsendelsesfejl";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kalibrering af kompas";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Tryk længe på kortet igen for at se grænsefladen";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Fehler beim E-Mail-Versand";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompass-Kalibrierung";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Tippe erneut lange auf die Karte, um die Benutzeroberfläche wiederzusehen";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Σφάλμα κατά την αποστολή του e-mail";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Καλιμπράρισμα πυξίδας";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Πατήστε ξανά παρατεταμένα στο χάρτη για να δείτε το περιβάλλον εργασίας";
|
||||
|
||||
|
||||
@@ -352,6 +352,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Error sending email";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Compass calibration";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Long-tap on the map again to see the interface";
|
||||
|
||||
|
||||
@@ -363,6 +363,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Error sending email";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Compass calibration";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Long-tap on the map again to see the interface";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Error de envío de correo";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibración de la brújula";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Vuelve a pulsar prolongadamente sobre el mapa para ver la interfaz";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Error de envío de correo";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibración de la brújula";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Vuelva a pulsar prolongadamente sobre el mapa para ver la interfaz";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Viga teate saatmisel";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompassi kalibreerimine";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Kasutajaliidese nägemiseks vajuta kaarti pikalt";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Errore bat mezua bidaltzean";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Iparrorratzaren kalibrazioa";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Sakatu luze berriro mapan interfazea ikusteko";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "خطا در ارسال ایمیل";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "تنظیم کردن قطب نما";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "دوباره روی نقشه ضربه طولانی بزنید تا رابط کاربری را ببینید";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Virhe lähetettäessä viestiä";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompassin kalibrointi";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Paina karttaa pitkään uudelleen nähdäksesi käyttöliittymän";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Erreur d’envoi de courriel";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Étalonnage de la boussole";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Appuyez à nouveau longuement sur la carte pour voir l’interface";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "שגיאה בשליחת דוא\"ל";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "כיול המצפן";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "לחץ לחיצה ארוכה במפה כדי להציג את הממשק";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "ईमेल भेजने में त्रुटि";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "कम्पास अंशांकन";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "इंटरफ़ेस देखने के लिए मानचित्र पर फिर से देर तक टैप करें";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Hiba az e-mail küldése során";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Iránytű kalibrálása";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Érintse meg újra hosszan a térképet a kezelőfelület megjelenítéséhez";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Gangguan pengiriman surel";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kalibrasi kompas";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Ketuk lama pada peta sekali lagi untuk melihat antarmuka";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Errore invio e-mail";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibrazione bussola";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Tocca di nuovo a lungo sulla mappa per visualizzare l'interfaccia";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "メール送信エラー";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "コンパスの調整";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "インターフェイスを見るには、もう一度地図をロングタップする";
|
||||
|
||||
|
||||
@@ -329,6 +329,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "메일 전송 중 오류";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "나침반 보정";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "지도를 다시 길게 탭하면 인터페이스가 표시됩니다.";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Klaida siunčiant laišką";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompaso kalibravimas";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Bakstelėkite ir palaikykite žemėlapį vėl, kad pamatytumėte sąsają";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Kļūda, nosūtot vēstuli";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompasa kalibrēšana";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Vēlreiz piespiediet un paturiet uz kartes, lai redzētu saskarni";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "मेल पाठवताना त्रुटी";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "होकायंत्र अंशशोधन";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "इंटरफेस पाहण्यासाठी पुन्हा नकाशावर दीर्घ टॅप करा";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Żball meta bgħatt e-mejl";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kalibrazzjoni tal-boxxla";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Itteppja fit-tul darb’ oħra fuq il-mappa biex tara l-interface";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Feil ved sending av e-post";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompasskalibrering";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Trykk lenge på kartet igjen for å se grensesnittet";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "E-mail verzendfout";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompaskalibratie";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Tik nogmaals lang op de kaart om de interface te zien";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Błąd wysyłania wiadomości";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kalibracja kompasu";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Ponownie dotknij długo mapy, aby wyświetlić interfejs";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Erro no envio de email";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibração da bússola";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Dê um toque longo no mapa novamente para ver a interface";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Erro ao enviar o email";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibração da bússola";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Dê um toque longo no mapa novamente para ver a interface";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Eroare de trimitere e-mail";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Calibrare busolă";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Atingeți lung pe hartă din nou pentru a vedea interfața";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Ошибка при отправлении письма";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Калибровка компаса";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Долгое нажатие на карту вернет интерфейс обратно";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Chyba pri odosielaní emailu";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kalibrácia kompasu";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Opätovným dlhým ťuknutím na mapu zobrazíte rozhranie";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Грешка приликом слања email-а";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Калибрација компаса";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Додирните дуго мапу да бисте поново видели интерфејс";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Fel när mailet skulle skickas";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Kompasskalibrering";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Tryck länge på kartan för att se gränssnittet";
|
||||
|
||||
|
||||
@@ -320,6 +320,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Error sending email";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Compass calibration";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Gusa kwa muda mrefu kwenye ramani tena ili kuona kiolesura";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "จดหมายที่ส่งเกิดความผิดพลาด";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "การปรับเทียบเข็มทิศ";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "แตะยาวบนแผนที่อีกครั้งเพื่อดูอินเทอร์เฟซ";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "E-Posta gönderme hatası";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Pusula kalibrasyonu";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Seçenekleri görmek için haritaya tekrar basılı tutun";
|
||||
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Помилка при відправленні листа";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Калібрування компаса";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Ще раз потримайте палець на карті, щоб побачити інтерфейс";
|
||||
|
||||
|
||||
@@ -330,6 +330,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "Lỗi gửi thư";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "Chuẩn hóa la bàn";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "Nhấn và giữ lại vào bản đồ để xem giao diện";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "电子邮件发送失败";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "指南针校准";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "再次长按地图即可查看界面";
|
||||
|
||||
|
||||
@@ -336,6 +336,9 @@
|
||||
/* Alert title */
|
||||
"email_error_title" = "電子郵件發送失敗";
|
||||
|
||||
/* Settings item title */
|
||||
"pref_calibration_title" = "校正指南針";
|
||||
|
||||
/* Toast text when user hides UI with a long tap anywhere on the map */
|
||||
"long_tap_toast" = "再次長按地圖即可查看介面";
|
||||
|
||||
|
||||
@@ -167,6 +167,17 @@ import AVFoundation
|
||||
}
|
||||
|
||||
|
||||
/// If the compass should be calibrated
|
||||
@objc static var shouldCalibrateCompass: Bool {
|
||||
get {
|
||||
return SettingsBridge.compassCalibrationEnabled()
|
||||
}
|
||||
set {
|
||||
SettingsBridge.setCompassCalibrationEnabled(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// The current map appearance
|
||||
@objc static var mapAppearance: Appearance {
|
||||
get {
|
||||
|
||||
@@ -60,6 +60,10 @@ struct SettingsView: View {
|
||||
@State private var isSyncPossible: Bool = true
|
||||
|
||||
|
||||
/// If the compass should be calibrated
|
||||
@State private var shouldCalibrateCompass: Bool = true
|
||||
|
||||
|
||||
/// The selected power saving mode
|
||||
@State private var selectedPowerSavingMode: Settings.PowerSavingMode = .never
|
||||
|
||||
@@ -234,6 +238,9 @@ struct SettingsView: View {
|
||||
Text("pref_appearance_title")
|
||||
}
|
||||
|
||||
Toggle("pref_calibration_title", isOn: $shouldCalibrateCompass)
|
||||
.tint(.accent)
|
||||
|
||||
Picker(selection: $selectedPowerSavingMode) {
|
||||
ForEach(Settings.PowerSavingMode.allCases) { powerSavingMode in
|
||||
Text(powerSavingMode.description)
|
||||
@@ -293,6 +300,7 @@ struct SettingsView: View {
|
||||
selectedMapAppearance = Settings.mapAppearance
|
||||
selectedAppearance = Settings.appearance
|
||||
shouldSync = Settings.shouldSync
|
||||
shouldCalibrateCompass = Settings.shouldCalibrateCompass
|
||||
selectedPowerSavingMode = Settings.powerSavingMode
|
||||
selectedMobileDataPolicy = Settings.mobileDataPolicy
|
||||
isLogging = Settings.isLogging
|
||||
@@ -337,6 +345,9 @@ struct SettingsView: View {
|
||||
Settings.shouldSync = changedShouldSync
|
||||
}
|
||||
}
|
||||
.onChange(of: shouldCalibrateCompass) { changedShouldCalibrateCompass in
|
||||
Settings.shouldCalibrateCompass = changedShouldCalibrateCompass
|
||||
}
|
||||
.onChange(of: selectedPowerSavingMode) { changedSelectedPowerSavingMode in
|
||||
Settings.powerSavingMode = changedSelectedPowerSavingMode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user