Freeciv-3.2
|
Go to the source code of this file.
Macros | |
#define | _(String) (String) |
#define | DG_(domain, String) (String) |
#define | N_(String) String |
#define | Q_(String) skip_intl_qualifier_prefix(String) |
#define | PL_(String1, String2, n) ((n) == 1 ? (String1) : (String2)) |
#define | C_(String) capitalized_string(String) |
#define | R__(String) (String) |
#define | RQ_(String) skip_intl_qualifier_prefix(String) |
#define | textdomain(Domain) |
#define | bindtextdomain(Package, Directory) |
#define | Qn_(String) skip_intl_qualifier_prefix(String) |
Functions | |
const char * | skip_intl_qualifier_prefix (const char *str) fc__attribute((__format_arg__(1))) |
char * | capitalized_string (const char *str) |
void | free_capitalized (char *str) |
void | capitalization_opt_in (bool opt_in) |
bool | is_capitalization_enabled (void) |
const char * | get_locale_dir (void) |
This function tries to capitalize first letter of the string. Currently this handles just single byte UTF-8 characters, since those are same as ASCII.
Definition at line 66 of file fcintl.c.
Referenced by package_event_full().
Free capitalized string.
Definition at line 85 of file fcintl.c.
Referenced by package_event_full().
Return directory containing locales. In a rare cases this can be a relative path, but it tries to return absolute path when ever possible.
Definition at line 111 of file fcintl.c.
Referenced by client_main(), init_nls(), main(), srv_init(), and switch_lang().
Automatic capitalization features requested.
Definition at line 101 of file fcintl.c.
Referenced by package_event_full().
Some strings are ambiguous for translation. For example, "Game" is something you play (like Freeciv!) or animals that can be hunted. To distinguish strings for translation, we qualify them with a prefix string of the form "?qualifier:". So, the above two cases might be: "Game" – when used as meaning something you play "?animals:Game" – when used as animals to be hunted Notice that only the second is qualified; the first is processed in the normal gettext() manner (as at most one ambiguous string can be).
This function tests for, and removes if found, the qualifier prefix part of a string.
This function is called by the Q_() macro and specenum. If used in the Q_() macro it should, if NLS is enabled, have called gettext() to get the argument to pass to this function. Specenum use it untranslated.
Definition at line 48 of file fcintl.c.
Referenced by help_widget::anchor_clicked(), get_tooltip_improvement(), help_hyperlink_callback(), help_update_improvement(), help_update_unit_type(), help_update_wonder(), names_set(), and save_name_translation().