Skip to content

Commit

Permalink
[SEMI-MODULAR] RU Job titles (tgstation#343)
Browse files Browse the repository at this point in the history
## About The Pull Request
Перевод названий профессий

## Тесты
* Карта при спавне
* ПДА при спавне
* В крю манифесте
* В мессенджере
* В редакторе карточек
* Прок работает
* Работает в префах
* Работает в лейтжоине
* Работает в синди-карте

<details><summary>Скриншоты</summary>


![Screenshot_3](https://github.com/ss220club/Bandastation/assets/31931237/25515abc-faa7-441c-8ce5-8468d22a32da)

![Screenshot_4](https://github.com/ss220club/Bandastation/assets/31931237/e745ad23-c09a-414b-a260-d93009e62a5d)

![Screenshot_5](https://github.com/ss220club/Bandastation/assets/31931237/7d371ddb-cd1f-4393-9038-49aa0664291a)

</details>

Необходимо в ветке translate внедрять прок job_title_ru(), например у
тех же целей антага.

## Changelog
:cl:
add: Перевод профессий
/:cl:
  • Loading branch information
larentoun authored Jul 11, 2024
1 parent 60cfd5a commit afeadcb
Show file tree
Hide file tree
Showing 13 changed files with 459 additions and 5 deletions.
121 changes: 121 additions & 0 deletions code/__DEFINES/bandastation/ru_jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// Keep this in sync with JOBS_RU from tgui\packages\tgui\bandastation\ru_jobs.tsx
//No department
#define JOB_ASSISTANT_RU "Гражданский"
#define JOB_PRISONER_RU "Заключенный"
//Command
#define JOB_CAPTAIN_RU "Капитан"
#define JOB_HEAD_OF_PERSONNEL_RU "Глава персонала"
#define JOB_HEAD_OF_SECURITY_RU "Глава службы безопасности"
#define JOB_RESEARCH_DIRECTOR_RU "Директор исследований"
#define JOB_CHIEF_ENGINEER_RU "Главный инженер"
#define JOB_CHIEF_MEDICAL_OFFICER_RU "Главный врач"
#define JOB_BRIDGE_ASSISTANT_RU "Bridge Assistant"
#define JOB_VETERAN_ADVISOR_RU "Veteran Security Advisor"
//Silicon
#define JOB_AI_RU "ИИ"
#define JOB_CYBORG_RU "Киборг"
#define JOB_PERSONAL_AI_RU "Персональный ИИ"
#define JOB_HUMAN_AI_RU "Большой брат"
//Security
#define JOB_WARDEN_RU "Смотритель"
#define JOB_DETECTIVE_RU "Детектив"
#define JOB_SECURITY_OFFICER_RU "Офицер"
#define JOB_SECURITY_OFFICER_MEDICAL_RU "Офицер (Медицина)"
#define JOB_SECURITY_OFFICER_ENGINEERING_RU "Офицер (Инженерия)"
#define JOB_SECURITY_OFFICER_SCIENCE_RU "Офицер (Исследование)"
#define JOB_SECURITY_OFFICER_SUPPLY_RU "Офицер (Снабжение)"
//Engineering
#define JOB_STATION_ENGINEER_RU "Станционный инженер"
#define JOB_ATMOSPHERIC_TECHNICIAN_RU "Атмосферный техник"
//Medical
#define JOB_CORONER_RU "Коронер"
#define JOB_MEDICAL_DOCTOR_RU "Врач"
#define JOB_PARAMEDIC_RU "Парамедик"
#define JOB_CHEMIST_RU "Химик"
//Science
#define JOB_SCIENTIST_RU "Ученый"
#define JOB_ROBOTICIST_RU "Робототехник"
#define JOB_GENETICIST_RU "Генетик"
//Supply
#define JOB_QUARTERMASTER_RU "Квартирмейстер"
#define JOB_CARGO_TECHNICIAN_RU "Грузчик"
#define JOB_CARGO_GORILLA_RU "Cargo Gorilla"
#define JOB_SHAFT_MINER_RU "Шахтер"
#define JOB_BITRUNNER_RU "Битраннер"
//Service
#define JOB_BARTENDER_RU "Бармен"
#define JOB_BOTANIST_RU "Ботаник"
#define JOB_COOK_RU "Повар"
#define JOB_CHEF_RU "Шеф"
#define JOB_JANITOR_RU "Уборщик"
#define JOB_CLOWN_RU "Клоун"
#define JOB_MIME_RU "Мим"
#define JOB_CURATOR_RU "Куратор"
#define JOB_LAWYER_RU "Адвокат"
#define JOB_CHAPLAIN_RU "Священник"
#define JOB_PSYCHOLOGIST_RU "Психолог"

GLOBAL_LIST_INIT(job_titles_ru, list(
//No department
JOB_ASSISTANT = JOB_ASSISTANT_RU,
JOB_PRISONER = JOB_PRISONER_RU,
//Command
JOB_CAPTAIN = JOB_CAPTAIN_RU,
JOB_HEAD_OF_PERSONNEL = JOB_HEAD_OF_PERSONNEL_RU,
JOB_HEAD_OF_SECURITY = JOB_HEAD_OF_SECURITY_RU,
JOB_RESEARCH_DIRECTOR = JOB_RESEARCH_DIRECTOR_RU,
JOB_CHIEF_ENGINEER = JOB_CHIEF_ENGINEER_RU,
JOB_CHIEF_MEDICAL_OFFICER = JOB_CHIEF_MEDICAL_OFFICER_RU,
JOB_BRIDGE_ASSISTANT = JOB_BRIDGE_ASSISTANT_RU,
JOB_VETERAN_ADVISOR = JOB_VETERAN_ADVISOR_RU,
//Silicon
JOB_AI = JOB_AI_RU,
JOB_CYBORG = JOB_CYBORG_RU,
JOB_PERSONAL_AI = JOB_PERSONAL_AI_RU,
JOB_HUMAN_AI = JOB_HUMAN_AI_RU,
//Security
JOB_WARDEN = JOB_WARDEN_RU,
JOB_DETECTIVE = JOB_DETECTIVE_RU,
JOB_SECURITY_OFFICER = JOB_SECURITY_OFFICER_RU,
JOB_SECURITY_OFFICER_MEDICAL = JOB_SECURITY_OFFICER_MEDICAL_RU,
JOB_SECURITY_OFFICER_ENGINEERING = JOB_SECURITY_OFFICER_ENGINEERING_RU,
JOB_SECURITY_OFFICER_SCIENCE = JOB_SECURITY_OFFICER_SCIENCE_RU,
JOB_SECURITY_OFFICER_SUPPLY = JOB_SECURITY_OFFICER_SUPPLY_RU,
//Engineering
JOB_STATION_ENGINEER = JOB_STATION_ENGINEER_RU,
JOB_ATMOSPHERIC_TECHNICIAN = JOB_ATMOSPHERIC_TECHNICIAN_RU,
//Medical
JOB_CORONER = JOB_CORONER_RU,
JOB_MEDICAL_DOCTOR = JOB_MEDICAL_DOCTOR_RU,
JOB_PARAMEDIC = JOB_PARAMEDIC_RU,
JOB_CHEMIST = JOB_CHEMIST_RU,
//Science
JOB_SCIENTIST = JOB_SCIENTIST_RU,
JOB_ROBOTICIST = JOB_ROBOTICIST_RU,
JOB_GENETICIST = JOB_GENETICIST_RU,
//Supply
JOB_QUARTERMASTER = JOB_QUARTERMASTER_RU,
JOB_CARGO_TECHNICIAN = JOB_CARGO_TECHNICIAN_RU,
JOB_CARGO_GORILLA = JOB_CARGO_GORILLA_RU,
JOB_SHAFT_MINER = JOB_SHAFT_MINER_RU,
JOB_BITRUNNER = JOB_BITRUNNER_RU,
//Service
JOB_BARTENDER = JOB_BARTENDER_RU,
JOB_BOTANIST = JOB_BOTANIST_RU,
JOB_COOK = JOB_COOK_RU,
JOB_CHEF = JOB_CHEF_RU,
JOB_JANITOR = JOB_JANITOR_RU,
JOB_CLOWN = JOB_CLOWN_RU,
JOB_MIME = JOB_MIME_RU,
JOB_CURATOR = JOB_CURATOR_RU,
JOB_LAWYER = JOB_LAWYER_RU,
JOB_CHAPLAIN = JOB_CHAPLAIN_RU,
JOB_PSYCHOLOGIST = JOB_PSYCHOLOGIST_RU,
))

// Use it ONLY for display!!
/proc/job_title_ru(title)
var/job_ru_title = GLOB.job_titles_ru[title]
if(job_ru_title)
return job_ru_title
return title
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "gunhud/_gunhud.dme"
#include "keybinding/_keybinding.dme"
#include "pixel_shift/_pixel_shift.dme"
#include "ru_jobs/_ru_jobs.dme"
#include "translations/_translations.dme"
#include "tts/_tts.dme"
#include "whitelist220/_whitelist220.dme"
Expand Down
10 changes: 10 additions & 0 deletions modular_bandastation/ru_jobs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PR: https://github.com/ss220club/Bandastation/pull/343

Modified:
- tgui/packages/tgui/interfaces/JobSelection.tsx
- tgui/packages/tgui/interfaces/NtosCrewManifest.jsx
- tgui/packages/tgui/interfaces/PreferencesMenu/JobsPage.tsx

Out-of-module:
- code/__DEFINES/bandastation/ru_jobs.dm
- tgui/packages/tgui/bandastation/ru_jobs.tsx
4 changes: 4 additions & 0 deletions modular_bandastation/ru_jobs/_ru_jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/ru_jobs
name = "RU Jobs"
desc = "Русские названия профессий"
author = "larentoun"
5 changes: 5 additions & 0 deletions modular_bandastation/ru_jobs/_ru_jobs.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "_ru_jobs.dm"

#include "code/ru_id_cards.dm"
#include "code/ru_jobs.dm"
#include "code/ru_pda.dm"
119 changes: 119 additions & 0 deletions modular_bandastation/ru_jobs/code/ru_id_cards.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/datum/id_trim/job/assistant
assignment = JOB_ASSISTANT_RU

/datum/id_trim/job/atmospheric_technician
assignment = JOB_ATMOSPHERIC_TECHNICIAN_RU

/datum/id_trim/job/bartender
assignment = JOB_BARTENDER_RU

/datum/id_trim/job/bitrunner
assignment = JOB_BITRUNNER

/datum/id_trim/job/botanist
assignment = JOB_BOTANIST_RU

/datum/id_trim/job/captain
assignment = JOB_CAPTAIN_RU

/datum/id_trim/job/cargo_technician
assignment = JOB_CARGO_TECHNICIAN_RU

/datum/id_trim/job/chaplain
assignment = JOB_CHAPLAIN_RU

/datum/id_trim/job/chemist
assignment = JOB_CHEMIST_RU

/datum/id_trim/job/chief_engineer
assignment = JOB_CHIEF_ENGINEER_RU

/datum/id_trim/job/chief_medical_officer
assignment = JOB_CHIEF_MEDICAL_OFFICER_RU

/datum/id_trim/job/clown
assignment = JOB_CLOWN_RU

/datum/id_trim/job/cook
assignment = JOB_COOK_RU

/datum/id_trim/job/cook/chef
assignment = JOB_CHEF_RU

/datum/id_trim/job/coroner
assignment = JOB_CORONER_RU

/datum/id_trim/job/curator
assignment = JOB_CURATOR_RU

/datum/id_trim/job/detective
assignment = JOB_DETECTIVE_RU

/datum/id_trim/job/geneticist
assignment = JOB_GENETICIST_RU

/datum/id_trim/job/head_of_personnel
assignment = JOB_HEAD_OF_PERSONNEL_RU

/datum/id_trim/job/head_of_security
assignment = JOB_HEAD_OF_SECURITY_RU

/datum/id_trim/job/janitor
assignment = JOB_JANITOR_RU

/datum/id_trim/job/lawyer
assignment = JOB_LAWYER_RU

/datum/id_trim/job/medical_doctor
assignment = JOB_MEDICAL_DOCTOR_RU

/datum/id_trim/job/mime
assignment = JOB_MIME_RU

/datum/id_trim/job/paramedic
assignment = JOB_PARAMEDIC_RU

/datum/id_trim/job/prisoner
assignment = JOB_PRISONER_RU

/datum/id_trim/job/psychologist
assignment = JOB_PSYCHOLOGIST_RU

/datum/id_trim/job/quartermaster
assignment = JOB_QUARTERMASTER_RU

/datum/id_trim/job/research_director
assignment = JOB_RESEARCH_DIRECTOR_RU

/datum/id_trim/job/roboticist
assignment = JOB_ROBOTICIST_RU

/datum/id_trim/job/scientist
assignment = JOB_SCIENTIST_RU

/datum/id_trim/job/security_officer
assignment = JOB_SECURITY_OFFICER_RU

/datum/id_trim/job/security_officer/supply
assignment = JOB_SECURITY_OFFICER_SUPPLY_RU

/datum/id_trim/job/security_officer/engineering
assignment = JOB_SECURITY_OFFICER_ENGINEERING_RU

/datum/id_trim/job/security_officer/medical
assignment = JOB_SECURITY_OFFICER_MEDICAL_RU

/datum/id_trim/job/security_officer/science
assignment = JOB_SECURITY_OFFICER_SCIENCE_RU

/datum/id_trim/job/shaft_miner
assignment = JOB_SHAFT_MINER_RU

/datum/id_trim/job/station_engineer
assignment = JOB_STATION_ENGINEER_RU

/datum/id_trim/job/warden
assignment = JOB_WARDEN_RU

/datum/id_trim/job/human_ai
assignment = JOB_HUMAN_AI_RU
111 changes: 111 additions & 0 deletions modular_bandastation/ru_jobs/code/ru_jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/datum/job/ai
alternate_titles = list(JOB_AI_RU,)

/datum/job/atmospheric_technician
alternate_titles = list(JOB_ATMOSPHERIC_TECHNICIAN_RU,)

/datum/job/bartender
alternate_titles = list(JOB_BARTENDER_RU,)

/datum/job/botanist
alternate_titles = list(JOB_BOTANIST_RU,)

/datum/job/captain
alternate_titles = list(JOB_CAPTAIN_RU,)

/datum/job/cargo_technician
alternate_titles = list(JOB_CARGO_TECHNICIAN_RU,)

/datum/job/chemist
alternate_titles = list(JOB_CHEMIST_RU,)

/datum/job/chief_engineer
alternate_titles = list(JOB_CHIEF_ENGINEER_RU,)

/datum/job/chief_medical_officer
alternate_titles = list(JOB_CHIEF_MEDICAL_OFFICER_RU,)

/datum/job/clown
alternate_titles = list(JOB_CLOWN_RU,)

/datum/job/cook
alternate_titles = list(
JOB_CHEF,
JOB_COOK_RU,
)

/datum/job/coroner
alternate_titles = list(JOB_CORONER_RU,)

/datum/job/curator
alternate_titles = list(JOB_CURATOR_RU,)

/datum/job/cyborg
alternate_titles = list(JOB_CYBORG_RU,)

/datum/job/detective
alternate_titles = list(JOB_DETECTIVE_RU,)

/datum/job/geneticist
alternate_titles = list(JOB_GENETICIST_RU,)

/datum/job/head_of_personnel
alternate_titles = list(JOB_HEAD_OF_PERSONNEL_RU,)

/datum/job/head_of_security
alternate_titles = list(JOB_HEAD_OF_SECURITY_RU,)

/datum/job/janitor
alternate_titles = list(JOB_JANITOR_RU,)

/datum/job/lawyer
alternate_titles = list(JOB_LAWYER_RU,)

/datum/job/doctor
alternate_titles = list(JOB_MEDICAL_DOCTOR_RU,)

/datum/job/mime
alternate_titles = list(JOB_MIME_RU,)

/datum/job/paramedic
alternate_titles = list(JOB_PARAMEDIC_RU,)

/datum/job/prisoner
alternate_titles = list(JOB_PRISONER_RU,)

/datum/job/psychologist
alternate_titles = list(JOB_PSYCHOLOGIST_RU,)

/datum/job/quartermaster
alternate_titles = list(JOB_QUARTERMASTER_RU,)

/datum/job/research_director
alternate_titles = list(JOB_RESEARCH_DIRECTOR_RU,)

/datum/job/roboticist
alternate_titles = list(JOB_ROBOTICIST_RU,)

/datum/job/scientist
alternate_titles = list(JOB_SCIENTIST_RU,)

/datum/job/security_officer
alternate_titles = list(
JOB_SECURITY_OFFICER_MEDICAL,
JOB_SECURITY_OFFICER_ENGINEERING,
JOB_SECURITY_OFFICER_SUPPLY,
JOB_SECURITY_OFFICER_SCIENCE,
JOB_SECURITY_OFFICER_RU,
JOB_SECURITY_OFFICER_MEDICAL_RU,
JOB_SECURITY_OFFICER_ENGINEERING_RU,
JOB_SECURITY_OFFICER_SUPPLY_RU,
JOB_SECURITY_OFFICER_SCIENCE_RU,
)

/datum/job/shaft_miner
alternate_titles = list(JOB_SHAFT_MINER_RU,)

/datum/job/station_engineer
alternate_titles = list(JOB_STATION_ENGINEER_RU,)

/datum/job/warden
alternate_titles = list(JOB_WARDEN_RU,)
10 changes: 10 additions & 0 deletions modular_bandastation/ru_jobs/code/ru_pda.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Update PDA name
/datum/outfit/job/post_equip(mob/living/carbon/human/equipped, visualsOnly)
. = ..()
var/obj/item/modular_computer/pda/pda = equipped.get_item_by_slot(pda_slot)
if(!istype(pda))
return
var/obj/item/card/id/card = equipped.wear_id
if(!istype(card))
return
pda.imprint_id(equipped.real_name, card.get_trim_assignment())
Loading

0 comments on commit afeadcb

Please sign in to comment.