def _GetDescriptionText(self, listPath: str) -> localization.LocalizedString: listPathIdentifier = listPath.replace(self.ListPathSeparator, "_") # type: str return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Mod_Settings.List.Paths." + listPathIdentifier + ".Description")
def GetValueText(cls, value: bool) -> localization.LocalizedString: if not isinstance(value, bool): raise Exceptions.IncorrectTypeException(value, "value", (bool, )) valueString = str(value) # type: str return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Settings.Types.Boolean.Yes_No." + valueString, fallbackText=valueString)
def _GetTitleListPathText(self, listPath: str) -> localization.LocalizedString: listPathIdentifier = listPath.replace(self.ListPathSeparator, "_") # type: str fallbackText = "List.Paths." + listPathIdentifier + ".Title" # type: str return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Mod_Settings.List.Paths." + listPathIdentifier + ".Title", fallbackText=fallbackText)
def __init__ (self, value: typing.Any, identifier: str, priority: typing.Union[float, int], reasonText: typing.Optional[typing.Callable[[], localization.LocalizedString]] = None): self.Value = value # type: typing.Any self.Identifier = identifier # type: str self.Priority = priority # type: typing.Union[float, int] if reasonText is not None: self.ReasonText = reasonText # type: typing.Callable[[], localization.LocalizedString] else: self.ReasonText = lambda *args, **kwargs: Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Settings.Misc.Override.Unknown_Reason") # type: typing.Callable[[], localization.LocalizedString]
def _GetDescriptionPartsDocumentationText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Dialogs.Description_Parts.Documentation")
def _GetDescriptionPartsOverriddenValueText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Dialogs.Description_Parts.Overridden_Value")
def _GetTitleText(self, listPath: str) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Mod_Settings.List.Title")
def _GetRowPartsSettingOverriddenText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Row_Parts.Setting.Overridden")
def GetNameText (cls) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Mod_Settings.Values." + cls.Key + ".Name", fallbackText = cls.Key)
def _GetValueText(self, value: bool) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Settings.Types.Boolean.Yes_No." + str(value), fallbackText=str(value))
def _GetDescriptionSettingText( self, setting: UISettingsShared.SettingStandardWrapper ) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Mod_Settings.Values." + setting.Key + ".Description")
def _GetResetAllConfirmDialogNoButtonText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Reset_All.Confirm_Dialog.No_Button", fallbackText = "No_Button")
def _GetResetAllConfirmDialogDescriptionText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Reset_All.Confirm_Dialog.Description")
def _GetResetAllButtonText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Reset_All.Button.Text")
def _GetCancelButtonText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Dialogs.Cancel_Button", fallbackText = "Cancel_Button")
def _GetFormattingText() -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier( This.Mod.Namespace + ".Text_Builder.Formatting", fallbackText="Missing Formatting String!")
def _GetTitleStandardText (self) -> localization.LocalizedString: return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Title")