def translate_room(room):
    translations = {
        "room": lambda parts: f"B{parts[1]}0{parts[2]}",
        "dormitory": lambda parts: f"{parts[1]}层宿舍",
        "contact": lambda parts: "办公室",
        "central": lambda parts: "控制中枢",
        "factory": lambda parts: "加工站",
        "meeting": lambda parts: "会客室",
    }

    for keyword, translation_func in translations.items():
        if keyword in room:
            parts = room.split("_")
            return translation_func(parts)

    return room
