WarframeWorldstateDataElixirTools.Translations (warframe_worldstate_data_elixir_tools v0.1.0)

Copy Markdown View Source

This module contains methods for translating keys to proper user facing strings.

Summary

Functions

Returns the display name of an Archon Shard for the given color key and locale.

Returns the translated effect of an Archon Shard upgrade type.

Translates a faction key to its display name in the given locale.

Gets the tier of a fissure by its key in the requested locale.

Gets the translation for a fissure's type in the requested locale.

Gets the localized description for a given languages.json key.

Gets the localized string value for a given languages.json key.

Gets the translation for a mission type from a missions_type.json file. If the translation for the key is not found it returns a "normalized" version of the key.

Gets the translation of the name of an in game node in the requested locale.

Gets the translation of the enemy faction of an in game node in the requested locale.

Gets the translation of the mission type of an in game node in the requested locale.

Returns the display name of a sortie boss for the given key and locale.

Returns the faction of a sortie boss for the given key and locale.

Returns the display name of a sortie modifier type for the given key and locale.

Returns the description of a sortie modifier for the given key and locale.

Returns a map containing translated steel path rewards.

Returns the translated name of a syndicate.

Translates an Archimedea type code to its display name.

Translates a calendar event code to its display name.

Translates a focus school key to its display name.

Translates a polarity code to its display name.

Strips the "CST_" prefix from a season string.

Returns the translated value of a global upgrade.

Functions

archon_shard_color(color, locale \\ :en)

Returns the display name of an Archon Shard for the given color key and locale.

Falls back to the color key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.archon_shard_color("ACC_BLUE")
"Azure"

iex> WarframeWorldstateDataElixirTools.Translations.archon_shard_color("ACC_UNKNOWN")
"ACC_UNKNOWN"

archon_shard_upgrade_type(color, upgrade_type, locale \\ :en)

Returns the translated effect of an Archon Shard upgrade type.

Falls back to the last path segment of the upgrade_type key if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.archon_shard_upgrade_type("ACC_BLUE", "/Lotus/Upgrades/Invigorations/ArchonCrystalUpgrades/ArchonCrystalUpgradeWarframeHealthMax")
"+150% Health"

iex> WarframeWorldstateDataElixirTools.Translations.archon_shard_upgrade_type("ACC_BLUE", "/Lotus/Upgrades/Invigorations/ArchonCrystalUpgrades/ArchonCrystalUpgradeUnknown")
"ArchonCrystalUpgradeUnknown"

iex> WarframeWorldstateDataElixirTools.Translations.archon_shard_upgrade_type("ACC_UNKNOWN", "/Lotus/Upgrades/Invigorations/ArchonCrystalUpgrades/ArchonCrystalUpgradeWarframeHealthMax")
"ArchonCrystalUpgradeWarframeHealthMax"

faction(key, locale \\ :en)

Translates a faction key to its display name in the given locale.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.faction("FC_CORPUS")
"Corpus"

iex> WarframeWorldstateDataElixirTools.Translations.faction("FC_INFESTATION", :de)
"Befallene"

iex> WarframeWorldstateDataElixirTools.Translations.faction("FC_UNKNOWN")
"FC_UNKNOWN"

fissure_tier(key, locale \\ :en)

Gets the tier of a fissure by its key in the requested locale.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.fissure_tier("VoidT1")
1

iex> WarframeWorldstateDataElixirTools.Translations.fissure_tier("random")
0

fissure_type(key, locale \\ :en)

Gets the translation for a fissure's type in the requested locale.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.fissure_type("VoidT1")
"Lith"

iex> WarframeWorldstateDataElixirTools.Translations.fissure_type("VoidT1", :de)
"Lith"

iex> WarframeWorldstateDataElixirTools.Translations.fissure_type("random")
"random"

language_desc(key, locale \\ :en)

Gets the localized description for a given languages.json key.

Examples

iex> key = "/lotus/types/challenges/seasons/daily/seasondailycollecthundredresources"
iex> WarframeWorldstateDataElixirTools.Translations.language_desc(key)
"Collect 1,500 Resources"

iex> key = "/lotus/types/challenges/seasons/daily/seasondailycollecthundredresources"
iex> WarframeWorldstateDataElixirTools.Translations.language_desc(key, :de)
"Sammle 1.500 Ressourcen"

iex> WarframeWorldstateDataElixirTools.Translations.language_desc("")
"[PH] Description"

iex> WarframeWorldstateDataElixirTools.Translations.language_desc("SomeUnknownKey")
"[PH] Some Unknown Key Description"

language_string(key, locale \\ :en)

Gets the localized string value for a given languages.json key.

Examples

iex> key = "/lotus/types/challenges/seasons/daily/seasondailycollecthundredresources"
iex> WarframeWorldstateDataElixirTools.Translations.language_string(key)
"Gatherer"

iex> key = "/lotus/types/challenges/seasons/daily/seasondailycollecthundredresources"
iex> WarframeWorldstateDataElixirTools.Translations.language_string(key, :de)
"Sammler"

iex> WarframeWorldstateDataElixirTools.Translations.language_string("")
"[PH] value"

iex> WarframeWorldstateDataElixirTools.Translations.language_string("SomeUnknownKey")
"Some Unknown Key"

mission_type(key, locale \\ :en)

