Skip to content

Commit

Permalink
Display warning for long lang strings
Browse files Browse the repository at this point in the history
  • Loading branch information
3urobeat committed May 6, 2023
1 parent 8d0bdea commit b2a66c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dataManager/dataCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 09.07.2021 16:26:00
* Author: 3urobeat
*
* Last Modified: 05.05.2023 14:37:26
* Last Modified: 06.05.2023 11:11:17
* Modified By: 3urobeat
*
* Copyright (c) 2023 3urobeat <https://github.com/HerrEurobeat>
Expand Down Expand Up @@ -116,6 +116,13 @@ DataManager.prototype.checkData = function() {
}


// Check language for too long strings and display warning. This will of course not catch replacements that happen at runtime but it's better than nothing
Object.keys(this.lang).forEach((e) => {
let val = this.lang[e];
if (val.length > 500) logger("warn", `Your language string '${e}' is ${val.length} chars long! This will likely cause chat messages to get blocked by Steam. I'd recommend cutting it to less than 500 chars.`, true);
});


global.checkm8="b754jfJNgZWGnzogvl<rsHGTR4e368essegs9<";

// Check if owner link is correct
Expand Down

0 comments on commit b2a66c3

Please sign in to comment.