Anders Jenbo
d11eeaa9ec
Log uninplemented plural expressions ( #4017 )
4 years ago
ephphatha
6a1091ce09
Rename Korean/Romanian translation files so they are used in fallback resolution
4 years ago
Andrew James
e1d01aad7c
Replace en_US code with en when searching for user preferred languages ( #3859 )
4 years ago
Gleb Mazovetskiy
02902e5188
language.cpp: Fix -Wwrite-strings
4 years ago
ephphatha
a1652bd5d6
Interleave non-regional fallback locales after last regional variation
4 years ago
ephphatha
c0ec4a845a
Restore fallback for non-regional translation
...
Also adds an explicit check for en given this the base translation for the application and will never have a .mo/.gmo file.
4 years ago
Gleb Mazovetskiy
a4bc8fea7d
Fix warnings: `-Wsign-compare`, `-Wnarrowing`
4 years ago
obligaron
945ee04f62
Add OptionEntry Language
4 years ago
obligaron
0ac065dbaa
Make LanguageInitialize() reentry capable
4 years ago
Gleb Mazovetskiy
c57644970f
Move `UiFlags` and `UiPanels` into their own files
...
The first breaks circular dependency between `DiabloUI` and `text_render`.
The latter one moves `UiPanels` to a more appropriate place.
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Gleb Mazovetskiy
4f64b87330
Fix talk/store text overlap for Chinese and Japanese
...
We ensure that selectable lines are placed at the same vertical
coordinates but space out unselectable text lines at the cost
of reduced heigh of empty space between the store items.
We also have to move the back button in scrollable lists to the
lower right.
This can definitely be improved further but at least it solves
the problem for now.
Refs #3162
4 years ago
Gleb Mazovetskiy
fa90679416
game_assets.* -> assets.*
4 years ago
Gleb Mazovetskiy
3d308983a8
Migrate to libmpq
...
libmpq is a much simpler alternative to StormLib for reading MPQ archives.
We use our own fork of libmpq: https://github.com/diasurgical/libmpq
Impact:
* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
4 years ago
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