Gets the translation for a mission type from a missions_type.json file. If the translation for the key is not found it returns a "normalized" version of the key.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.mission_type("MT_DEFENSE")
"Defense"

iex> WarframeWorldstateDataElixirTools.Translations.mission_type("MT_DEFENSE", :de)
"Verteidigung"

iex> WarframeWorldstateDataElixirTools.Translations.mission_type("MT_random")
"Random"

node(key, locale \\ :en)

Gets the translation of the name of an in game node in the requested locale.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.node("SolNode1")
"Galatea (Neptune)"

iex> WarframeWorldstateDataElixirTools.Translations.node("SolNode1", :de)
"Galatea (Neptun)"

iex> WarframeWorldstateDataElixirTools.Translations.node("SolarSystem/Foo")
"Foo"

node_enemy(key, locale \\ :en)

Gets the translation of the enemy faction of an in game node in the requested locale.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.node_enemy("SolNode1")
"Corpus"

iex> WarframeWorldstateDataElixirTools.Translations.node_enemy("SolNode1", :ko)
"코퍼스"

node_mission_type(key, locale \\ :en)

Gets the translation of the mission type of an in game node in the requested locale.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.node_mission_type("SolNode1")
"Capture"

iex> WarframeWorldstateDataElixirTools.Translations.node_mission_type("SolNode1", :de)
"Gefangennahme"

sortie_boss(key, locale \\ :en)

Returns the display name of a sortie boss for the given key and locale.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.sortie_boss("SORTIE_BOSS_HYENA")
"Hyena Pack"

iex> WarframeWorldstateDataElixirTools.Translations.sortie_boss("SORTIE_BOSS_UNKNOWN")
"SORTIE_BOSS_UNKNOWN"

sortie_faction(key, locale \\ :en)

Returns the faction of a sortie boss for the given key and locale.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.sortie_faction("SORTIE_BOSS_HYENA")
"Corpus"

iex> WarframeWorldstateDataElixirTools.Translations.sortie_faction("SORTIE_BOSS_UNKNOWN")
"SORTIE_BOSS_UNKNOWN"

sortie_modifier(key, locale \\ :en)

Returns the display name of a sortie modifier type for the given key and locale.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.sortie_modifier("SORTIE_MODIFIER_LOW_ENERGY")
"Energy Reduction"

iex> WarframeWorldstateDataElixirTools.Translations.sortie_modifier("SORTIE_MODIFIER_LOW_ENERGY", :de)
"reduzierte Energie"

iex> WarframeWorldstateDataElixirTools.Translations.sortie_modifier("SORTIE_MODIFIER_UNKNOWN")
"SORTIE_MODIFIER_UNKNOWN"

sortie_modifier_description(key, locale \\ :en)

Returns the description of a sortie modifier for the given key and locale.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.sortie_modifier_description("SORTIE_MODIFIER_LOW_ENERGY")
"Maximum Warframe Energy capacity is quartered. Energy Siphon is less effective."

iex> WarframeWorldstateDataElixirTools.Translations.sortie_modifier_description("SORTIE_MODIFIER_UNKNOWN")
"SORTIE_MODIFIER_UNKNOWN"

steel_path(locale \\ :en)

Returns a map containing translated steel path rewards.

Examples

iex> sp = WarframeWorldstateDataElixirTools.Translations.steel_path()
iex> is_map(sp)
true

syndicate(key, locale \\ :en)

Returns the translated name of a syndicate.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.syndicate("ArbitersSyndicate", :en)
"Arbiters of Hexis"

iex> WarframeWorldstateDataElixirTools.Translations.syndicate("ArbitersSyndicateUnkown")
"ArbitersSyndicateUnkown"

translate_archemedia_type(type)

Translates an Archimedea type code to its display name.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.translate_archemedia_type("CT_LAB")
"Deep Archimedea"

iex> WarframeWorldstateDataElixirTools.Translations.translate_archemedia_type("Unknown")
"None"

translate_calendar_event(event)

Translates a calendar event code to its display name.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.translate_calendar_event("CET_CHALLENGE")
"To Do"

iex> WarframeWorldstateDataElixirTools.Translations.translate_calendar_event("Unknown")
"None"

translate_focus(focus)

Translates a focus school key to its display name.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.translate_focus("Focus/Attack")
"Madurai"

iex> WarframeWorldstateDataElixirTools.Translations.translate_focus("Unknown")
"None"

translate_polarity(polarity)

Translates a polarity code to its display name.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.translate_polarity("AP_ATTACK")
"Madurai"

iex> WarframeWorldstateDataElixirTools.Translations.translate_polarity("Unknown")
"None"

translate_season(season)

Strips the "CST_" prefix from a season string.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.translate_season("CST_SPRING")
"SPRING"

iex> WarframeWorldstateDataElixirTools.Translations.translate_season("SUMMER")
"SUMMER"

upgrade(key, locale \\ :en)

Returns the translated value of a global upgrade.

Falls back to the key itself if not found.

Examples

iex> WarframeWorldstateDataElixirTools.Translations.upgrade("GAMEPLAY_MONEY_PICKUP_AMOUNT")
"Credit Drop amount"

iex> WarframeWorldstateDataElixirTools.Translations.upgrade("GAMEPLAY_MONEY_PICKUP_AMOUNT_UNKOWN")
"GAMEPLAY_MONEY_PICKUP_AMOUNT_UNKOWN"