mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
fix(i18n): mark style labels without loading the catalogs (#1421)
The style shaders and visualPresets imported msg() from src/i18n/index.js, which loads every locale catalog. The share-view codec reads the styles' defaults, so a server bundling the codec carried about 0.9 MB of translations it never uses. They now import the catalog-free marker, as other portable modules do; the codec's bundle drops from about 1 MB to 130 KB.
This commit is contained in:
1 parent
6152f9f311
commit
15de9d738c
9 files changed
+13
-17
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
- The visual styles and their presets mark their labels with the catalog-free
|
||||||
|
`msg()`, so the share-link codec, and any server that loads it, no longer
|
||||||
|
bundles every translation catalog (about 0.9 MB) (samehkhamis, #1421).
|
||||||
@@ -463,11 +463,7 @@
|
|||||||
"src/styles/anime.js",
|
"src/styles/anime.js",
|
||||||
"src/styles/noir.js",
|
"src/styles/noir.js",
|
||||||
"src/styles/snow.js",
|
"src/styles/snow.js",
|
||||||
"src/i18n/index.js",
|
"src/i18n/marker.js"
|
||||||
"src/i18n/locale.js",
|
|
||||||
"src/i18n/locales/es.json",
|
|
||||||
"src/i18n/locales/ru.json",
|
|
||||||
"src/i18n/locales/zh-CN.json"
|
|
||||||
],
|
],
|
||||||
"external": ["cesium"]
|
"external": ["cesium"]
|
||||||
},
|
},
|
||||||
@@ -3330,6 +3326,7 @@
|
|||||||
"src/ui/visualPresets.js",
|
"src/ui/visualPresets.js",
|
||||||
"src/ui/visualSettings.js",
|
"src/ui/visualSettings.js",
|
||||||
"src/ui/segmentedControl.js",
|
"src/ui/segmentedControl.js",
|
||||||
|
"src/i18n/marker.js",
|
||||||
"src/i18n/index.js",
|
"src/i18n/index.js",
|
||||||
"src/i18n/locale.js",
|
"src/i18n/locale.js",
|
||||||
"src/i18n/locales/es.json",
|
"src/i18n/locales/es.json",
|
||||||
@@ -3907,11 +3904,7 @@
|
|||||||
"src/data/idSwitches.js",
|
"src/data/idSwitches.js",
|
||||||
"src/data/detectionPolicy.js",
|
"src/data/detectionPolicy.js",
|
||||||
"src/scopeMaskPolicy.js",
|
"src/scopeMaskPolicy.js",
|
||||||
"src/i18n/index.js",
|
"src/i18n/marker.js"
|
||||||
"src/i18n/locale.js",
|
|
||||||
"src/i18n/locales/es.json",
|
|
||||||
"src/i18n/locales/ru.json",
|
|
||||||
"src/i18n/locales/zh-CN.json"
|
|
||||||
],
|
],
|
||||||
"external": []
|
"external": []
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Anime / Studio Ghibli Style — Cel-shading + Saturation boost
|
* Anime / Studio Ghibli Style — Cel-shading + Saturation boost
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Noir Style — Desaturation + High Contrast + Vignette
|
* Noir Style — Desaturation + High Contrast + Vignette
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CRT Terminal — Dynamic CRT Monitor Aesthetic
|
* CRT Terminal — Dynamic CRT Monitor Aesthetic
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Snow Style — White overlay + Desaturation + Falling particles
|
* Snow Style — White overlay + Desaturation + Falling particles
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Night Vision / NVG — PVS-14 Image Intensifier Emulation
|
* Night Vision / NVG — PVS-14 Image Intensifier Emulation
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FLIR — Forward Looking Infrared
|
* FLIR — Forward Looking Infrared
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { snowShader } from '../styles/snow.js';
|
|||||||
import { nightVisionShader } from '../styles/surveillance.js';
|
import { nightVisionShader } from '../styles/surveillance.js';
|
||||||
import { thermalShader } from '../styles/thermal.js';
|
import { thermalShader } from '../styles/thermal.js';
|
||||||
import { BLOOM_INTENSITY_DEFAULT } from '../bloom.js';
|
import { BLOOM_INTENSITY_DEFAULT } from '../bloom.js';
|
||||||
import { msg } from '../i18n/index.js';
|
import { msg } from '../i18n/marker.js';
|
||||||
|
|
||||||
/** Duration (ms) for shader intensity crossfade between style presets. */
|
/** Duration (ms) for shader intensity crossfade between style presets. */
|
||||||
export const TRANSITION_DURATION_MS = 500;
|
export const TRANSITION_DURATION_MS = 500;
|
||||||
|
|||||||
Reference in new issue
Block a user