Freeciv-3.2: /fast/freeciv/nightly/S3_2/common/name_translation.h File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Data Structures | Macros | Functions
name_translation.h File Reference
`#include "fcintl.h"`
`#include "support.h"`
`#include "fc_types.h"`

Go to the source code of this file.

## Data Structures

struct | name_translation

## Macros

#define | vernacular _private_vernacular_
#define | rulename _private_rulename_
#define | translated _private_translated_
#define | NAME_INIT { NULL, "\0", "\0" }

## Functions

static void | name_init (struct name_translation *ptrans)
static void | names_set (struct name_translation *ptrans, const char *domain, const char *vernacular_name, const char *rule_name)
static void | name_set (struct name_translation *ptrans, const char *domain, const char *vernacular_name)
static const char * | untranslated_name (const struct name_translation *ptrans)
static const char * | rule_name_get (const struct name_translation *ptrans)
static const char * | name_translation_get (const struct name_translation *ptrans)

## Macro Definition Documentation

## ◆ NAME_INIT

#define NAME_INIT { NULL, "\0", "\0" }

Definition at line 44 of file name_translation.h.

## ◆ rulename

#define rulename _private_rulename_

Definition at line 30 of file name_translation.h.

## ◆ translated

#define translated _private_translated_

Definition at line 31 of file name_translation.h.

## ◆ vernacular

#define vernacular _private_vernacular_

Definition at line 29 of file name_translation.h.

## Function Documentation

## ◆ name_init()

static void name_init | ( | struct name_translation * | ptrans | ) |

inlinestatic

Initializes a name translation structure.

Definition at line 49 of file name_translation.h.

Referenced by multipliers_init().

## ◆ name_set()

static void name_set | ( | struct name_translation * | ptrans,
|  | const char * | domain,
|  | const char * | vernacular_name
| ) |  |

inlinestatic

Set the untranslated name of the name translation structure. Assumes the rule name should be based on the vernacular.

Definition at line 88 of file name_translation.h.

Referenced by handle_ruleset_nation(), handle_ruleset_specialist(), tab_achievement::initialize_new_achievement(), tab_building::initialize_new_bldg(), tab_counter::initialize_new_counter(), tab_extras::initialize_new_extra(), tab_good::initialize_new_good(), tab_gov::initialize_new_gov(), tab_multiplier::initialize_new_multiplier(), tab_tech::initialize_new_tech(), tab_terrains::initialize_new_terrain(), tab_unit::initialize_new_utype(), load_nation_names(), load_ruleset_cities(), nation_group_new(), researches_init(), ruler_title_new(), and techs_init().

## ◆ name_translation_get()

static const char * name_translation_get | ( | const struct name_translation * | ptrans | ) |

inlinestatic

Return the translated name of the name translation structure.

Definition at line 121 of file name_translation.h.

Referenced by achievement_name_translation(), advance_name_translation(), boot_help_texts(), city_style_name_translation(), counter_name_translation(), disaster_name_translation(), extra_name_translation(), goods_name_translation(), government_name_translation(), helptext_government(), improvement_name_translation(), insert_veteran_help(), multiplier_name_translation(), nation_adjective_translation(), nation_group_name_translation(), nation_plural_translation(), nation_set_name_translation(), notify_unit_experience(), research_advance_name_translation(), ruler_title_check(), ruler_title_for_player(), specialist_abbreviation_translation(), specialist_plural_translation(), style_name_translation(), tech_class_name_translation(), terrain_name_translation(), uclass_name_translation(), unit_veteran_level_string(), utype_name_translation(), and utype_veteran_name_translation().

## ◆ names_set()

static void names_set | ( | struct name_translation * | ptrans,
|  | const char * | domain,
|  | const char * | vernacular_name,
|  | const char * | rule_name
| ) |  |

inlinestatic

Set the untranslated and rule names of the name translation structure. If rule_name is NULL, use vernacular_name for it (after removing any i18n qualifier).

Definition at line 60 of file name_translation.h.

