mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +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",
|
"name": "blitzkit",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.27.3",
|
"version": "1.27.4",
|
||||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "./types.d.ts",
|
"types": "./types.d.ts",
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ export function localizationObject(
|
|||||||
(localizations, locale) => {
|
(localizations, locale) => {
|
||||||
const { strings } = translator(locale);
|
const { strings } = translator(locale);
|
||||||
const translation = literalsFunc(path(strings), literals);
|
const translation = literalsFunc(path(strings), literals);
|
||||||
const isValid = !strict || validNameRegex.test(translation);
|
const isValid =
|
||||||
|
(!strict || validNameRegex.test(translation)) && translation.length > 0;
|
||||||
|
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
console.warn(
|
console.warn(
|
||||||
|
|||||||
Submodule
+1
Submodule submodules/CUE4Parse added at 624e07c8c3.
Reference in new issue
Block a user