Skip to content

Commit

Permalink
Update structure.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-prog committed Jul 16, 2024
1 parent 5bc6653 commit 35877d3
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions core/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, _list: list, idx: int):
}
self.cur_college_crs_check = 0
self.res_comments_check = 0
self.ref_check = 0

def error_handler(self, markdown: str, text: str) -> None:
"""Class error handler for missing translations found at any given
Expand Down Expand Up @@ -100,6 +101,7 @@ def translate(self) -> list:
'GS': None,
'SBT': None,
'SRE': None,
'LT': self.translate_LT()
}

result = _translate.get(self.target[0], 'Other')
Expand Down Expand Up @@ -426,7 +428,8 @@ def translate_N1(self) -> str:
_translate = {
'TM': 'ApplyTexas Appication',
'AT': 'Date',
'HS': 'High School Info:'
'HS': 'High School Info:',
'BU': 'Organization'
}

sep = _translate.get(self.target[1], "Other")
Expand All @@ -438,6 +441,8 @@ def translate_N1(self) -> str:
return f'{sep}: {self.target[2]} {last}'
elif sep == 'Date':
return f'{sep}: {last}'
elif sep == 'Organization':
return f'{sep}: {last}'
else:
return f'{sep}'

Expand Down Expand Up @@ -870,4 +875,14 @@ def translate_TST(self) -> list:
_list.append(f'Checked -- Date taken/plan to take: {self.target[-1][4:]}/{self.target[-1][:4]}')

return _list.append('')


def translate_LT(self) -> list:

if self.target[0] != 'LT':
return

if self.ref_check == 0:
self.ref_check = 1
return ['3. References:', '', f'Name: {self.target[3]}', f'Position: {self.target[4]}']

return ['', f'Name: {self.target[3]}', f'Position: {self.target[4]}']

0 comments on commit 35877d3

Please sign in to comment.