| | | 1 | | using System.Globalization; |
| | | 2 | | using System.Resources; |
| | | 3 | | |
| | | 4 | | namespace LifeChart.Application.Localization; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Static accessor for localized strings. Call SetCulture() once at app startup. |
| | | 8 | | /// </summary> |
| | | 9 | | public static class L |
| | | 10 | | { |
| | 0 | 11 | | private static readonly ResourceManager RM = new( |
| | 0 | 12 | | "LifeChart.Application.Resources.AppStrings", |
| | 0 | 13 | | typeof(L).Assembly); |
| | | 14 | | |
| | | 15 | | public static void SetCulture(CultureInfo culture) |
| | | 16 | | { |
| | 0 | 17 | | CultureInfo.CurrentCulture = culture; |
| | 0 | 18 | | CultureInfo.CurrentUICulture = culture; |
| | 0 | 19 | | } |
| | | 20 | | |
| | | 21 | | private static string Get(string key) => |
| | 0 | 22 | | RM.GetString(key, CultureInfo.CurrentUICulture) ?? $"[{key}]"; |
| | | 23 | | |
| | | 24 | | public static string Fmt(string key, params object[] args) => |
| | 0 | 25 | | string.Format(Get(key), args); |
| | | 26 | | |
| | | 27 | | // Common |
| | 0 | 28 | | public static string Common_Save => Get(nameof(Common_Save)); |
| | 0 | 29 | | public static string Common_Cancel => Get(nameof(Common_Cancel)); |
| | 0 | 30 | | public static string Common_Delete => Get(nameof(Common_Delete)); |
| | 0 | 31 | | public static string Common_Edit => Get(nameof(Common_Edit)); |
| | 0 | 32 | | public static string Common_Error => Get(nameof(Common_Error)); |
| | 0 | 33 | | public static string Common_OK => Get(nameof(Common_OK)); |
| | 0 | 34 | | public static string Common_Name => Get(nameof(Common_Name)); |
| | 0 | 35 | | public static string Common_Password => Get(nameof(Common_Password)); |
| | 0 | 36 | | public static string Common_Username => Get(nameof(Common_Username)); |
| | 0 | 37 | | public static string Common_Time => Get(nameof(Common_Time)); |
| | | 38 | | |
| | | 39 | | // Today |
| | 0 | 40 | | public static string Today_Title => Get(nameof(Today_Title)); |
| | 0 | 41 | | public static string Today_HowAreYou => Get(nameof(Today_HowAreYou)); |
| | 0 | 42 | | public static string Today_Mood => Get(nameof(Today_Mood)); |
| | 0 | 43 | | public static string Today_Functionality => Get(nameof(Today_Functionality)); |
| | 0 | 44 | | public static string Today_Sleep => Get(nameof(Today_Sleep)); |
| | 0 | 45 | | public static string Today_MedicationTaken => Get(nameof(Today_MedicationTaken)); |
| | 0 | 46 | | public static string Today_MenstrualCycle => Get(nameof(Today_MenstrualCycle)); |
| | 0 | 47 | | public static string Today_Hypomania => Get(nameof(Today_Hypomania)); |
| | 0 | 48 | | public static string Today_Symptoms => Get(nameof(Today_Symptoms)); |
| | 0 | 49 | | public static string Today_SymptomsPlaceholder => Get(nameof(Today_SymptomsPlaceholder)); |
| | 0 | 50 | | public static string Today_Notes => Get(nameof(Today_Notes)); |
| | 0 | 51 | | public static string Today_NotesPlaceholder => Get(nameof(Today_NotesPlaceholder)); |
| | 0 | 52 | | public static string Today_More => Get(nameof(Today_More)); |
| | 0 | 53 | | public static string Today_Saved => Get(nameof(Today_Saved)); |
| | 0 | 54 | | public static string Today_AlreadySaved => Get(nameof(Today_AlreadySaved)); |
| | 0 | 55 | | public static string Today_CriticalValues => Get(nameof(Today_CriticalValues)); |
| | 0 | 56 | | public static string Today_ShowCrisisResources => Get(nameof(Today_ShowCrisisResources)); |
| | 0 | 57 | | public static string Today_InputModeTitle => Get(nameof(Today_InputModeTitle)); |
| | 0 | 58 | | public static string Today_InputModeQuick => Get(nameof(Today_InputModeQuick)); |
| | 0 | 59 | | public static string Today_InputModeFull => Get(nameof(Today_InputModeFull)); |
| | | 60 | | |
| | | 61 | | // Medications |
| | 0 | 62 | | public static string Medications_Title => Get(nameof(Medications_Title)); |
| | 0 | 63 | | public static string Medications_ActiveList => Get(nameof(Medications_ActiveList)); |
| | 0 | 64 | | public static string Medications_Empty => Get(nameof(Medications_Empty)); |
| | 0 | 65 | | public static string Medications_AddNew => Get(nameof(Medications_AddNew)); |
| | 0 | 66 | | public static string Medications_AddTitle => Get(nameof(Medications_AddTitle)); |
| | 0 | 67 | | public static string Medications_DeleteTitle => Get(nameof(Medications_DeleteTitle)); |
| | | 68 | | |
| | | 69 | | // Medication Form |
| | 0 | 70 | | public static string MedForm_TitleAdd => Get(nameof(MedForm_TitleAdd)); |
| | 0 | 71 | | public static string MedForm_TitleEdit => Get(nameof(MedForm_TitleEdit)); |
| | 0 | 72 | | public static string MedForm_Dosage => Get(nameof(MedForm_Dosage)); |
| | 0 | 73 | | public static string MedForm_DosagePlaceholder => Get(nameof(MedForm_DosagePlaceholder)); |
| | 0 | 74 | | public static string MedForm_NamePlaceholder => Get(nameof(MedForm_NamePlaceholder)); |
| | 0 | 75 | | public static string MedForm_MinStock => Get(nameof(MedForm_MinStock)); |
| | 0 | 76 | | public static string MedForm_CurrentStock => Get(nameof(MedForm_CurrentStock)); |
| | 0 | 77 | | public static string MedForm_IntakeTimes => Get(nameof(MedForm_IntakeTimes)); |
| | 0 | 78 | | public static string MedForm_AddTime => Get(nameof(MedForm_AddTime)); |
| | 0 | 79 | | public static string MedForm_Doses => Get(nameof(MedForm_Doses)); |
| | 0 | 80 | | public static string MedForm_NameRequired => Get(nameof(MedForm_NameRequired)); |
| | 0 | 81 | | public static string MedForm_IntakeRequired => Get(nameof(MedForm_IntakeRequired)); |
| | | 82 | | |
| | | 83 | | // Chart |
| | 0 | 84 | | public static string Chart_Title => Get(nameof(Chart_Title)); |
| | 0 | 85 | | public static string Chart_Header => Get(nameof(Chart_Header)); |
| | 0 | 86 | | public static string Chart_Days30 => Get(nameof(Chart_Days30)); |
| | 0 | 87 | | public static string Chart_Days60 => Get(nameof(Chart_Days60)); |
| | 0 | 88 | | public static string Chart_Days90 => Get(nameof(Chart_Days90)); |
| | 0 | 89 | | public static string Chart_Empty => Get(nameof(Chart_Empty)); |
| | 0 | 90 | | public static string Chart_Hypomania => Get(nameof(Chart_Hypomania)); |
| | 0 | 91 | | public static string Chart_ExportPdf => Get(nameof(Chart_ExportPdf)); |
| | 0 | 92 | | public static string Chart_ExportPdfAlt => Get(nameof(Chart_ExportPdfAlt)); |
| | 0 | 93 | | public static string Chart_PdfExported => Get(nameof(Chart_PdfExported)); |
| | 0 | 94 | | public static string Chart_OpenFile => Get(nameof(Chart_OpenFile)); |
| | | 95 | | |
| | | 96 | | // Settings |
| | 0 | 97 | | public static string Settings_Title => Get(nameof(Settings_Title)); |
| | 0 | 98 | | public static string Settings_Backup => Get(nameof(Settings_Backup)); |
| | 0 | 99 | | public static string Settings_CloudProvider => Get(nameof(Settings_CloudProvider)); |
| | 0 | 100 | | public static string Settings_NextcloudUrl => Get(nameof(Settings_NextcloudUrl)); |
| | 0 | 101 | | public static string Settings_AutoBackup => Get(nameof(Settings_AutoBackup)); |
| | 0 | 102 | | public static string Settings_BackupWarningPrefix => Get(nameof(Settings_BackupWarningPrefix)); |
| | 0 | 103 | | public static string Settings_BackupWarningSuffix => Get(nameof(Settings_BackupWarningSuffix)); |
| | 0 | 104 | | public static string Settings_Reminders => Get(nameof(Settings_Reminders)); |
| | 0 | 105 | | public static string Settings_EveningReminder => Get(nameof(Settings_EveningReminder)); |
| | 0 | 106 | | public static string Settings_EveningReminderEnable => Get(nameof(Settings_EveningReminderEnable)); |
| | 0 | 107 | | public static string Settings_CrisisHint => Get(nameof(Settings_CrisisHint)); |
| | 0 | 108 | | public static string Settings_Display => Get(nameof(Settings_Display)); |
| | 0 | 109 | | public static string Settings_InputMode => Get(nameof(Settings_InputMode)); |
| | 0 | 110 | | public static string Settings_ColorBlind => Get(nameof(Settings_ColorBlind)); |
| | 0 | 111 | | public static string Settings_App => Get(nameof(Settings_App)); |
| | 0 | 112 | | public static string Settings_Language => Get(nameof(Settings_Language)); |
| | 0 | 113 | | public static string Settings_Biometrics => Get(nameof(Settings_Biometrics)); |
| | 0 | 114 | | public static string Settings_SaveButton => Get(nameof(Settings_SaveButton)); |
| | 0 | 115 | | public static string Settings_Saved => Get(nameof(Settings_Saved)); |
| | 0 | 116 | | public static string Settings_NoBackup => Get(nameof(Settings_NoBackup)); |
| | 0 | 117 | | public static string Settings_LocalExport => Get(nameof(Settings_LocalExport)); |
| | 0 | 118 | | public static string Settings_InputQuick => Get(nameof(Settings_InputQuick)); |
| | 0 | 119 | | public static string Settings_InputFull => Get(nameof(Settings_InputFull)); |
| | 0 | 120 | | public static string Settings_InputAlwaysAsk => Get(nameof(Settings_InputAlwaysAsk)); |
| | 0 | 121 | | public static string Settings_LangSystem => Get(nameof(Settings_LangSystem)); |
| | 0 | 122 | | public static string Settings_LangGerman => Get(nameof(Settings_LangGerman)); |
| | 0 | 123 | | public static string Settings_LangEnglish => Get(nameof(Settings_LangEnglish)); |
| | | 124 | | |
| | | 125 | | // Crisis |
| | 0 | 126 | | public static string Crisis_Title => Get(nameof(Crisis_Title)); |
| | 0 | 127 | | public static string Crisis_NotAlone => Get(nameof(Crisis_NotAlone)); |
| | 0 | 128 | | public static string Crisis_Region => Get(nameof(Crisis_Region)); |
| | 0 | 129 | | public static string Crisis_Empty => Get(nameof(Crisis_Empty)); |
| | 0 | 130 | | public static string Crisis_Available24h => Get(nameof(Crisis_Available24h)); |
| | 0 | 131 | | public static string Crisis_Call => Get(nameof(Crisis_Call)); |
| | 0 | 132 | | public static string Crisis_Website => Get(nameof(Crisis_Website)); |
| | | 133 | | |
| | | 134 | | // Onboarding |
| | 0 | 135 | | public static string Onboarding_Title => Get(nameof(Onboarding_Title)); |
| | 0 | 136 | | public static string Onboarding_Welcome => Get(nameof(Onboarding_Welcome)); |
| | 0 | 137 | | public static string Onboarding_Subtitle => Get(nameof(Onboarding_Subtitle)); |
| | 0 | 138 | | public static string Onboarding_DisclaimerTitle => Get(nameof(Onboarding_DisclaimerTitle)); |
| | 0 | 139 | | public static string Onboarding_Disclaimer => Get(nameof(Onboarding_Disclaimer)); |
| | 0 | 140 | | public static string Onboarding_CrisisHotline => Get(nameof(Onboarding_CrisisHotline)); |
| | 0 | 141 | | public static string Onboarding_ReminderQuestion => Get(nameof(Onboarding_ReminderQuestion)); |
| | 0 | 142 | | public static string Onboarding_ReminderEnable => Get(nameof(Onboarding_ReminderEnable)); |
| | 0 | 143 | | public static string Onboarding_ReminderNote => Get(nameof(Onboarding_ReminderNote)); |
| | 0 | 144 | | public static string Onboarding_Start => Get(nameof(Onboarding_Start)); |
| | | 145 | | |
| | | 146 | | // Lock |
| | 0 | 147 | | public static string Lock_AuthPrompt => Get(nameof(Lock_AuthPrompt)); |
| | 0 | 148 | | public static string Lock_Retry => Get(nameof(Lock_Retry)); |
| | | 149 | | |
| | | 150 | | // About |
| | 0 | 151 | | public static string About_Title => Get(nameof(About_Title)); |
| | 0 | 152 | | public static string About_Version => Get(nameof(About_Version)); |
| | 0 | 153 | | public static string About_Description => Get(nameof(About_Description)); |
| | 0 | 154 | | public static string About_Developer => Get(nameof(About_Developer)); |
| | 0 | 155 | | public static string About_License => Get(nameof(About_License)); |
| | 0 | 156 | | public static string About_Copyright => Get(nameof(About_Copyright)); |
| | 0 | 157 | | public static string About_Wiki => Get(nameof(About_Wiki)); |
| | 0 | 158 | | public static string About_Issues => Get(nameof(About_Issues)); |
| | 0 | 159 | | public static string About_ExperimentalNote => Get(nameof(About_ExperimentalNote)); |
| | | 160 | | |
| | | 161 | | // Alarm |
| | 0 | 162 | | public static string Alarm_Evening => Get(nameof(Alarm_Evening)); |
| | | 163 | | } |