Anders Jenbo
f1efc205ff
Add support for Romanian plural forms
4 years ago
Anders Jenbo
3b229a8275
Check for translation in the same place as they are loaded from
4 years ago
Gleb Mazovetskiy
3448eab2d3
Translations: Restore support for ".mo" files
...
Note that they now need to go into the "assets/" subdirectory of the
build directory.
4 years ago
Gleb Mazovetskiy
5e675dcd6a
Handle translations like other assets
...
Load translations from the MPQ or the assets directory, same as we do
with other DevilutionX assets.
4 years ago
Anders Jenbo
f77d0b3665
Close translation-file handler
4 years ago
Anders Jenbo
d88a8f401f
Fix parsing of translation file header
4 years ago
Anders Jenbo
dd5ec18ca7
Remove dead code from translation parser
4 years ago
Anders Jenbo
af046864de
Properly handle plural forms for Czech and Polish
4 years ago
Anders Jenbo
704a04ae4d
Add support for Unicode fonts
5 years ago
Anders Jenbo
671fdbd125
Implement contextural translation (pgettext)
...
Fixes #2369
Fixes #2790
5 years ago
Anders Jenbo
370e573209
Prefer test versions of translations
5 years ago
Ivan Epifanov
cf5ab583d5
Open translations as read-only
5 years ago
Anders Jenbo
d523fc1e81
Cleanups
5 years ago
Anders Jenbo
01f66d7f73
[android] Implement loading translations from assets
5 years ago
Anders Jenbo
5c2a559487
Get default langauge
5 years ago
Anders Jenbo
372b1dcba2
Clang-tidy: readability-identifier-naming.MemberCase: camelBack
5 years ago
Gleb Mazovetskiy
6a27b37d62
Windows: Handle Unicode paths in language.cpp
5 years ago
Anders Jenbo
3f891a4333
🌐 Correctly handle two more plural translation
5 years ago
Gleb Mazovetskiy
f33f7ae7eb
💨 Do not zero-initalize arrays we write to
...
`std::make_unique<T[]>(size)` always zero-initalizes the array.
C++20 has `std::make_unique_for_overwrite` to avoid that, while
older C++ versions can use the approach applied here.
5 years ago
Anders Jenbo
b177f77d21
🎨 Cleanup language.cpp
5 years ago
Anders Jenbo
18f3a0c5ea
✨ Support for plural forms in translations
...
The implementation isn't robust, dynamic or pretty, but works for now.
5 years ago
Anders Jenbo
34eecd6dac
🐛 Fix handeling of mo-file header
5 years ago
Gleb Mazovetskiy
979bedb8c2
🐞 Fix memory leaks in utils/language.{h,cpp}
...
This is a minimal refactoring to fix the memory leaks which have made
reading debug output impossible.
5 years ago
Gleb Mazovetskiy
c025bf6050
🎨 Fix line endings in utils/language.{h,cpp}
5 years ago
Anders Jenbo
e3526a5ff6
🌐 Convert all src to UTF8
5 years ago
Jmgr
d4f62870b8
Remove globals from paths.h
...
Fix for Vita
Update to use free functions
Use std::optional to allow setting empty paths
Change header inclusion order
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Use std::optional to allow setting empty paths
Apply clang-format
Temporary commit
5 years ago
John Törnblom
102ee9ead1
convert utf8 language strings to latin1
5 years ago
John Törnblom
30db9e7dd0
trim strings from language metadata
5 years ago
John Törnblom
9c61baea9f
parse translation metadata
5 years ago
John Törnblom
0be36898b9
ensure translations are null-terminated
5 years ago
Anders Jenbo
32117dc73b
🔧 Create translation template and update translations
5 years ago
John Törnblom
51e7a169a6
add initial language support using a simple MO parser
5 years ago