mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
fix: detect invalid 0-length translations
This commit is contained in:
1 parent
836cf69f01
commit
f7c562f8b6
3 files changed
+4
-2
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "blitzkit",
|
||||
"private": true,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||
"type": "module",
|
||||
"types": "./types.d.ts",
|
||||
|
||||
@@ -15,7 +15,8 @@ export function localizationObject(
|
||||
(localizations, locale) => {
|
||||
const { strings } = translator(locale);
|
||||
const translation = literalsFunc(path(strings), literals);
|
||||
const isValid = !strict || validNameRegex.test(translation);
|
||||
const isValid =
|
||||
(!strict || validNameRegex.test(translation)) && translation.length > 0;
|
||||
|
||||
if (!isValid) {
|
||||
console.warn(
|
||||
|
||||
Submodule
+1
Submodule submodules/CUE4Parse added at 624e07c8c3.
Reference in new issue
Block a user