Skip to content

Commit

Permalink
WIP extracting all strings
Browse files Browse the repository at this point in the history
  • Loading branch information
SnosMe committed Apr 17, 2023
1 parent 3bd5fd7 commit 10ac079
Show file tree
Hide file tree
Showing 50 changed files with 592 additions and 1,000 deletions.
320 changes: 306 additions & 14 deletions renderer/public/data/en/app_i18n.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,314 @@
{
"please_wait": "Please wait\u2026",
"choose_file": "Choose File",
"browse": "Browse",
"app_is_ready": "Is ready and running in background",
"reopen_settings": "Press {0} to continue editing.",
"seconds": "seconds",
"league": "League",
"realm": "Realm",
"realm_intl": "International",

"app": {
"leagues_loading": "Loading leagues\u2026",
"leagues_failed": "Failed to load leagues",
"leagues_failed_help": "Make sure the realm is not under maintenance. Also try clicking on the \"Browser\" button, you may need to complete a CAPTCHA there.",
"leagues_failed_help_alt": "Price check an Item, and follow the instructions in the error description there.",
"thanks_3rd_party": "This tool relies on {0} and {1}, consider support them as well",
"toggle_browser_hint": "Press {0} to switch between browser and game.",
"contact_me": "Contact me on one of the PoE Discords,",
"version": "Version {0}",
"release_notes": "Release notes",
"report_bug": "Report a bug on GitHub",
"quit": "Quit"
},

"map.mods.heist": "heist",
"map.mods.outdated": "outdated",
"Support development on": "Support development\u00A0on",

"updates.maybe_outdated": "You may have an outdated version",
"updates.latest": "You have the latest version",
"updates.error": "Error while checking for updates",
"updates.checking": "Checking for updates",
"updates.downloading": "Downloading\u2026",
"updates.available": "Update available: {0}",
"updates.never_checked": "Last checked: never",
"updates.last_checked": "Last checked: {0}",
"updates.check_now": "Check now",
"updates.install_now": "Install now",
"updates.downloads_page": "Open the Downloads page",
"updates.installed_on_exit": "It will be installed automatically on exit",
"updates.download_manually": "You can download it from GitHub",
"updates.download_disabled": "You have disabled automatic updates download"
"Blighted": "Blighted",
"Blight-ravaged": "Blight-ravaged",
"Shaper": "Shaper",
"Elder": "Elder",
"Crusader": "Crusader",
"Hunter": "Hunter",
"Redeemer": "Redeemer",
"Warlord": "Warlord",
"Superior": "Superior",
"Anomalous": "Anomalous",
"Divergent": "Divergent",
"Phantasmal": "Phantasmal",

"item": {
"prop_quality": "Q {0}%",
"base_percentile": "Base Percentile: {0}%",
"armour": "Armour: {0}",
"evasion_rating": "Evasion Rating: {0}",
"energy_shield": "Energy Shield: {0}",
"ward": "Ward: {0}",
"block": "Block: {0}%",
"total_dps": "Total DPS: {0}",
"physical_dps": "Physical DPS: {0}",
"elemental_dps": "Elemental DPS: {0}",
"crit": "Critical Strike Chance: {0}%",
"aps": "Attacks per Second: {0}",
"has_empty_modifier": "1 Empty or Crafted Modifier",
"has_empty_affix": "Любое",
"has_empty_prefix": "Префикс",
"has_empty_suffix": "Суффикс",
"item_level": "Item Level: {0}",
"stock": "Stock: {0}",
"map_tier": "Map Tier: {0}",
"area_level": "Area Level: {0}",
"heist_wings_revealed": "Wings Revealed: {0}",
"linked_sockets": "Links: {0}",
"white_sockets": "White: {0}",
"quality": "Quality: {0}",
"gem_level": "Level: {0}",
"sentinel_charge": "Charge: {0}",
"find_in_stash": "Find in Stash",
"parse_error": "An error occurred while parsing the item",
"parse_error_help": "This is probably a bug and you can report it on GitHub.",
"unknown": "Unknown Item",
"unknown_help": "If this Item was introduced in this League, it will likely be supported in the next app update.",
"identification": "You are trying to price check unidentified Unique item with base type \"{0}\". Which one?",
"open_on_wiki": "Open item on wiki",
"open_on_poedb": "Open item on PoEDB",
"info": "Item info",
"corrupted": "Corrupted",
"not_corrupted": "Not Corrupted",
"mod_tier": "Tier: {0}",
"mod_rank": "Rank: {0}",
"mod_implicit": "Implicit",
"mod_fractured": "Fractured",
"mod_explicit": "Explicit",
"mod_crafted": "Crafted",
"mod_scourge": "Scourge",
"unidentified": "Unidentified",
"veiled": "Veiled",
"foil_unique": "Foil Unique",
"mirrored": "Mirrored",
"not_mirrored": "Not Mirrored"
},
"item_category": {
"prop": "Category: {0}",
"map": "Map",
"jewel_abyss": "Abyss Jewel",
"accessory_amulet": "Amulet",
"accessory_belt": "Belt",
"armour_chest": "Body Armour",
"armour_boots": "Boots",
"weapon_bow": "Bow",
"weapon_claw": "Claw",
"weapon_dagger": "Dagger",
"weapon_rod": "Fishing Rod",
"flask": "Flask",
"armour_gloves": "Gloves",
"armour_helmet": "Helmet",
"jewel": "Jewel",
"weapon_oneaxe": "One-Handed Axe",
"weapon_onemace": "One-Handed Mace",
"weapon_onesword": "One-Handed Sword",
"armour_quiver": "Quiver",
"accessory_ring": "Ring",
"weapon_runedagger": "Rune Dagger",
"weapon_sceptre": "Sceptre",
"armour_shield": "Shield",
"weapon_staff": "Staff",
"weapon_twoaxe": "Two-Handed Axe",
"weapon_twomace": "Two-Handed Mace",
"weapon_twosword": "Two-Handed Sword",
"weapon_wand": "Wand",
"weapon_warstaff": "Warstaff",
"jewel_cluster": "Cluster Jewel",
"heistmission_blueprint": "Heist Blueprint",
"heistmission_contract": "Heist Contract",
"heistequipment_heisttool": "Heist Tool",
"heistequipment_heistreward": "Heist Brooch",
"heistequipment_heistweapon": "Heist Gear",
"heistequipment_heistutility": "Heist Cloak",
"accessory_trinket": "Trinket"
},
"filters": {
"selected_some": "{0} of {1}, stats",
"selected_none": "Stats ignored",
"hidden_toggle": "Hidden",
"collapse": "Collapse",
"mods_toggle": "Mods",
"empty": "No relevant stats were found",
"tier": "Tier {0}",
"preset_pseudo": "Pseudo",
"preset_base_item": "Base item",
"hide_const_roll": "Roll is not variable",
"hide_ele_dps": "Elemental damage is not the main source of DPS",
"hide_phys_dps": "Physical damage is not the main source of DPS",
"hide_ele_res": "Filtering by exact Elemental Resistance unreasonably increases the price",
"hide_crafted_chaos": "Crafted Chaos Resistance without Explicit mod has no value",
"hide_anointment": "Buyer will likely change anointment",
"hide_for_crafting": "Select only if price-checking as base item for crafting",
"hide_empty_mod": "Select only if item has 6 modifiers (1 of which is crafted) or if it has 5 modifiers",
"tag_variant": "variant",
"tag_corrupted": "corrupted",
"tag_synthesised": "synthesised",
"tag_eldritch": "eldritch",
"tag_pseudo": "pseudo",
"tag_explicit_shaper": "Shaper",
"tag_explicit_elder": "Elder",
"tag_explicit_crusader": "Crusader",
"tag_explicit_hunter": "Hunter",
"tag_explicit_redeemer": "Redeemer",
"tag_explicit_warlord": "Warlord",
"tag_explicit_delve": "Delve",
"tag_explicit_veiled": "Veiled",
"tag_explicit_incursion": "Incursion"
},
"online_filter": {
"offline_toggle": "Offline & Online",
"in_league_toggle": "In League",
"listed_any_time": "Listed: Any Time",
"listed_1day": "1 Day Ago",
"listed_3days": "3 Days Ago",
"listed_1week": "1 Week Ago",
"listed_2weeks": "2 Weeks Ago",
"listed_1month": "1 Month Ago",
"listed_2months": "2 Months Ago",
"currency_any": "Any Currency",
"currency_only_chaos": "Chaos Orb",
"currency_only_div": "Divine Orb"
},
"widget": {
"title": "widget title",
"hide": "hide",
"edit": "edit",
"move": "move",
"delete": "delete"
},
"updates": {
"maybe_outdated": "You may have an outdated version",
"latest": "You have the latest version",
"error": "Error while checking for updates",
"checking": "Checking for updates",
"downloading": "Downloading\u2026",
"available": "Update available: {0}",
"never_checked": "Last checked: never",
"last_checked": "Last checked: {0}",
"check_now": "Check now",
"install_now": "Install now",
"downloads_page": "Open the Downloads page",
"installed_on_exit": "It will be installed automatically on exit",
"download_manually": "You can download it from GitHub",
"download_disabled": "You have disabled automatic updates download",
"auto_download": "Auto-download updates"
},
"widget_menu": {
"add": "add widget\u2026",
"always_show": "Show button for active widgets",
"price_check": "Price check (Ctrl + V)"
},
"stopwatch": {
"name": "Stopwatch",
"paused": "paused",
"toggle_key": "Start and Pause",
"reset_key": "Reset"
},
"stash_search": {
"name": "Stash search",
"search_text": "search text or regex",
"friendly_name": "friendly name"
},
"image_strip": {
"name": "Image strip"
},
"item_search": {
"name": "Item search",
"input": "Search by name\u2026",
"reset": "Reset items",
"heist_target": "Heist target:",
"target_gem": "Skill Gem",
"target_replica": "Replicas",
"too_many": "Too many items found, enter the name more precisely.",
"not_found": "No items found.",
"ocr_gems_key": "Perform an OCR for a Skill Gem"
},
"map_check": {
"name": "Map check",
"has_outdated": "Wording of some stats has been changed. Check and update dangerous map mods in the settings. (This message will be hidden as soon as you remove all outdated stats)",
"no_mods": "Item has no modifiers.",
"profile": "Profile",
"search_selected": "Only selected",
"search_stat_col": "Stat (found: {0})",
"new_mods_icon": "Show icon for new mods"
},
"trade_result": {
"error" :"Trade site request failed",
"matched" :"Matched: {0}",
"trade" :"Trade",
"price" :"Price",
"bulk" :"bulk",
"stock" :"Stock",
"fulfill" :"Fulfill",
"listed" :"Listed",
"seller" :"Seller",
"item_level": "iLvl",
"gem_level": "Level",
"quality": "Quality",
"base_item": "Base item",
"graph_7d": "Last 7 days",
"getting_price": "Getting price {0}",
"getting_price_from": "from poe.ninja \u2026",
"you_have": "You have",
"stack": "Stack"
},
"settings": {
"title": "Settings - Awakened PoE Trade",
"language": "Language",
"private_league": "or Private League",
"account_name": "Account name",
"last_char_name": "Last character name",
"chat_cmd_add": "Add command",
"chat_cmd_send": "press Enter",
"no_key": "Not Set",
"clear_hotkey": "You can clear hotkey by pressing Backspace",
"overlay" :"Overlay",
"stash_scroll" :"Stash tab scrolling",
"delve_grid" :"Grid for Delve Chart",
"window_title": "PoE window title",
"thank_you": "App development continues thanks to:",
"hotkeys": "Hotkeys",
"chat": "Chat",
"general": "General",
"debug": "Debug",
"about": "About",
"font_size" :"Font size",
"overlay_bg" :"Background, when APT window is clickable",
"overlay_bg_none" :"Transparent",
"overlay_bg_exclusive" :"Show for Overlay and Price Check",
"overlay_bg_itself" :"Show only for Overlay",
"overlay_bg_focus_game" :"Clicking on background focuses game",
"poe_log_file" :"PoE log file",
"poe_cfg_file" :"PoE config file",
"restore_clipboard" :"Restore clipboard",
"show_overlay_ready" :"Show a notification when opening PoE"
},
"price_check": {
"name": "Price check",
"hotkey" :"Auto-hide Mode",
"hotkey_locked" :"Open without auto-hide",
"enable_browser": "Enable builtin browser",
"builtin_browser_warning": "I am aware that future releases can potentially contain malicious code that can steal my POESESSID.",
"highlight_hint": "Your items will be highlighted even if this setting is off",
"show_seller": "Show seller",
"fill_rolls": "Fill stat values",
"fill_roll_exact": "Exact value",
"cursor_pos": "Show memorized cursor position",
"min_price": "Minimum buyout price",
"min_price_in_chaos": "Chaos Orbs",
"extra_delay": "Extra time to prevent spurious Rate limiting",
"warn_expensive": "Settings below are a compromise between increasing load on PoE website and convenient price checking / more accurate search.",
"accurate_collapsed": "Show indication on collapsed listings",
"auto_search": "Perform an auto search, when pressing",
"select_stock": "Always select \"Stock\" filter",
"show_prediction": "Show price prediction"
}
}
15 changes: 14 additions & 1 deletion renderer/src/web/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createI18n, Composer as I18n } from 'vue-i18n'
import { createI18n, Composer as I18n, useI18n } from 'vue-i18n'
import { nextTick } from 'vue'