Referenced by handle_ruleset_achievement(), handle_ruleset_building(), handle_ruleset_city(), handle_ruleset_counter(), handle_ruleset_disaster(), handle_ruleset_extra(), handle_ruleset_goods(), handle_ruleset_government(), handle_ruleset_multiplier(), handle_ruleset_nation(), handle_ruleset_specialist(), handle_ruleset_style(), handle_ruleset_tech(), handle_ruleset_tech_class(), handle_ruleset_terrain(), handle_ruleset_unit(), handle_ruleset_unit_class(), tab_achievement::name_given(), tab_building::name_given(), tab_counter::name_given(), tab_extras::name_given(), tab_good::name_given(), tab_gov::name_given(), tab_multiplier::name_given(), tab_tech::name_given(), tab_terrains::name_given(), tab_unit::name_given(), name_set(), nation_set_new(), ruleset_load_names(), and veteran_system_definition().

## ◆ rule_name_get()

static const char * rule_name_get | ( | const struct name_translation * | ptrans | ) |

inlinestatic

Return the rule name of the name translation structure.

Definition at line 112 of file name_translation.h.

Referenced by achievement_rule_name(), advance_rule_name(), city_style_rule_name(), counter_rule_name(), disaster_rule_name(), extra_rule_name(), goods_rule_name(), government_rule_name(), improvement_rule_name(), load_nation_names(), load_ruleset_techs(), load_ruleset_terrain(), load_ruleset_units(), multiplier_rule_name(), nation_group_by_rule_name(), nation_group_new(), nation_group_rule_name(), nation_rule_name(), nation_set_by_rule_name(), nation_set_new(), nation_set_rule_name(), research_advance_rule_name(), ruler_title_check(), save_cities_ruleset(), save_name_translation(), save_veteran_system(), send_ruleset_achievements(), send_ruleset_buildings(), send_ruleset_cities(), send_ruleset_counters(), send_ruleset_disasters(), send_ruleset_extras(), send_ruleset_goods(), send_ruleset_governments(), send_ruleset_multipliers(), send_ruleset_nations(), send_ruleset_specialists(), send_ruleset_styles(), send_ruleset_tech_classes(), send_ruleset_techs(), send_ruleset_terrain(), send_ruleset_unit_classes(), send_ruleset_units(), specialist_rule_name(), style_rule_name(), tech_class_rule_name(), terrain_rule_name(), uclass_rule_name(), tab_counter::update_counter_info(), tab_tech::update_tech_info(), and utype_rule_name().

## ◆ untranslated_name()

static const char * untranslated_name | ( | const struct name_translation * | ptrans | ) |

inlinestatic

Return the untranslated (vernacular) name of the name translation structure. Rarely used; you usually want name_translation() or rule_name(). Note that this does not discard any translation qualifiers! – if this string is to be displayed to the user (unlikely), the caller must call Qn_() on it.

Definition at line 104 of file name_translation.h.

Referenced by load_nation_names(), load_ruleset_cities(), nation_group_untranslated_name(), nation_set_untranslated_name(), ruler_title_female_untranslated_name(), ruler_title_male_untranslated_name(), save_name_translation(), save_nation(), send_ruleset_achievements(), send_ruleset_buildings(), send_ruleset_cities(), send_ruleset_counters(), send_ruleset_disasters(), send_ruleset_extras(), send_ruleset_game(), send_ruleset_goods(), send_ruleset_governments(), send_ruleset_multipliers(), send_ruleset_nations(), send_ruleset_specialists(), send_ruleset_styles(), send_ruleset_tech_classes(), send_ruleset_techs(), send_ruleset_terrain(), send_ruleset_unit_classes(), send_ruleset_units(), tab_achievement::update_achievement_info(), tab_building::update_bldg_info(), tab_counter::update_counter_info(), tab_extras::update_extra_info(), tab_good::update_good_info(), tab_gov::update_gov_info(), tab_multiplier::update_multiplier_info(), tab_tech::update_tech_info(), tab_terrains::update_terrain_info(), and tab_unit::update_utype_info().