From 1098d4e1cef6deadc473ad65d8f63952695495d7 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:00:40 -0500 Subject: [PATCH] [From i3] Fix up i18n and add Swedish translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • S"" → S(""), ES → FS, wrap some missing strings • Refresh locales • Add Swedish translation By rollerozxa from i3: https://github.com/mt-historical/i3/commit/d5b5a14 --- i4/locale/{i3.fr.tr => i4.fr.tr} | 205 +++++++++++++++++++++---------- i4/locale/i4.sv.tr | 135 ++++++++++++++++++++ i4/locale/template | 84 ------------- i4/locale/template.txt | 135 ++++++++++++++++++++ i4/src/api.lua | 25 ++-- i4/src/bags.lua | 8 +- i4/src/common.lua | 4 +- i4/src/fields.lua | 8 +- i4/src/groups.lua | 76 ++++++------ i4/src/gui.lua | 120 +++++++++--------- 10 files changed, 529 insertions(+), 271 deletions(-) rename i4/locale/{i3.fr.tr => i4.fr.tr} (67%) create mode 100644 i4/locale/i4.sv.tr delete mode 100644 i4/locale/template create mode 100644 i4/locale/template.txt diff --git a/i4/locale/i3.fr.tr b/i4/locale/i4.fr.tr similarity index 67% rename from i4/locale/i3.fr.tr rename to i4/locale/i4.fr.tr index 2c57546..33ea219 100644 --- a/i4/locale/i3.fr.tr +++ b/i4/locale/i4.fr.tr @@ -1,85 +1,156 @@ -# textdomain: i3 - +# textdomain: i4 ### init.lua ### +Inventory=Inventaire +Clear inventory= +Sort inventory= +Settings= +Go home= +Digging=Minage +Digging (by chance)=Minage (par chance) +Sort items by name (A-Z)= +Sort items by number of items per stack= +All= +Nodes= +Items=Items +There is already a bag= +This is not a bag= +@1 (@2% full)= +Teleported to: @1= +You already have set a waypoint at this position= +Welcome back home!= +Your Minetest client needs updating (www.minetest.net)= +Any dye=N'importe quel colorant +Any coal=N'importe quel charbon +Any sand=N'importe quel sable +Any tree=N'importe quel tronc d'arbre +Any wool=N'importe quelle laine +Any glass=N'importe quel verre +Any stick=N'importe quel bâton +Any stone=N'importe quelle roche +Any fence= +Any carpet=N'importe quel tapis +Any flower=N'importe quelle fleur +Any leaves=N'importe quelles feuilles d'arbre +Any vessel=N'importe quel couvert +Any wood planks=N'importe quelles planches de bois +Any mushroom=N'importe quel champignon +Any red flower=N'importe quelle fleur rouge +Any blue flower=N'importe quelle fleur bleue +Any black flower=N'importe quelle fleur noire +Any white flower=N'importe quelle fleur blanche +Any green flower=N'importe quelle fleur verte +Any orange flower=N'importe quelle fleur orange +Any yellow flower=N'importe quelle fleur jaune +Any violet flower=N'importe quelle fleur violette +Any red dye=N'importe quel colorant rouge +Any blue dye=N'importe quel colorant bleu +Any grey dye=N'importe quel colorant gris +Any pink dye=N'importe quel colorant rose +Any cyan dye=N'importe quel colorant bleu turquoise +Any black dye=N'importe quel colorant noir +Any white dye=N'importe quel colorant blanc +Any brown dye=N'importe quel colorant marron +Any green dye=N'importe quel colorant vert +Any orange dye=N'importe quel colorant orange +Any yellow dye=N'importe quel colorant jaune +Any violet dye=N'importe quel colorant violet +Any magenta dye=N'importe quel colorant mauve +Any dark grey dye=N'importe quel colorant gris foncé +Any dark green dye=N'importe quel colorant vert foncé +Unknown Item (@1)=Item inconnu (@1) +Achievements: @1 of @2 (@3)=Succès : @1 sur @2 (@3) +Secret award= +Unlock this award to find out what it is= +New waypoint:= +Add waypoint= +[Click to teleport]= +Remove waypoint= +Change color= +Preview the waypoint area= +Show waypoint= +Hide waypoint= +Rename the bag= +Helmet= +Chest= +Leggings= +Boots= +Shield= +Armor level= +Armor healing= +Confirm trash?= +Yes= +No= +Home= +Style= +Sorting= +No home set= +Set home= +Hide tabs= +HUD description= +Font size: @1= +Enable this option to change the style of the right panel= +Enable this option to show the wielded item description in your HUD= +Enable this option to collapse the inventory list by grouping some items= +Compression= +Reverse mode= +Ignore hotbar= +Automation= +Sorting method:= +Enable this option to compress your inventory= +Enable this option to sort your inventory in reverse order= +Enable this option to sort your inventory except the hotbar slots= +Enable this option to sort your inventory automatically= +Any item belonging to the groups: @1=Tout item appartenant aux groupes : @1 +Cooking time: @1=Temps de cuisson : @1 +Burning time: @1=Temps de combustion : @1 +Replaced by @1 on smelting=Remplacé par @1 à la cuisson +Replaced by @1 on burning=Remplacé par @1 à la combustion +Replaced by @1 on crafting=Remplacé par @1 à la fabrication +Repairable by step of @1=Réparable par étape de @1 +@1 of chance to drop=@1 de chance de tomber +Only drop if using one of these tools: @1=Tombe seulement en utilisant un de ces outils : @1 +Only drop if using this tool: @1=Tombe seulement en utilisant cet outil : @1 +Shapeless=Sans forme particulière +Cooking=Cuisson +Custom recipe= +Usage @1 of @2=Usage @1 sur @2 +Recipe @1 of @2=Recette @1 sur @2 +Unbookmark this item= +Bookmark this item= +Unable to bookmark this item, limit reached= +Back to item list= +Quick crafting=Fabrication rapide +Quick Crafting= +Craft (×@1)= +Missing materials for crafting:@1= +No recipes=Aucune recette +No usages=Aucun usage +Search= +Search...= +Clear= +Go to page:= +No item to show=Aucun item à montrer +Collect items to reveal more recipes=Collecter des items pour révéler des recettes +Click to hide= +Click to expand= +Bookmarks=Favoris + + +##### not used anymore ##### @1 added in your inventory=@1 ajouté à votre inventaire @1 new recipe(s) discovered!=@1 nouvelle(s) recette(s) découverte(s)! -@1 of chance to drop=@1 de chance de tomber @1 spawned=@1 spawné -Achievements: @1 of @2 (@3)=Succès : @1 sur @2 (@3) -Any black dye=N'importe quel colorant noir -Any black flower=N'importe quelle fleur noire -Any blue dye=N'importe quel colorant bleu -Any blue flower=N'importe quelle fleur bleue -Any brown dye=N'importe quel colorant marron -Any carpet=N'importe quel tapis -Any coal=N'importe quel charbon -Any cyan dye=N'importe quel colorant bleu turquoise -Any dark green dye=N'importe quel colorant vert foncé -Any dark grey dye=N'importe quel colorant gris foncé -Any dye=N'importe quel colorant -Any flower=N'importe quelle fleur -Any glass=N'importe quel verre -Any green dye=N'importe quel colorant vert -Any green flower=N'importe quelle fleur verte -Any grey dye=N'importe quel colorant gris -Any item belonging to the groups: @1=Tout item appartenant aux groupes : @1 -Any leaves=N'importe quelles feuilles d'arbre -Any magenta dye=N'importe quel colorant mauve -Any mushroom=N'importe quel champignon -Any orange dye=N'importe quel colorant orange -Any orange flower=N'importe quelle fleur orange -Any pink dye=N'importe quel colorant rose -Any red dye=N'importe quel colorant rouge -Any red flower=N'importe quelle fleur rouge -Any sand=N'importe quel sable -Any stick=N'importe quel bâton -Any stone=N'importe quelle roche -Any tree=N'importe quel tronc d'arbre -Any vessel=N'importe quel couvert -Any violet dye=N'importe quel colorant violet -Any violet flower=N'importe quelle fleur violette -Any white dye=N'importe quel colorant blanc -Any white flower=N'importe quelle fleur blanche -Any wood planks=N'importe quelles planches de bois -Any wool=N'importe quelle laine -Any yellow dye=N'importe quel colorant jaune -Any yellow flower=N'importe quelle fleur jaune Armor=Armure Bag=Sac -Bookmarks=Favoris -Burning time: @1=Temps de combustion : @1 -Cannot mark this item. Bookmark limit reached.= -Collect items to reveal more recipes=Collecter des items pour révéler des recettes Compress items=Compresser les items -Cooking=Cuisson -Cooking time: @1=Temps de cuisson : @1 Craft (x@1)=Fabriquer (x@1) -Digging=Minage -Digging (by chance)=Minage (par chance) Heal=Guérison -Inventory=Inventaire -Items=Items Level=Niveau Mark this item=Ajouter aux favoris -No item to show=Aucun item à montrer -No recipes=Aucune recette -No usages=Aucun usage -Only drop if using one of these tools: @1=Tombe seulement en utilisant un de ces outils : @1 -Only drop if using this tool: @1=Tombe seulement en utilisant cet outil : @1 -Quick crafting=Fabrication rapide -Recipe @1 of @2=Recette @1 sur @2 -Repairable by step of @1=Réparable par étape de @1 -Replaced by @1 on burning=Remplacé par @1 à la combustion -Replaced by @1 on crafting=Remplacé par @1 à la fabrication -Replaced by @1 on smelting=Remplacé par @1 à la cuisson -Shapeless=Sans forme particulière Skins=Skins Sort items (A-Z)=Trier les items (A-Z) Sort items (Z-A)=Trier les items (Z-A) The inventory is extended by @1 slots=L'inventaire est étendu de @1 slots Trash all items=Détruire tous les items -Unknown Item (@1)=Item inconnu (@1) Unmark this item=Enlever des favoris -Usage @1 of @2=Usage @1 sur @2 - \ No newline at end of file diff --git a/i4/locale/i4.sv.tr b/i4/locale/i4.sv.tr new file mode 100644 index 0000000..00ff6fc --- /dev/null +++ b/i4/locale/i4.sv.tr @@ -0,0 +1,135 @@ +# textdomain: i4 +Inventory=Lager +Clear inventory=Rensa lager +Sort inventory=Sortera lager +Settings=Inställningar +Go home=Gå hem +Digging=Gräva +Digging (by chance)=Gräva (chans) +Sort items by name (A-Z)=Sortera saker efter namn (A-Z) +Sort items by number of items per stack=Sortera saker efter antal saker per hög +All=Alla +Nodes=Noder +Items=Saker +There is already a bag=Det finns redan en säck +This is not a bag=Detta är inte en säck +@1 (@2% full)=@1 (@2% full) +Teleported to: @1=Teleporterad till: @1 +You already have set a waypoint at this position=Du har redan ställt in en vägpunkt +Welcome back home!=Välkommen tillbaka hem! +Your Minetest client needs updating (www.minetest.net)=Din Minetestklient behöver updateras (www.minetest.net) +Any dye=Någon typ av färg +Any coal=Någon typ av kol +Any sand=Någon typ av sand +Any tree=Något typ av träd +Any wool=Någon typ av ull +Any glass=Någon typ av glas +Any stick=Någon typ av pinne +Any stone=Någon typ av sten +Any fence=Något typ av staket +Any carpet=Någon typ av matta +Any flower=Någon typ av blomma +Any leaves=Något typ av löv +Any vessel=Någon typ av kärlhylla +Any wood planks=Någon typ av träplankor +Any mushroom=Någon typ av svamp +Any red flower=Någon typ av röd blomma +Any blue flower=Någon typ av blå blomma +Any black flower=Någon typ av svart blomma +Any white flower=Någon typ av vit blomma +Any green flower=Någon typ av grön blomma +Any orange flower=Någon typ av orange blomma +Any yellow flower=Någon typ av gul blomma +Any violet flower=Någon typ av violett blomma +Any red dye=Någon typ av röd färg +Any blue dye=Någon typ av blå färg +Any grey dye=Någon typ av grå färg +Any pink dye=Någon typ av rosa färg +Any cyan dye=Någon typ av cyan färg +Any black dye=Någon typ av svart färg +Any white dye=Någon typ av vit färg +Any brown dye=Någon typ av brun färg +Any green dye=Någon typ av grön färg +Any orange dye=Någon typ av orange färg +Any yellow dye=Någon typ av gul färg +Any violet dye=Någon typ av violett färg +Any magenta dye=Någon typ av magenta färg +Any dark grey dye=Någon typ av mörkgrå färg +Any dark green dye=Någon typ av mörkgrön färg +Unknown Item (@1)=Okänd sak (@1) +Achievements: @1 of @2 (@3)=Prestationer: @1 av @2 (@3) +Secret award=Hemligt pris +Unlock this award to find out what it is=Lås upp detta pris för att veta vad det är +New waypoint:=Ny vägpunkt: +Add waypoint=Lägg till vägpunkt +[Click to teleport]=[Tryck för att teleportera] +Remove waypoint=Ta bort vägpunkt +Change color=Byt färg +Preview the waypoint area=Förhandsvisa vägpunktsområdet +Show waypoint=Visa vägpunkt +Hide waypoint=Göm vägpunkt +Rename the bag=Byt namn på säck +Helmet=Hjälm +Chest=Bröst +Leggings=Byxor +Boots=Stövlar +Shield=Sköld +Armor level=Rustningsnivå +Armor healing=Rustningshelande +Confirm trash?=Kasta? +Yes=Ja +No=Nej +Home=Hem +Style=Stil +Sorting=Sortering +No home set=Inget hem inställt +Set home=Sätt hem +Hide tabs=Göm flikar +HUD description=HUD-beskrivning +Font size: @1=Typsnittsstorlek: @1 +Enable this option to change the style of the right panel=Aktivera detta alternativ för att ändra stilen på den högra panelen +Enable this option to show the wielded item description in your HUD=Aktivera detta alternativ för att visa beskrivningen av det hållda föremålet i din HUD +Enable this option to collapse the inventory list by grouping some items=Aktivera detta alternativ för att minska lagerlistan genom att gruppera vissa saker +Compression=Komprimering +Reverse mode=Omvänt läge +Ignore hotbar=Ignorera hotbar +Automation=Automering +Sorting method:=Sorteringsmetod: +Enable this option to compress your inventory=Aktivera detta alternativ för att komprimera ditt lager +Enable this option to sort your inventory in reverse order=Aktivera detta alternativ för att sortera ditt lager i motsatt riktning +Enable this option to sort your inventory except the hotbar slots=Aktivera detta alternativ för att sortera ditt lager förutom hotbar +Enable this option to sort your inventory automatically=Aktivera detta alternativ för att sortera ditt lager automatiskt +Any item belonging to the groups: @1=Någon sak del av grupper: @1 +Cooking time: @1=Tillagningstid: @1 +Burning time: @1=Bränntid: @1 +Replaced by @1 on smelting=Ersätts av @1 vid smältning +Replaced by @1 on burning=Ersätts av @1 vid bränning +Replaced by @1 on crafting=Ersätts av @1 vid tillverkning +Repairable by step of @1=Reparerbar vid @1 +@1 of chance to drop=@1 av chans att tappas +Only drop if using one of these tools: @1=Tappas endast med dessa verktyg: @1 +Only drop if using this tool: @1=Tappas endast med detta verktyg: @1 +Shapeless=Formlös +Cooking=Tillagning +Custom recipe=Anpassat recept +Usage @1 of @2=Användning @1 av @2 +Recipe @1 of @2=Recept @1 av @2 +Unbookmark this item=Avbokmärk denna sak +Bookmark this item=Bokmärk denna sak +Unable to bookmark this item, limit reached=Kunde inte bokmärka sak, gränsen är nådd +Back to item list=Tillbaka till saklista +Quick crafting= +Quick Crafting=Snabbtillverkning +Craft (×@1)=Tillverka (×@1) +Missing materials for crafting:@1=Material saknas för tillverkning:@1 +No recipes=Inga recept +No usages=Inga användningar +Search=Sök +Search...=Sök... +Clear=Rensa +Go to page:=Gå till sida: +No item to show=Ingen sak att visa +Collect items to reveal more recipes=Samla ihop saker för att upptäcka nya recept +Click to hide=Tryck för att gömma +Click to expand=Tryck för att förstora +Bookmarks=Bokmärken diff --git a/i4/locale/template b/i4/locale/template deleted file mode 100644 index 1046d60..0000000 --- a/i4/locale/template +++ /dev/null @@ -1,84 +0,0 @@ -# textdomain: i3 - -### init.lua ### - -@1 added in your inventory= -@1 new recipe(s) discovered!= -@1 of chance to drop= -@1 spawned= -Achievements: @1 of @2 (@3)= -Any black dye= -Any black flower= -Any blue dye= -Any blue flower= -Any brown dye= -Any carpet= -Any coal= -Any cyan dye= -Any dark green dye= -Any dark grey dye= -Any dye= -Any flower= -Any glass= -Any green dye= -Any green flower= -Any grey dye= -Any item belonging to the groups: @1= -Any leaves= -Any magenta dye= -Any mushroom= -Any orange dye= -Any orange flower= -Any pink dye= -Any red dye= -Any red flower= -Any sand= -Any stick= -Any stone= -Any tree= -Any vessel= -Any violet dye= -Any violet flower= -Any white dye= -Any white flower= -Any wood planks= -Any wool= -Any yellow dye= -Any yellow flower= -Armor= -Bag= -Bookmarks= -Burning time: @1= -Cannot mark this item. Bookmark limit reached.= -Collect items to reveal more recipes= -Compress items= -Cooking= -Cooking time: @1= -Craft (x@1)= -Digging= -Digging (by chance)= -Heal= -Inventory= -Items= -Level= -Mark this item= -No item to show= -No recipes= -No usages= -Only drop if using one of these tools: @1= -Only drop if using this tool: @1= -Quick crafting= -Recipe @1 of @2= -Repairable by step of @1= -Replaced by @1 on burning= -Replaced by @1 on crafting= -Replaced by @1 on smelting= -Shapeless= -Skins= -Sort items (A-Z)= -Sort items (Z-A)= -The inventory is extended by @1 slots= -Trash all items= -Unknown Item (@1)= -Unmark this item= -Usage @1 of @2= diff --git a/i4/locale/template.txt b/i4/locale/template.txt new file mode 100644 index 0000000..f4accae --- /dev/null +++ b/i4/locale/template.txt @@ -0,0 +1,135 @@ +# textdomain: i4 +Inventory= +Clear inventory= +Sort inventory= +Settings= +Go home= +Digging= +Digging (by chance)= +Sort items by name (A-Z)= +Sort items by number of items per stack= +All= +Nodes= +Items= +There is already a bag= +This is not a bag= +@1 (@2% full)= +Teleported to: @1= +You already have set a waypoint at this position= +Welcome back home!= +Your Minetest client needs updating (www.minetest.net)= +Any dye= +Any coal= +Any sand= +Any tree= +Any wool= +Any glass= +Any stick= +Any stone= +Any fence= +Any carpet= +Any flower= +Any leaves= +Any vessel= +Any wood planks= +Any mushroom= +Any red flower= +Any blue flower= +Any black flower= +Any white flower= +Any green flower= +Any orange flower= +Any yellow flower= +Any violet flower= +Any red dye= +Any blue dye= +Any grey dye= +Any pink dye= +Any cyan dye= +Any black dye= +Any white dye= +Any brown dye= +Any green dye= +Any orange dye= +Any yellow dye= +Any violet dye= +Any magenta dye= +Any dark grey dye= +Any dark green dye= +Unknown Item (@1)= +Achievements: @1 of @2 (@3)= +Secret award= +Unlock this award to find out what it is= +New waypoint:= +Add waypoint= +[Click to teleport]= +Remove waypoint= +Change color= +Preview the waypoint area= +Show waypoint= +Hide waypoint= +Rename the bag= +Helmet= +Chest= +Leggings= +Boots= +Shield= +Armor level= +Armor healing= +Confirm trash?= +Yes= +No= +Home= +Style= +Sorting= +No home set= +Set home= +Hide tabs= +HUD description= +Font size: @1= +Enable this option to change the style of the right panel= +Enable this option to show the wielded item description in your HUD= +Enable this option to collapse the inventory list by grouping some items= +Compression= +Reverse mode= +Ignore hotbar= +Automation= +Sorting method:= +Enable this option to compress your inventory= +Enable this option to sort your inventory in reverse order= +Enable this option to sort your inventory except the hotbar slots= +Enable this option to sort your inventory automatically= +Any item belonging to the groups: @1= +Cooking time: @1= +Burning time: @1= +Replaced by @1 on smelting= +Replaced by @1 on burning= +Replaced by @1 on crafting= +Repairable by step of @1= +@1 of chance to drop= +Only drop if using one of these tools: @1= +Only drop if using this tool: @1= +Shapeless= +Cooking= +Custom recipe= +Usage @1 of @2= +Recipe @1 of @2= +Unbookmark this item= +Bookmark this item= +Unable to bookmark this item, limit reached= +Back to item list= +Quick crafting= +Quick Crafting= +Craft (×@1)= +Missing materials for crafting:@1= +No recipes= +No usages= +Search= +Search...= +Clear= +Go to page:= +No item to show= +Collect items to reveal more recipes= +Click to hide= +Click to expand= +Bookmarks= diff --git a/i4/src/api.lua b/i4/src/api.lua index cbf80d8..281e609 100644 --- a/i4/src/api.lua +++ b/i4/src/api.lua @@ -2,6 +2,7 @@ local http = ... local make_fs, get_inventory_fs, confirm_trash_footer_fs, settings_footer_fs = i4.files.gui() local home_footer_fields, confirm_trash_footer_fields, settings_footer_fields = i4.files.fields() +IMPORT("FS") IMPORT("sorter", "sort_inventory", "play_sound") IMPORT("sort", "concat", "copy", "insert", "remove") IMPORT("get_player_by_name", "add_hud_waypoint", "init_hud_notif") @@ -195,7 +196,7 @@ function i4.new_tab(name, def) end i4.new_tab("inventory", { - description = S"Inventory", + description = S("Inventory"), formspec = get_inventory_fs, slots = true, }) @@ -310,7 +311,7 @@ function i4.override_footer_button(name, newdef) end i4.new_footer_button("trash", { - description = S"Clear inventory", + description = S("Clear inventory"), image = "i3_trash.png", formspec = confirm_trash_footer_fs, fields = confirm_trash_footer_fields, @@ -318,7 +319,7 @@ i4.new_footer_button("trash", { i4.new_footer_button("sort", { - description = S"Sort inventory", + description = S("Sort inventory"), image = "i3_sort.png", fields = function(player, data, fields) sort_inventory(player, data) @@ -328,14 +329,14 @@ i4.new_footer_button("sort", { }) i4.new_footer_button("settings", { - description = S"Settings", + description = S("Settings"), image = "i3_settings.png", formspec = settings_footer_fs, fields = settings_footer_fields, }) i4.new_footer_button("home", { - description = S"Go home", + description = S("Go home"), image = "i3_home.png", fields = home_footer_fields, access = function(player, data) @@ -344,12 +345,12 @@ i4.new_footer_button("home", { }) i4.register_craft_type("digging", { - description = S"Digging", + description = S("Digging"), icon = "i3_steelpick.png", }) i4.register_craft_type("digging_chance", { - description = S"Digging (by chance)", + description = S("Digging (by chance)"), icon = "i3_mesepick.png", }) @@ -446,7 +447,7 @@ function i4.add_sorting_method(name, def) end i4.add_sorting_method("alphabetical", { - description = S"Sort items by name (A-Z)", + description = S("Sort items by name (A-Z)"), func = function(list, data) sorter(list, data, 1) return list @@ -454,7 +455,7 @@ i4.add_sorting_method("alphabetical", { }) i4.add_sorting_method("numerical", { - description = S"Sort items by number of items per stack", + description = S("Sort items by number of items per stack"), func = function(list, data) sorter(list, data, 2) return list @@ -561,7 +562,7 @@ function i4.remove_minitab(name) end i4.new_minitab("all", { - description = "All", + description = FS("All"), sorter = function() return true @@ -569,7 +570,7 @@ i4.new_minitab("all", { }) i4.new_minitab("nodes", { - description = "Nodes", + description = FS("Nodes"), sorter = function(item) return core.registered_nodes[item] @@ -577,7 +578,7 @@ i4.new_minitab("nodes", { }) i4.new_minitab("items", { - description = "Items", + description = FS("Items"), sorter = function(item) return core.registered_craftitems[item] or core.registered_tools[item] diff --git a/i4/src/bags.lua b/i4/src/bags.lua index c840d84..7650069 100644 --- a/i4/src/bags.lua +++ b/i4/src/bags.lua @@ -1,7 +1,7 @@ local set_fs = i4.set_fs IMPORT("get_bag_description", "ItemStack") -IMPORT("S", "ES", "fmt", "msg", "slz", "dslz") +IMPORT("S", "FS", "fmt", "msg", "slz", "dslz") IMPORT("get_group", "play_sound", "get_detached_inv", "create_inventory") local function get_content(content) @@ -28,9 +28,9 @@ local function init_bags(player) end if not empty then - msg(name, S"There is already a bag") + msg(name, S("There is already a bag")) else - msg(name, S"This is not a bag") + msg(name, S("This is not a bag")) end return 0, play_sound(name, "i3_cannot", 0.8) @@ -91,7 +91,7 @@ local function init_bags(player) local bag_size = get_group(bagstack:get_name(), "bag") local percent = fmt("%d", (c * 100) / (bag_size * 4)) - meta:set_string("description", ES("@1 (@2% full)", desc, percent)) + meta:set_string("description", FS("@1 (@2% full)", desc, percent)) meta:set_string("content", slz(t)) end diff --git a/i4/src/common.lua b/i4/src/common.lua index a790ae4..e5509f9 100644 --- a/i4/src/common.lua +++ b/i4/src/common.lua @@ -28,7 +28,7 @@ function core.is_creative_enabled(name) end local S = core.get_translator"i4" -local ES = function(...) return core.formspec_escape(S(...)) end +local FS = function(...) return core.formspec_escape(S(...)) end local function is_num(x) return type(x) == "number" @@ -796,7 +796,7 @@ local _ = { -- i18n S = S, - ES = ES, + FS = FS, translate = core.get_translated_string, -- String diff --git a/i4/src/fields.lua b/i4/src/fields.lua index 77c5dcd..73ff548 100644 --- a/i4/src/fields.lua +++ b/i4/src/fields.lua @@ -146,7 +146,7 @@ local function inv_fields(player, data, fields) for _, v in ipairs(data.waypoints) do if vec_round(pos) == vec_round(str_to_pos(v.pos)) then play_sound(name, "i3_cannot", 0.8) - return msg(name, S"You already have set a waypoint at this position") + return msg(name, S("You already have set a waypoint at this position")) end end @@ -394,14 +394,14 @@ local function home_footer_fields(player, data, fields) if not sethome.go(name) then msg(name, "No home set") else - msg(name, S"Welcome back home!") + msg(name, S("Welcome back home!")) end -- Otherwise, use i4’s home. elseif not data.home then msg(name, "No home set") elseif name then safe_teleport(player, str_to_pos(data.home)) - msg(name, S"Welcome back home!") + msg(name, S("Welcome back home!")) end -- Immediately disable this footer-dialogue, since nothing is displayed. @@ -439,7 +439,7 @@ core.register_on_player_receive_fields(function(player, formname, fields) local name = player:get_player_name() if formname == "i4_outdated" then - return false, core.kick_player(name, S"Your Minetest client needs updating (www.minetest.net)") + return false, core.kick_player(name, S("Your Minetest client needs updating (www.minetest.net)")) elseif formname ~= "" then return false end diff --git a/i4/src/groups.lua b/i4/src/groups.lua index 80b18dc..f2839ee 100644 --- a/i4/src/groups.lua +++ b/i4/src/groups.lua @@ -19,44 +19,44 @@ i4.group_stereotypes = { } i4.group_names = { - dye = S"Any dye", - coal = S"Any coal", - sand = S"Any sand", - tree = S"Any tree", - wool = S"Any wool", - glass = S"Any glass", - stick = S"Any stick", - stone = S"Any stone", - fence = S"Any fence", - carpet = S"Any carpet", - flower = S"Any flower", - leaves = S"Any leaves", - vessel = S"Any vessel", - wood = S"Any wood planks", - mushroom = S"Any mushroom", + dye = S("Any dye"), + coal = S("Any coal"), + sand = S("Any sand"), + tree = S("Any tree"), + wool = S("Any wool"), + glass = S("Any glass"), + stick = S("Any stick"), + stone = S("Any stone"), + fence = S("Any fence"), + carpet = S("Any carpet"), + flower = S("Any flower"), + leaves = S("Any leaves"), + vessel = S("Any vessel"), + wood = S("Any wood planks"), + mushroom = S("Any mushroom"), - ["color_red,flower"] = S"Any red flower", - ["color_blue,flower"] = S"Any blue flower", - ["color_black,flower"] = S"Any black flower", - ["color_white,flower"] = S"Any white flower", - ["color_green,flower"] = S"Any green flower", - ["color_orange,flower"] = S"Any orange flower", - ["color_yellow,flower"] = S"Any yellow flower", - ["color_violet,flower"] = S"Any violet flower", + ["color_red,flower"] = S("Any red flower"), + ["color_blue,flower"] = S("Any blue flower"), + ["color_black,flower"] = S("Any black flower"), + ["color_white,flower"] = S("Any white flower"), + ["color_green,flower"] = S("Any green flower"), + ["color_orange,flower"] = S("Any orange flower"), + ["color_yellow,flower"] = S("Any yellow flower"), + ["color_violet,flower"] = S("Any violet flower"), - ["color_red,dye"] = S"Any red dye", - ["color_blue,dye"] = S"Any blue dye", - ["color_grey,dye"] = S"Any grey dye", - ["color_pink,dye"] = S"Any pink dye", - ["color_cyan,dye"] = S"Any cyan dye", - ["color_black,dye"] = S"Any black dye", - ["color_white,dye"] = S"Any white dye", - ["color_brown,dye"] = S"Any brown dye", - ["color_green,dye"] = S"Any green dye", - ["color_orange,dye"] = S"Any orange dye", - ["color_yellow,dye"] = S"Any yellow dye", - ["color_violet,dye"] = S"Any violet dye", - ["color_magenta,dye"] = S"Any magenta dye", - ["color_dark_grey,dye"] = S"Any dark grey dye", - ["color_dark_green,dye"] = S"Any dark green dye", + ["color_red,dye"] = S("Any red dye"), + ["color_blue,dye"] = S("Any blue dye"), + ["color_grey,dye"] = S("Any grey dye"), + ["color_pink,dye"] = S("Any pink dye"), + ["color_cyan,dye"] = S("Any cyan dye"), + ["color_black,dye"] = S("Any black dye"), + ["color_white,dye"] = S("Any white dye"), + ["color_brown,dye"] = S("Any brown dye"), + ["color_green,dye"] = S("Any green dye"), + ["color_orange,dye"] = S("Any orange dye"), + ["color_yellow,dye"] = S("Any yellow dye"), + ["color_violet,dye"] = S("Any violet dye"), + ["color_magenta,dye"] = S("Any magenta dye"), + ["color_dark_grey,dye"] = S("Any dark grey dye"), + ["color_dark_green,dye"] = S("Any dark green dye") } diff --git a/i4/src/gui.lua b/i4/src/gui.lua index 1c9b705..33c3558 100644 --- a/i4/src/gui.lua +++ b/i4/src/gui.lua @@ -14,7 +14,7 @@ IMPORT("min", "max", "floor", "ceil", "round") IMPORT("reg_items", "reg_nodes", "reg_tools", "reg_entities") IMPORT("get_bag_description", "get_detached_inv", "get_recipes") IMPORT("compression_active", "compressible", "recipe_filter_set") -IMPORT("S", "ES", "translate", "ItemStack", "toupper", "utf8_len") +IMPORT("S", "FS", "translate", "ItemStack", "toupper", "utf8_len") IMPORT("true_str", "true_table", "is_fav", "is_num", "str_to_pos") IMPORT("maxn", "sort", "concat", "copy", "insert", "remove", "unpack") IMPORT("extract_groups", "groups_to_items", "is_group", "item_has_groups", "get_group") @@ -146,7 +146,7 @@ local function get_award_list(data, fs, ctn_len, yextra, award_list, awards_unlo local percent = fmt("%.1f%%", (awards_unlocked * 100) / award_list_nb):gsub("%.0", "") add_subtitle(fs, "awards", yextra, ctn_len, 18, false, - ES("Achievements: @1 of @2 (@3)", awards_unlocked, award_list_nb, percent)) + FS("Achievements: @1 of @2 (@3)", awards_unlocked, award_list_nb, percent)) for i = 1, award_list_nb do local award = award_list[i] @@ -165,8 +165,8 @@ local function get_award_list(data, fs, ctn_len, yextra, award_list, awards_unlo local _desc = snip(desc, desc_lim, data.font_size) or desc if not award.unlocked and def.secret then - title = ES"Secret award" - desc = ES"Unlock this award to find out what it is" + title = FS("Secret award") + desc = FS("Unlock this award to find out what it is") end local icon = def.icon or "awards_unknown.png" @@ -283,10 +283,10 @@ end -- Writes the formspec for waypoints, displaying a list of waypoints. local function get_waypoint_fs(fs, data, player, yextra, ctn_len) fs("box[0,%f;4.9,0.6;#bababa25]", yextra + 1.1) - label(0, yextra + 0.85, ES"New waypoint" .. ":") + label(0, yextra + 0.85, FS("New waypoint:")) fs("field[0.1,%f;4.8,0.6;waypoint_name;;]", yextra + 1.1) image_button(5.1, yextra + 1.15, 0.5, 0.5, "", "waypoint_add", "") - fs("tooltip[waypoint_add;%s;#32333899;#fff]", ES"Add waypoint") + fs("tooltip[waypoint_add;%s;#32333899;#fff]", FS("Add waypoint")) if #data.waypoints == 0 then return end fs"style_type[label;font=bold;font_size=17]" @@ -316,7 +316,7 @@ local function get_waypoint_fs(fs, data, player, yextra, ctn_len) v.pos:sub(2,-2):gsub("(%-*%d*%.?%d+)", clr("#dbeeff", " %1"))) if teleport_priv then - tooltip = fmt("%s\n%s", tooltip, clr("#ff0", ES"[Click to teleport]")) + tooltip = fmt("%s\n%s", tooltip, clr("#ff0", FS("[Click to teleport]"))) end tooltip(0, y, ctn_len - 2.1, 0.65, tooltip) @@ -324,23 +324,23 @@ local function get_waypoint_fs(fs, data, player, yextra, ctn_len) local del = fmt("waypoint_%u_delete", i) fs("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", del, PNG.trash, PNG.trash_hover) image_button(ctn_len - 0.5, yi, icon_size, icon_size, "", del, "") - fs("tooltip[%s;%s;#32333899;#fff]", del, ES"Remove waypoint") + fs("tooltip[%s;%s;#32333899;#fff]", del, FS("Remove waypoint")) local rfs = fmt("waypoint_%u_refresh", i) fs("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", rfs, PNG.refresh, PNG.refresh_hover) image_button(ctn_len - 1, yi, icon_size, icon_size, "", rfs, "") - fs("tooltip[%s;%s;#32333899;#fff]", rfs, ES"Change color") + fs("tooltip[%s;%s;#32333899;#fff]", rfs, FS("Change color")) local see = fmt("waypoint_%u_see", i) fs("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", see, waypoint_preview and PNG.search_hover or PNG.search, PNG.search, PNG.search_hover) image_button(ctn_len - 1.5, yi, icon_size, icon_size, "", see, "") - fs("tooltip[%s;%s;#32333899;#fff]", see, ES"Preview the waypoint area") + fs("tooltip[%s;%s;#32333899;#fff]", see, FS("Preview the waypoint area")) local vsb = fmt("waypoint_%u_hide", i) fs("style[%s;fgimg=%s;content_offset=0]", vsb, v.hide and PNG.nonvisible or PNG.visible) image_button(ctn_len - 2, yi, icon_size, icon_size, "", vsb, "") - fs("tooltip[%s;%s;#32333899;#fff]", vsb, v.hide and ES"Show waypoint" or ES"Hide waypoint") + fs("tooltip[%s;%s;#32333899;#fff]", vsb, v.hide and FS("Show waypoint") or FS("Hide waypoint")) if teleport_priv then local tp = fmt("waypoint_%u_teleport", i) @@ -415,7 +415,7 @@ local function get_bag_fs(fs, data, bag_size, yextra) hypertext(1.3, yextra + 0.8, 4.3, 0.6, "content", fmt("
%s
", desc)) image_button(5.22, yextra + 0.835, 0.25, 0.25, "", "bag_rename", "") - fs("tooltip[bag_rename;%s;#32333899;#fff]", ES"Rename the bag") + fs("tooltip[bag_rename;%s;#32333899;#fff]", FS("Rename the bag")) else box(1.7, yextra + 0.82, 2.6, 0.4, "#707070") fs("field[1.8,%f;2.5,0.4;bag_newname;;%s]", yextra + 0.82, desc) @@ -447,7 +447,7 @@ local function get_3darmor_fs(data, fs, player, esc_name, yextra) local stack = armor_inv:get_stack("armor", i) if stack:is_empty() then - local tips = {ES"Helmet", ES"Chest", ES"Leggings", ES"Boots", ES"Shield"} + local tips = {FS("Helmet"), FS("Chest"), FS("Leggings"), FS("Boots"), FS("Shield")} local x = (i - 1) + ((i - 1) * 0.15) local y = yextra + 0.7 @@ -465,12 +465,12 @@ local function get_3darmor_fs(data, fs, player, esc_name, yextra) box(0.8, yextra + 1.95, box_len, 0.4, "#101010") fs"style_type[box;colors=#9dc34c80,#9dc34c,#9dc34c,#9dc34c80]" box(0.8, yextra + 1.95, bar_lvl, 0.4, "") - label(1.1, yextra + 2.15, ES"Armor level") + label(1.1, yextra + 2.15, FS("Armor level")) box(0.8, yextra + 2.55, box_len, 0.4, "#101010") fs"style_type[box;colors=#4466aa80,#4466aa,#4466aa,#4466aa80]" box(0.8, yextra + 2.55, bar_heal, 0.4, "") - label(1.1, yextra + 2.75, ES"Armor healing") + label(1.1, yextra + 2.75, FS("Armor healing")) fs"style_type[label;font_size=16]" end @@ -572,9 +572,9 @@ end -- Get the formspec of the footer “Confirm trash” dialogue. local function confirm_trash_footer_fs(player, data, fs) image(2.8, 10.65, 4.6, 0.7, PNG.bg_goto) - label(3.02, 11, "Confirm trash?") - image_button(5.07, 10.75, 1, 0.5, "", "confirm_trash_yes", "Yes") - image_button(6.17, 10.75, 1, 0.5, "", "confirm_trash_no", "No") + label(3.02, 11, FS("Confirm trash?")) + image_button(5.07, 10.75, 1, 0.5, "", "confirm_trash_yes", FS("Yes")) + image_button(6.17, 10.75, 1, 0.5, "", "confirm_trash_no", FS("No")) end -- Get the formspec of the footer settings-dialogue. @@ -602,13 +602,13 @@ local function settings_footer_fs(player, data, fs) show_sorting and colors.yellow or "#ddd") local X = 2.5 - button(X, 9.1, 1.6, 0.55, "setting_home", "Home") - button(X + 1.7, 9.1, 1.6, 0.55, "setting_style", "Style") - button(X + 3.4, 9.1, 1.6, 0.55, "setting_sorting", "Sorting") + button(X, 9.1, 1.6, 0.55, "setting_home", FS("Home")) + button(X + 1.7, 9.1, 1.6, 0.55, "setting_style", FS("Style")) + button(X + 3.4, 9.1, 1.6, 0.55, "setting_sorting", FS("Sorting")) image_button(X + 5.12, 9.2, 0.25, 0.25, PNG.cancel_hover .. "^\\[brighten", "close_settings", "") if show_home then - local coords, c, str = {"X", "Y", "Z"}, 0, ES"No home set" + local coords, c, str = {"X", "Y", "Z"}, 0, FS("No home set") local home = data.home if sethome then @@ -632,35 +632,35 @@ local function settings_footer_fs(player, data, fs) hypertext(2.2, 9.9, 6, 0.6, "home_pos", fmt("
%s
", str)) fs("style[set_home;padding=20,10,-210,-10;fgimg=%s;fgimg_hovered=%s]", PNG.home_px, PNG.home_px_hover) image_button(4.1, 10.4, 2.2, 0.7, "", "set_home", "") - label(4.9, 10.75, "Set home") + label(4.9, 10.75, FS("Set home")) elseif show_style then - checkbox(2.6, 9.95, "cb_hide_tabs", "Hide tabs", tostring(data.hide_tabs)) - checkbox(2.6, 10.85, "cb_wielditem_hud", "HUD description", tostring(data.wielditem_hud)) + checkbox(2.6, 9.95, "cb_hide_tabs", FS("Hide tabs"), tostring(data.hide_tabs)) + checkbox(2.6, 10.85, "cb_wielditem_hud", FS("HUD description"), tostring(data.wielditem_hud)) if not recipe_filter_set() then checkbox(5.3, 10.85, "cb_collapse", "Collapse list", tostring(data.collapse)) end local sign = (data.font_size > 0 and "+") or (data.font_size > 0 and "-") or "" - label(5.3, 9.95, ES"Font size" .. fmt(": %s", sign .. data.font_size)) + label(5.3, 9.95, FS("Font size: @1", fmt("%s", sign .. data.font_size))) local range = 8 fs("scrollbaroptions[min=-%u;max=%u;smallstep=1;largestep=1;thumbsize=2]", range, range) fs("scrollbar[5.3,10.2;2.55,0.3;horizontal;sb_font_size;%d+]", data.font_size) fs("tooltip[cb_hide_tabs;%s;#32333899;#fff]", - ES"Enable this option to change the style of the right panel") + FS("Enable this option to change the style of the right panel")) fs("tooltip[cb_wielditem_hud;%s;#32333899;#fff]", - ES"Enable this option to show the wielded item description in your HUD") + FS("Enable this option to show the wielded item description in your HUD")) fs("tooltip[cb_collapse;%s;#32333899;#fff]", - ES"Enable this option to collapse the inventory list by grouping some items") + FS("Enable this option to collapse the inventory list by grouping some items")) elseif show_sorting then - checkbox(2.6, 9.95, "cb_inv_compress", "Compression", tostring(data.inv_compress)) - checkbox(2.6, 10.4, "cb_reverse_sorting", "Reverse mode", tostring(data.reverse_sorting)) - checkbox(2.6, 10.85, "cb_ignore_hotbar", "Ignore hotbar", tostring(data.ignore_hotbar)) - checkbox(5.3, 9.95, "cb_auto_sorting", "Automation", tostring(data.auto_sorting)) + checkbox(2.6, 9.95, "cb_inv_compress", FS("Compression"), tostring(data.inv_compress)) + checkbox(2.6, 10.4, "cb_reverse_sorting", FS("Reverse mode"), tostring(data.reverse_sorting)) + checkbox(2.6, 10.85, "cb_ignore_hotbar", FS("Ignore hotbar"), tostring(data.ignore_hotbar)) + checkbox(5.3, 9.95, "cb_auto_sorting", FS("Automation"), tostring(data.auto_sorting)) local methods = {} @@ -669,7 +669,7 @@ local function settings_footer_fs(player, data, fs) insert(methods, name) end - label(5.3, 10.4, ES"Sorting method:") + label(5.3, 10.4, FS("Sorting method:")) fs("dropdown[%f,%f;2.6,0.5;dd_sorting_method;%s;%u;true]", 5.3, 10.6, concat(methods, ","), data.sort) local desc = i4.sorting_methods[data.sort].description @@ -678,13 +678,13 @@ local function settings_footer_fs(player, data, fs) end fs("tooltip[cb_inv_compress;%s;#32333899;#fff]", - ES"Enable this option to compress your inventory") + FS("Enable this option to compress your inventory")) fs("tooltip[cb_reverse_sorting;%s;#32333899;#fff]", - ES"Enable this option to sort your inventory in reverse order") + FS("Enable this option to sort your inventory in reverse order")) fs("tooltip[cb_ignore_hotbar;%s;#32333899;#fff]", - ES"Enable this option to sort your inventory except the hotbar slots") + FS("Enable this option to sort your inventory except the hotbar slots")) fs("tooltip[cb_auto_sorting;%s;#32333899;#fff]", - ES"Enable this option to sort your inventory automatically") + FS("Enable this option to sort your inventory automatically")) end fs"container_end[]" @@ -937,9 +937,9 @@ local function get_output_fs(fs, data, rcp, is_recipe, is_usage, shapeless, righ if custom_recipe and true_str(custom_recipe.description) then tooltip = custom_recipe.description elseif shapeless then - tooltip = S"Shapeless" + tooltip = S("Shapeless") elseif cooking then - tooltip = S"Cooking" + tooltip = S("Cooking") end if tooltip then @@ -1173,14 +1173,14 @@ local function get_rcp_lbl(fs, data, panel, rn, is_recipe, is_usage) local desc = craft_type.description hypertext(data.inv_width + 4.8, data.yoffset + 0.12, 3, 1, "custom_rcp", fmt("%s\n%s", - ES"Custom recipe", ESC(desc))) + FS("Custom recipe"), ESC(desc))) end end - local lbl = ES("Usage @1 of @2", data.unum, rn) + local lbl = FS("Usage @1 of @2", data.unum, rn) if is_recipe then - lbl = ES("Recipe @1 of @2", data.rnum, rn) + lbl = FS("Recipe @1 of @2", data.rnum, rn) end local one = rn == 1 @@ -1257,16 +1257,16 @@ local function get_header(fs, data) if nfavs < max_favs or (nfavs == max_favs and fav) then fs("style[fav;fgimg=i3_fav%s.png;fgimg_hovered=i3_fav%s.png]", fav and "" or "_off", fav and "" or "_off") image_button(star_x, star_y, size, size, "", "fav", "") - fs("tooltip[fav;%s;#32333899;#fff]", fav and ES"Unbookmark this item" or ES"Bookmark this item") + fs("tooltip[fav;%s;#32333899;#fff]", fav and FS("Unbookmark this item") or FS("Bookmark this item")) else fs("style[nofav;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s]", "i3_fav_off.png", PNG.cancel, PNG.cancel) image_button(star_x, star_y, size, size, "", "nofav", "") - fs("tooltip[nofav;%s;#32333899;#fff]", ES"Unable to bookmark this item, limit reached") + fs("tooltip[nofav;%s;#32333899;#fff]", FS("Unable to bookmark this item, limit reached")) end image_button(star_x + 0.05, star_y + 0.6, size, size, "", "exit", "") - fs("tooltip[exit;%s;#32333899;#fff]", ES"Back to item list") + fs("tooltip[exit;%s;#32333899;#fff]", FS("Back to item list")) local desc_lim, name_lim = 34, 35 local desc = get_desc(data.query_item, data.lang_code) @@ -1309,7 +1309,7 @@ local function get_crafting_fs(fs, data, is_recipe, is_usage, max_stacks_rcp, ma fs("style[crafting_%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", name, fmt("%s", show_crafting and PNG.crafting_hover or PNG.crafting), PNG.crafting_hover) image_button(data.inv_width + 7.35, data.yoffset + 0.2, 0.45, 0.45, "", fmt("crafting_%s", name), "") - fs("tooltip[crafting_%s;%s;#32333899;#fff]", name, ES"Quick crafting") + fs("tooltip[crafting_%s;%s;#32333899;#fff]", name, FS("Quick crafting")) if not show_crafting then return end @@ -1331,13 +1331,13 @@ local function get_crafting_fs(fs, data, is_recipe, is_usage, max_stacks_rcp, ma fs"style_type[image,button,image_button;noclip=true]" image(x, data.yoffset + 0.8, 3, 2, PNG.bg_content) fs"style[quick_crafting;font_size=16;textcolor=#ddd]" - button(x, data.yoffset + 0.85, 3.05, 0.55, "quick_crafting", ES"Quick Crafting") + button(x, data.yoffset + 0.85, 3.05, 0.55, "quick_crafting", FS("Quick Crafting")) fs("style[scrbar_%s;noclip=true]", name) fs("scrollbaroptions[min=1;max=%u;smallstep=1]", craft_max) scrollbar(x + 0.2, data.yoffset + 1.45, 2.5, 0.35, "horizontal", fmt("scrbar_%s", name), stack_fs) - button(x + 0.2, data.yoffset + 1.9, 2.5, 0.7, fmt("craft_%s", name), ES("Craft (×@1)", stack_fs)) + button(x + 0.2, data.yoffset + 1.9, 2.5, 0.7, fmt("craft_%s", name), FS("Craft (×@1)", stack_fs)) fs"style_type[label;font_size=16;textcolor=#fff]" fs"style_type[image,button,image_button;noclip=false]" @@ -1387,12 +1387,12 @@ local function get_rcp_extra(fs, data, player, panel, is_recipe, is_usage) end image(X, Y, 0.45, 0.45, PNG.crafting .. "^\\[opacity:100") - tooltip(X, Y, 0.45, 0.45, fmt("%s:%s", ES"Missing materials for crafting", str)) + tooltip(X, Y, 0.45, 0.45, FS("Missing materials for crafting:@1", str)) end get_rcp_lbl(fs, data, panel, rn, is_recipe, is_usage) else - local lbl = is_recipe and ES"No recipes" or ES"No usages" + local lbl = is_recipe and FS("No recipes") or FS("No usages") button(data.inv_width + 0.1, data.yoffset + (panel.height / 2) - 0.5, 7.8, 1, "no_rcp", lbl) end @@ -1437,7 +1437,7 @@ local function get_header_items_fs(fs, data) fs("style[enable_search;bgimg=%s;bgimg_hovered=%s;bgimg_pressed=%s]", data.enable_search and PNG.search_hover or PNG.search, PNG.search_hover, PNG.search_hover) image_button(X + 0.3, 0.2, 0.5, 0.5, "", "enable_search", "") - fs("tooltip[enable_search;%s;#32333899;#fff]", ES"Search") + fs("tooltip[enable_search;%s;#32333899;#fff]", FS("Search")) if data.enable_search then image(X + 0.4, 0.75, 3.4, 0.8, PNG.bg_goto) @@ -1475,7 +1475,7 @@ local function get_header_items_fs(fs, data) else fs("style[search;bgimg=%s]", PNG.search_hover) image_button(X + 0.35, 0.32, 0.35, 0.35, "", "search", "") - fs("tooltip[search;%s;#32333899;#fff]", ES"Search") + fs("tooltip[search;%s;#32333899;#fff]", FS("Search")) if data.enable_search then fs"style[filter;font_size=18]" @@ -1487,14 +1487,14 @@ local function get_header_items_fs(fs, data) end else fs"style_type[label;font=italic;font_size=18]" - label(X + 0.9, 0.49, clr("#aaa", ES"Search...")) + label(X + 0.9, 0.49, clr("#aaa", FS("Search..."))) button(X + 0.8, 0.12, 4, 0.8, "enable_search", "") fs"style_type[label;font=normal;font_size=16]" end if true_str(data.filter) then image_button(X + 4.3, 0.4, 0.2, 0.2, "", "cancel", "") - fs("tooltip[cancel;%s;#32333899;#fff]", ES"Clear") + fs("tooltip[cancel;%s;#32333899;#fff]", FS("Clear")) box(X + 0.85, 0.75, 3.74, 0.01, "#f9826c") end end @@ -1511,7 +1511,7 @@ local function get_header_items_fs(fs, data) if data.goto_page then image(X + 4.8, 0.85, 2.9, 0.8, PNG.bg_goto) fs"style_type[label;font_size=16;textcolor=#ddd]" - label(X + 5, 1.25, ES"Go to page" .. ":") + label(X + 5, 1.25, FS("Go to page:")) box(X + 6.5, 1, 1, 0.45, "#bababa10") fs("style[goto_page;font=mono,bold;font_size=16;textcolor=%s]", colors.yellow) @@ -1570,11 +1570,11 @@ local function get_items_fs(fs, data, player, full_height) end if #items == 0 then - local lbl = ES"No item to show" + local lbl = FS("No item to show") local icon, width, offset = PNG.no_result, 4, 2 if recipe_filter_set() and #i4.init_items > 0 and data.filter == "" then - lbl = ES"Collect items to reveal more recipes" -- Progressive mode, etc. + lbl = FS("Collect items to reveal more recipes") -- Progressive mode, etc. icon, width, offset = PNG.find_more, 2.5, 2.75 end @@ -1619,7 +1619,7 @@ local function get_items_fs(fs, data, player, full_height) if compressible(item, data) then local expand = data.expand == name - fs("tooltip[%s;%s;#32333899;#fff]", item, expand and ES"Click to hide" or ES"Click to expand") + fs("tooltip[%s;%s;#32333899;#fff]", item, expand and FS("Click to hide") or FS("Click to expand")) fs"style_type[label;font=bold;font_size=20]" label(X + 0.65, Y + 0.7, expand and "-" or "+") fs"style_type[label;font=normal;font_size=16]" @@ -1634,7 +1634,7 @@ end local function get_favs(fs, data) local btn_size = i4.settings.item_btn_size - label(data.inv_width + 0.4, data.yoffset + 0.4, ES"Bookmarks") + label(data.inv_width + 0.4, data.yoffset + 0.4, FS("Bookmarks")) for i, item in ipairs(data.favs) do local name = fmt("_%s", item)