mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 16:08:38 +00:00
Fix string formatting on announce text
This commit is contained in:
parent
0c8ca731a4
commit
479b1da903
2 changed files with 8 additions and 8 deletions
|
@ -64,20 +64,20 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.";
|
||||||
|
|
||||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode)
|
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode)
|
||||||
{
|
{
|
||||||
announceText.Insert(0, BaseLayoutStrings.ReadOnlyWarn.Translate(LocalizationManager.DefaultLang) + "\n\n");
|
announceText.Append(BaseLayoutStrings.ReadOnlyWarn.Translate(LocalizationManager.DefaultLang) + "\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EmailEnforcementConfiguration.Instance.EnableEmailEnforcement)
|
if (EmailEnforcementConfiguration.Instance.EnableEmailEnforcement)
|
||||||
{
|
{
|
||||||
announceText.Insert(0, EmailEnforcementConfiguration.Instance.EmailEnforcementMessageMain);
|
announceText.Append(EmailEnforcementConfiguration.Instance.EmailEnforcementMessageMain + "\n\n");
|
||||||
|
|
||||||
if (user.EmailAddress == null)
|
if (user.EmailAddress == null)
|
||||||
{
|
{
|
||||||
announceText.Insert(0, EmailEnforcementConfiguration.Instance.EmailEnforcementMessageNoEmail);
|
announceText.Append(EmailEnforcementConfiguration.Instance.EmailEnforcementMessageNoEmail + "\n\n");
|
||||||
}
|
}
|
||||||
else if (!user.EmailAddressVerified)
|
else if (!user.EmailAddressVerified)
|
||||||
{
|
{
|
||||||
announceText.Insert(0, EmailEnforcementConfiguration.Instance.EmailEnforcementMessageVerify);
|
announceText.Append(EmailEnforcementConfiguration.Instance.EmailEnforcementMessageVerify + "\n\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace LBPUnion.ProjectLighthouse.Configuration;
|
||||||
|
|
||||||
public class EmailEnforcementConfiguration : ConfigurationBase<EmailEnforcementConfiguration>
|
public class EmailEnforcementConfiguration : ConfigurationBase<EmailEnforcementConfiguration>
|
||||||
{
|
{
|
||||||
public override int ConfigVersion { get; set; } = 2;
|
public override int ConfigVersion { get; set; } = 3;
|
||||||
|
|
||||||
public override string ConfigName { get; set; } = "enforce-email.yml";
|
public override string ConfigName { get; set; } = "enforce-email.yml";
|
||||||
|
|
||||||
|
@ -70,18 +70,18 @@ public class EmailEnforcementConfiguration : ConfigurationBase<EmailEnforcementC
|
||||||
public string EmailEnforcementMessageMain { get; set; } =
|
public string EmailEnforcementMessageMain { get; set; } =
|
||||||
"This lighthouse instance has email enforcement enabled. " +
|
"This lighthouse instance has email enforcement enabled. " +
|
||||||
"If you haven't already, you will need to set and verify " +
|
"If you haven't already, you will need to set and verify " +
|
||||||
"an email address to use most features.\\n";
|
"an email address to use most features. ";
|
||||||
|
|
||||||
public string EmailEnforcementMessageNoEmail { get; set; } =
|
public string EmailEnforcementMessageNoEmail { get; set; } =
|
||||||
"You do not have an email set on your account. You can set " +
|
"You do not have an email set on your account. You can set " +
|
||||||
"an email by opening the text chat and typing \"/setemail " +
|
"an email by opening the text chat and typing \"/setemail " +
|
||||||
"[youremail@example.com]\" (do not include the brackets.)\\n\\n";
|
"[youremail@example.com]\" (do not include the brackets.) ";
|
||||||
|
|
||||||
public string EmailEnforcementMessageVerify { get; set; } =
|
public string EmailEnforcementMessageVerify { get; set; } =
|
||||||
"You have set an email address on your account, but you have not " +
|
"You have set an email address on your account, but you have not " +
|
||||||
"verified it. Make sure to check your inbox for a verification email. " +
|
"verified it. Make sure to check your inbox for a verification email. " +
|
||||||
"If you have not received an email, please contact an instance " +
|
"If you have not received an email, please contact an instance " +
|
||||||
"administrator for further assistance.\\n\\n";
|
"administrator for further assistance. ";
|
||||||
|
|
||||||
public override ConfigurationBase<EmailEnforcementConfiguration> Deserialize
|
public override ConfigurationBase<EmailEnforcementConfiguration> Deserialize
|
||||||
(IDeserializer deserializer, string text) =>
|
(IDeserializer deserializer, string text) =>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue