Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ternary usage from ru jobs #349

Merged
merged 4 commits into from
Jul 12, 2024
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
10 changes: 3 additions & 7 deletions tgui/packages/tgui/interfaces/JobSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ export const JobEntry = (data: {
<>
{jobIcon && <Icon name={jobIcon} />}
{job.command ? (
<b>{JOBS_RU[jobName] ? JOBS_RU[jobName] : jobName}</b>
) : JOBS_RU[jobName] ? (
JOBS_RU[jobName]
<b>{JOBS_RU[jobName] || jobName}</b>
) : (
jobName
JOBS_RU[jobName] || jobName
)}
<span
style={{
Expand Down Expand Up @@ -150,9 +148,7 @@ export const JobSelection = (props) => {
<StyleableSection
title={
<>
{DEPARTMENTS_RU[departmentName]
? DEPARTMENTS_RU[departmentName]
: departmentName}
{DEPARTMENTS_RU[departmentName] || departmentName}
<span
style={{
fontSize: '1rem',
Expand Down
6 changes: 1 addition & 5 deletions tgui/packages/tgui/interfaces/NtosCrewManifest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ export const NtosCrewManifest = (props) => {
<Section
key={department}
level={2}
title={
DEPARTMENTS_RU[department]
? DEPARTMENTS_RU[department]
: department
}
title={DEPARTMENTS_RU[department] || department}
>
<Table>
{entries.map((entry) => (
Expand Down
4 changes: 2 additions & 2 deletions tgui/packages/tgui/interfaces/PreferencesMenu/JobsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const JobRow = (props: { className?: string; job: Job; name: string }) => {
paddingLeft: '0.3em',
}}
>
{JOBS_RU[name] ? JOBS_RU[name] : name}
{JOBS_RU[name] || name}
</Stack.Item>
</Tooltip>

Expand Down Expand Up @@ -318,7 +318,7 @@ const JoblessRoleDropdown = (props) => {

const options = [
{
displayText: `Присоединиться за ${JOBS_RU[data.overflow_role] ? JOBS_RU[data.overflow_role] : data.overflow_role} если не удалось войти`,
displayText: `Присоединиться за ${JOBS_RU[data.overflow_role] || data.overflow_role} если не удалось войти`,
value: JoblessRole.BeOverflow,
},
{
Expand Down
Loading