Skip to content

Repository files navigation

CSSLoader-Mappings

Internal css mappings to translate css from older Steam clients to new ones

Format:

{
"id": [
"1",
"2",
"3"
]
}
  • id: A randomly generated uuid. Currently serves no use.
  • 1,2,3: The Steam classnames to map. All previous entries in the list will be mapped to the latest entry in the list.

Updating translations (Webpack)

// There are three localization classes, ranging from 1000-8000 keys of UI stringsconstwithoutLocalizationClasses=DFL.classMap.filter((module)=>Object.keys(module).length<1000)constallClasses=withoutLocalizationClasses.map((module)=>{letfilteredModule={}Object.entries(module).forEach(([propertyName,value])=>{// Filter out things that start with a number (eg: Breakpoints like 800px)// I have confirmed the new classes don't start with numbersif(isNaN(value.charAt(0))){filteredModule[propertyName]=value;}})returnfilteredModule;}).filter((module)=>{// Some modules will be empty after the filtering, remove thosereturnObject.keys(module).length>0;});constmappings=allClasses.reduce((acc,cur)=>{Object.entries(cur).forEach(([property,value])=>{if(acc[property]){acc[property].push(value)}else{acc[property]=[value]}})returnacc},{})
  • webpack_mappings.py

About

Internal css mappings to translate css from older Steam clients to new ones

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages