2022-04-30 21:09:11 +02:00
|
|
|
#ifndef CWRAPPERS_H
|
|
|
|
#define CWRAPPERS_H
|
|
|
|
|
2024-01-09 20:30:17 +01:00
|
|
|
#include <SDL_surface.h>
|
2023-11-27 18:09:42 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
Add a system for selecting between wordy/wordy2
Some languages have different spellings of wordy numbers based on the
gender of the things they're counting (uno crewmate versus una trinket)
or what a number's role is in the sentence (e.g. twenta out of twentu).
We've always had the idea we couldn't support such complex differences
though, because the game can't be adapted to know what gender each
object will have and what word classes might exist in other languages,
so translators would in those cases just have to forgo the wordy
numbers and just let the game use "20 out of 20".
A solution we came up semi-recently though (after all translations were
finished except for Arabic), was to allow the translator to define
however many classes of wordy numbers they need, and fill them all out.
This would not need the game to be *adapted* for every language's
specific grammar and word genders/classes. Instead, the translator
would just choose their correct self-defined class at the time they use
`wordy` in the VFormat placeholder. Something like
{n|wordy|class=feminine}, or {n|wordy_feminine}.
So this would benefit several languages, but we came up with the
solution a little late for all languages to benefit from it. The Arabic
translators asked for two separate classes of wordy numbers though, so
my plan is to first just have a second list of wordy numbers
(translation2 in numbers.xml), which can be accessed by passing the
`wordy2` flag to VFormat, instead of `wordy`.
Once 2.4 is released, we can take our time to do it properly. This
would involve the ability for translators to define however many
classes they need, to name them what they want, and this name would
then be useable in VFormat placeholders. We can convert all existing
translations to have one class defined by default, such as "wordy", or
"translation" depending on implementation, but there's not so much
concern for maintaining backwards compatibility here, so we can do a
mass-switchover for all language files. That said, it wouldn't be too
hard to add a special case for "translation" being "wordy" either.
We can then ask translators if they would like to change anything with
the new system in place.
For now, we can use this system for Arabic, maybe Spanish since there
were complaints about uno/una, and *maybe* Dutch (it has a thing where
the number "one" is often capitalized differently, but it's not
mandatory per se)
2024-01-06 04:15:06 +01:00
|
|
|
char* HELP_number_words(int _t, const char* number_class);
|
2022-12-30 23:09:36 +01:00
|
|
|
uint32_t LOC_toupper_ch(uint32_t ch);
|
2024-01-09 20:30:17 +01:00
|
|
|
SDL_Surface* GRAPHICS_tempScreenshot(void);
|
2024-01-08 02:56:26 +01:00
|
|
|
SDL_Surface* GRAPHICS_tempScreenshot2x(void);
|
2024-01-09 20:30:17 +01:00
|
|
|
uint8_t UTIL_TakeScreenshot(SDL_Surface** surface);
|
2024-01-08 02:56:26 +01:00
|
|
|
uint8_t UTIL_UpscaleScreenshot2x(SDL_Surface* src, SDL_Surface** dest);
|
2022-04-30 21:09:11 +02:00
|
|
|
|
2023-11-27 18:09:42 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2022-04-30 21:09:11 +02:00
|
|
|
#endif /* CWRAPPERS_H */
|