Exemple #1
0
 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")
Exemple #2
0
    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)
Exemple #3
0
 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)
Exemple #4
0
	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]
Exemple #5
0
	def _GetDescriptionPartsDocumentationText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Dialogs.Description_Parts.Documentation")
Exemple #6
0
	def _GetDescriptionPartsOverriddenValueText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Dialogs.Description_Parts.Overridden_Value")
Exemple #7
0
 def _GetTitleText(self, listPath: str) -> localization.LocalizedString:
     return Language.GetLocalizationStringByIdentifier(
         This.Mod.Namespace + ".Mod_Settings.List.Title")
Exemple #8
0
	def _GetRowPartsSettingOverriddenText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Row_Parts.Setting.Overridden")
Exemple #9
0
	def GetNameText (cls) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Mod_Settings.Values." + cls.Key + ".Name", fallbackText = cls.Key)
Exemple #10
0
 def _GetValueText(self, value: bool) -> localization.LocalizedString:
     return Language.GetLocalizationStringByIdentifier(
         This.Mod.Namespace + ".Settings.Types.Boolean.Yes_No." +
         str(value),
         fallbackText=str(value))
Exemple #11
0
 def _GetDescriptionSettingText(
     self, setting: UISettingsShared.SettingStandardWrapper
 ) -> localization.LocalizedString:
     return Language.GetLocalizationStringByIdentifier(
         This.Mod.Namespace + ".Mod_Settings.Values." + setting.Key +
         ".Description")
Exemple #12
0
	def _GetResetAllConfirmDialogNoButtonText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Reset_All.Confirm_Dialog.No_Button", fallbackText = "No_Button")
Exemple #13
0
	def _GetResetAllConfirmDialogDescriptionText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Reset_All.Confirm_Dialog.Description")
Exemple #14
0
	def _GetResetAllButtonText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Reset_All.Button.Text")
Exemple #15
0
	def _GetCancelButtonText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Dialogs.Cancel_Button", fallbackText = "Cancel_Button")
Exemple #16
0
def _GetFormattingText() -> localization.LocalizedString:
    return Language.GetLocalizationStringByIdentifier(
        This.Mod.Namespace + ".Text_Builder.Formatting",
        fallbackText="Missing Formatting String!")
Exemple #17
0
	def _GetTitleStandardText (self) -> localization.LocalizedString:
		return Language.GetLocalizationStringByIdentifier(This.Mod.Namespace + ".Setting_Lists.Title")