This pull request updates the map data source and the components and scripts that depend on it. It improves the translation quality, the room availability logic, and the code style and performance. It also fixes some minor UI and bug issues. The main files affected are RoomMap.jsx, api-translations.json, thi-translator.py, and rooms/index.jsx.
We're the masters of the map, we update the data sourceWe refactor and we fix, we code with skill and forceWe translate the room functions, we make them clear and loudWe're the masters of the map, we make the users proud
Walkthrough
Update map data source to version 2.4 and use Funktion_de property for German room functions (link, link, link, link)
Simplify and optimize translate_room_functions method in thi-translator.py to use local map data file instead of fetching and translating data from URL (link)
Fix bug in translate_lecturer_organizations method in thi-translator.py to use items instead of values when zipping dictionaries (link)
Refactor room availability logic to a separate custom hook useRoomAvailability and remove loadRoomAvailability function call from useEffect hook in RoomMap.jsx (link)
Add missing and remove redundant translations for room functions in api-translations.json files (link, link, link, link, link, link, link)
Improve user interface by conditionally rendering comma before room function in renderRoom function in RoomMap.jsx (link)
Add timeout parameter to requests.post calls in thi-translator.py to improve robustness and performance (link, link, link)
Reorder and group import statements in thi-translator.py according to PEP 8 style guide (link)
Add docstring and use from e syntax when raising ValueError in __check_deepL method in thi-translator.py (link)
Use maxsplit parameter in split method in __translate method in thi-translator.py to improve efficiency and correctness (link)
Remove save_file method and move file saving logic to export_files method in thi-translator.py (link, link)
Closes #366
π€[deprecated] Generated by Copilot at c91bcc3
Summary
πΊοΈπ£π
This pull request updates the map data source and the components and scripts that depend on it. It improves the translation quality, the room availability logic, and the code style and performance. It also fixes some minor UI and bug issues. The main files affected are
RoomMap.jsx
,api-translations.json
,thi-translator.py
, androoms/index.jsx
.Walkthrough
Funktion_de
property for German room functions (link, link, link, link)translate_room_functions
method inthi-translator.py
to use local map data file instead of fetching and translating data from URL (link)translate_lecturer_organizations
method inthi-translator.py
to useitems
instead ofvalues
when zipping dictionaries (link)useRoomAvailability
and removeloadRoomAvailability
function call fromuseEffect
hook inRoomMap.jsx
(link)api-translations.json
files (link, link, link, link, link, link, link)renderRoom
function inRoomMap.jsx
(link)timeout
parameter torequests.post
calls inthi-translator.py
to improve robustness and performance (link, link, link)thi-translator.py
according to PEP 8 style guide (link)from e
syntax when raisingValueError
in__check_deepL
method inthi-translator.py
(link)maxsplit
parameter insplit
method in__translate
method inthi-translator.py
to improve efficiency and correctness (link)save_file
method and move file saving logic toexport_files
method inthi-translator.py
(link, link)