Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions src/database/services/useBuildingData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { computed } from "vue";
import { i18n } from "@/lib/i18n";
import type { Composer } from "vue-i18n";

import { useDB } from "@/database/composables/useDB";
import { recipesStore, buildingsStore } from "@/database/stores";
Expand Down Expand Up @@ -38,6 +40,8 @@ export async function useBuildingData() {
preload: preloadRecipes,
} = useDB(recipesStore);

const { t } = i18n.global as unknown as Composer;

const { getPlanetSpecialMaterials } = usePlanetData();
const { combineMaterialIOMinimal } = await useMaterialIOUtil();
const { calculateWorkforceConsumption } = await useWorkforceCalculation();
Expand Down Expand Up @@ -105,19 +109,7 @@ export async function useBuildingData() {

options.push({
value: building.building_ticker,
label:
building.building_ticker +
" (" +
building.building_name
.replace(/([A-Z])/g, " $1")
.trim()
.charAt(0)
.toUpperCase() +
building.building_name
.replace(/([A-Z])/g, " $1")
.trim()
.slice(1) +
")",
label: `${building.building_ticker} (${t(`game.building.${building.building_ticker}`)})`,
});
}
});
Expand Down
90 changes: 90 additions & 0 deletions src/locales/en_US/game.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,96 @@
"METALLURGY": "Metallurgy",
"RESOURCE_EXTRACTION": "Resource Extraction"
},
"building": {
"4DA": "4D Arcades",
"AAF": "Advanced Appliances Factory",
"ACA": "Art Café",
"ADM": "Administration Center",
"AML": "Advanced Material Lab",
"APF": "Appliances Factory",
"ART": "Art Gallery",
"ASM": "High-Power Blast Furnace",
"BMP": "Basic Materials Plant",
"CFL": "Corporation FTL Laboratory",
"CHP": "Chemical Plant",
"CIM": "Corporate Immortality Center",
"CLF": "Textile Manufacturing",
"CLR": "Cleanroom",
"CM": "Core Module",
"COG": "Chamber of Global Commerce",
"COL": "Collector",
"COR": "Corporation Headquarters",
"CRC": "APEX Representation Center",
"CTE": "Corporate Terraformer",
"DRS": "Drone Shop",
"ECA": "Energy Component Assembly",
"EDM": "Electronic Device Manufactory",
"EEP": "Einsteinium Enrichment",
"ELP": "Electronics Plant",
"EMC": "Emergency Center",
"EXT": "Extractor",
"FER": "Fermenter",
"FP": "Food Processor",
"FRM": "Farmstead",
"FS": "Metalist Studio",
"GF": "Glass Furnace",
"HB1": "Pioneer Habitation",
"HB2": "Settler Habitation",
"HB3": "Technician Habitation",
"HB4": "Engineer Habitation",
"HB5": "Scientist Habitation",
"HBB": "Barracks",
"HBC": "Communal Abode",
"HBL": "Luxury Residence",
"HBM": "Management Domicile",
"HOS": "Hospital",
"HWP": "Hull Welding Plant",
"HYF": "Hydroponics Farm",
"INC": "Incinerator",
"INF": "Infirmary",
"IVP": "In-Vitro Plant",
"LAB": "Laboratory",
"LIB": "Library",
"LM": "Local Market",
"MCA": "Medium Components Assembly",
"ORC": "Orchard",
"PAC": "Packaging Center",
"PAR": "Wildlife Park",
"PBH": "Planetary Broadcasting Hub",
"PHF": "Pharma Factory",
"POL": "Polymer Plant",
"PP1": "Prefab Plant MK1",
"PP2": "Prefab Plant MK2",
"PP3": "Prefab Plant MK3",
"PP4": "Prefab Plant MK4",
"PPF": "3D Printer",
"PSY": "Planetary Shipyard",
"PWH": "Planetary Warehouse",
"REF": "Refinery",
"RIG": "Rig",
"SCA": "Small Components Assembly",
"SD": "Software Development",
"SDP": "Security Drone Post",
"SE": "Software Engineering",
"SKF": "Ship Kit Factory",
"SL": "Software Labs",
"SME": "Smelter",
"SPF": "Spacecraft Propulsion Factory",
"SPP": "Spacecraft Prefab Planet",
"SST": "Safety Station",
"STA": "Auxiliary Storage",
"STE": "Expansive Storage",
"STO": "Storage Facility",
"STV": "Volume Storage",
"STW": "Weight Storage",
"TNP": "Technetium Processing",
"UNI": "University",
"UPF": "Unit Prefab Plant",
"VRT": "VR Theater",
"WCE": "Wellness Center",
"WEL": "Welding Plant",
"WPL": "Weaving Plant"
},
"cogc_program": {
"Invalid": "Invalid",
"NONE": "None",
Expand Down
Loading