let _global: I18n
Expand Down Expand Up @@ -36,3 +36,16 @@ export async function loadLang (lang: string): Promise<void> {

return await nextTick()
}

export function useI18nNs (name: string) {
const { t } = useI18n()
return {
t: ((path, ...args) => {
if (typeof path === 'string' && path.startsWith(':')) {
return (t as any)(path.replace(':', `${name}.`), ...args)
} else {
return (t as any)(path, ...args)
}
}) as typeof t
}
}
24 changes: 4 additions & 20 deletions renderer/src/web/item-check/ItemInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<button class="btn flex-1" @click="openPoedb">poedb</button>
<button v-if="showCoE" class="btn flex-1" @click="openCoE">CoE</button>
<i class="fa-solid fa-ellipsis-vertical text-gray-600"></i>
<button class="btn flex-1 whitespace-nowrap" @click="stashSearch">{{ t('Find in Stash') }}</button>
<button class="btn flex-1 whitespace-nowrap" @click="stashSearch">{{ t('item.find_in_stash') }}</button>
</div>
<div v-if="weaponDPS" class="grid mx-auto gap-x-4 my-2" style="grid-template-columns: auto auto;">
<div>{{ t('Physical DPS:') }}</div><div class="text-right">{{ weaponDPS.phys }}</div>
<div>{{ t('Elemental DPS:') }}</div><div class="text-right">{{ weaponDPS.elem }}</div>
<div>{{ t('Total DPS:') }}</div><div class="text-right">{{ weaponDPS.total }}</div>
<div>{{ t('item.physical_dps') }}</div><div class="text-right">{{ weaponDPS.phys }}</div>
<div>{{ t('item.elemental_dps') }}</div><div class="text-right">{{ weaponDPS.elem }}</div>
<div>{{ t('item.total_dps') }}</div><div class="text-right">{{ weaponDPS.total }}</div>
</div>
</div>
</template>
Expand Down Expand Up @@ -55,19 +55,3 @@ export default defineComponent({
}
})
</script>

<i18n>
{
"ru": {
"Physical DPS:": "Физический ДПС:",
"Elemental DPS:": "Стихийный ДПС:",
"Total DPS:": "Общий ДПС:",
"Find in Stash": "Найти в тайнике"
},
"cmn-Hant": {
"Physical DPS:": "物理 DPS: #",
"Elemental DPS:": "元素 DPS: #",
"Total DPS:": "DPS: #"
}
}
</i18n>
Loading

0 comments on commit 10ac079

Please sign in to comment.