<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Description
This pull request introduces a complete Russian translation for ImHex,
ensuring that Russian-speaking users can navigate and utilize the
software in their native language. The translation covers all user
interface elements, menus, dialogs, and messages, providing a seamless
experience for Russian users.
### Testing
The translation has been thoroughly tested to ensure accuracy and
completeness. All translated text has been reviewed for grammatical
correctness and contextual appropriateness.
### Screenshots
![image](https://github.com/user-attachments/assets/455ca03d-0b33-45d2-9ed5-ddb404bd0728)
![image](https://github.com/user-attachments/assets/a7ebdb40-806f-43d9-ab36-deea730505c1)
![image](https://github.com/user-attachments/assets/29c5d21b-7443-4751-9129-e5fa054066d3)
Co-authored-by: Lemon4ksan <senya20151718@gmail.com>
### Problem description
This PR addresses issue #2013 that described a cluttered Event Manager.
This is a DX issue and should not impact the users whatsoever.
### Implementation description
The changes revolve around three main points:
1. the Event Manager (`event_manager.hpp`) was split into four
categories: GUI, Interaction, Lifecycle, and Provider, and two types:
Events, and Requests. This results in the following files:
- `events_gui.hpp`
- `events_interaction.hpp`
- `events_lifecycle.hpp`
- `events_provider.hpp`
- `requests_gui.hpp`
- `requests_interaction.hpp`
- `requests_lifecycle.hpp`
- `requests_provider.hpp`
2. Every event and request now has its own piece of documentation, with
a `@brief`, accompanied by a longer comment if needed, and gets its
`@param`s described.
3. The old `event_manager.hpp` import was removed and replaced by the
correct imports wherever needed, as to reduce spread of those files only
to where they are truly useful.
### Additional things
The commits have been split into (chrono-)logical steps:
- `feat`: split the Event Manager, and replace the imports
- `refactor`, `chore`: make various small changes to match the required
structure
- `docs`: add documentation for events and requests
Hopefully, this will help to review the PR.
*Note: Beware of very long rebuild times in between the commits, use
them sparingly! The Actions will ensure this PR builds anyways*
Closes#2013
---------
Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
Co-authored-by: Nik <werwolv98@gmail.com>
### Problem description
As described in issue #1841, there was a duplicate on the `Chinese
(Simplified)` translation.
After closer inspection, this came from an i18n file (Script loader,
specifically) having a bad ISO code (`zh_CN` instead of the expected
`zh-CN`).
This also caused a big impact on end users, as loading the latter
(`zh_CN`) would cause the whole UI to be displayed in English (the
fallback language), and only the script loader being translated into
Chinese.
### Implementation description
Fixed the i18n code in the Script loader file.
### Additional things
Closes issue #1841
Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
std::forward ensures that the arguments are perfectly forwarded to
loadScript
By reserving space in the features vector based on the size of scripts,
we can avoid multiple memory allocations during the loop. If an
exception occurs, returning an empty vector immediately clarifies that
no scripts were loaded. Without reservation, each call to emplace_back
could potentially trigger a reallocation if the current capacity is
exceeded, which is costly in terms of performance. This leads to more
efficient memory management and can significantly speed up the execution
time when dealing with a large number of scripts.
![image](https://github.com/user-attachments/assets/3e290162-fb8b-4f00-a71b-6009494b2dab)
### Problem description
ImHex didn't support Hungarian :(
### Implementation description
I translated ImHex to Hungarian :)
### Translation Coverage
| Plugin | Percentage |
|---------------|------------|
| builtin | 99% |
| diffing | 100% |
| disassembler | 100% |
| hashes | 95% |
| script_loader | 100% |
| ui | 100% |
| visualizers | 100% |
| windows | 100% |
| yara_rules | 100% |
### Additional Notes
There are four Hungarian "special" characters that fall outside the
default Unicode ranges loaded by ImHex, resulting in them being replaced
with the "�" character. These letters are Ő (U+0150), ő (U+0151), Ű
(U+0170) and ű (U+0171), all included in the Latin Extended-A Unicode
block.
The easy fix for this is to include the "Unicode Latin Extended-A" range
when loading the font glyphs in
[init_tasks.cpp:189](99abc4e78a/plugins/builtin/source/content/init_tasks.cpp (L189)).
This change would also unlock the full character range of Bosnian,
Croatian, Czech, Estonian, Latvian, Lithuanian, Maltese, Polish,
Romanian, Slovak, Slovene and Turkish. I can add the commit to this PR
if maintainers are okay with it. **EDIT:** Added a commit that loads
Latin Extended-A by default.
Also note that some words are longer than their English counterparts,
resulting in certain UI labels overflowing from their parent containers,
and being cut off. I might change some of the longer labels to be more
compact in the future, but the container size limitations will have to
be addressed eventually (e.g. with horizontal scrollbars).
---------
Co-authored-by: Nik <werwolv98@gmail.com>
- Better argument parsing
- Allow processing all language folders at the same time
- Allow an optional reference language when translating
- Save translations on KeyboardInterrupt
- Fixes a ooold input issues by importing readline
(https://github.com/kovidgoyal/kitty/issues/6560)
- Add untranslate mode to remove translations by a key regex
---------
Co-authored-by: Nik <werwolv98@gmail.com>