Spanish Localization
I did some translation for spanish, but the nodes don't show up on the map.
`elseif ( GetLocale() == "esES" ) then -- Spanish localized variables GATHERER_VERSION_WARNING="Nueva versión de Gatherer detectado, verifica pareja de zona."; GATHERER_NOTEXT="([-]) no hay texto"
-- TRADE NAME
TRADE_HERBALISM="Botánica"
OLD_TRADE_HERBALISM="Botánica"
TRADE_MINING="Minería"
TRADE_OPENING="Abriendo"
GATHER_HERBALISM="Recolectar Hierbas"
-- strings for gather line in chat
HERB_GATHER_STRING="Usted Recolecta Hierbas en"
ORE_GATHER_STRING="Usted Recolecta Minerales en"
TREASURE_GATHER_STRING="Usted abre"
-- Length of the string to keep the gather name
HERB_GATHER_LENGTH=31
HERB_GATHER_END=-2
ORE_GATHER_LENGTH=23
ORE_GATHER_END=-2
TREASURE_GATHER_LENGTH=24
TREASURE_GATHER_END=-2
GATHERER_REQUIRE="Requiere"
GATHERER_NOSKILL="Requiere"
-- ore classes
ORE_CLASS_VEIN ="filón"
ORE_CLASS_DEPOSIT="depósito"
-- ore types
ORE_COPPER ="cobre"
ORE_TIN ="estaño"
ORE_IRON ="hierro"
ORE_SILVER ="plata"
ORE_TRUESILVER="veraplata"
ORE_GOLD ="oro"
ORE_MITHRIL ="mitril"
ORE_THORIUM ="thorio"
ORE_RTHORIUM ="thorio (rico)"
ORE_DARKIRON ="hierro negro"
-- herb types
HERB_ARTHASTEAR ="Lágrimas de Arthas"
HERB_BLACKLOTUS ="Loto negro"
HERB_BLINDWEED ="Carolina"
HERB_BRIARTHORN ="Brezoespina"
HERB_BRUISEWEED ="Hierba cardenal"
HERB_DREAMFOIL ="Hojasueño"
HERB_EARTHROOT ="Raiz de tierra"
HERB_FADELEAF ="Pálida"
HERB_FIREBLOOM ="Flor de fuego"
HERB_GHOSTMUSHROOM ="Champiñón fantasma"
HERB_GOLDENSANSAM ="Sansam dorado"
HERB_GOLDTHORN ="Espina de oro"
HERB_GRAVEMOSS ="Musgo de tumba"
HERB_GROMSBLOOD ="Gromsanguina"
HERB_ICECAP ="Setelo"
HERB_KHADGARSWHISKER ="Mostacho de Khadgar"
HERB_KINGSBLOOD ="Sangrerregia"
HERB_LIFEROOT ="Vidarraíz"
HERB_MAGEROYAL ="Marregal"
HERB_MOUNTAINSILVERSAGE="Salviargenta de montaña"
HERB_PEACEBLOOM ="Flor de paz"
HERB_PLAGUEBLOOM ="Musgopena"
HERB_PURPLELOTUS ="Loto cárdeno"
HERB_SILVERLEAF ="Hojaplata"
HERB_STRANGLEKELP ="Alga estanguladora"
HERB_SUNGRASS ="Solea"
HERB_SWIFTTHISTLE ="Cardopresto"
HERB_WILDSTEELBLOOM ="Acérita salvaje"
HERB_WINTERSBITE ="Dientes de dragón"
HERB_WILDVINE ="Atriplex salvaje"
-- treasure types
TREASURE_BOX ="Caja"
TREASURE_CHEST ="chest"
TREASURE_CLAM ="giant clam"
TREASURE_CRATE ="crate"
TREASURE_BARREL ="barrel"
TREASURE_CASK ="cask"
TREASURE_SHELLFISHTRAP ="shellfish trap"
TREASURE_FOOTLOCKER = "footlocker"
TREASURE_BLOODHERO = "Sangre de héroes"
TREASURE_UNGOROSOIL = "un'goro soil"
TREASURE_UNGOROSOIL_G = "dirt pile"
TREASURE_BLOODPETAL = "bloodpetal"
TREASURE_BLOODPETAL_G = "bloodpetal sprout"
TREASURE_POWERCRYST = "power crystal"
TREASURE_NIGHTDRAGON = "night dragon"
TREASURE_WHIPPERROOT = "whipper root"
TREASURE_WINDBLOSSOM = "windblossom"
TREASURE_SONGFLOWER = "songflower"
TREASURE_FISHNODE_TRIGGER1 = "Trunk";
-- TREASURE_FISHNODE_TRIGGER2 = "Bloated"; -- no longer found in wreckage in 1.11 TREASURE_FISHNODE_TRIGGER3 = "swarm"; TREASURE_FISHNODE_TRIGGER4 = "school"; TREASURE_FISHNODE_TRIGGER5 = "floating wreckage"; TREASURE_FISHNODE_TRIGGER6 = "oil spill"; TREASURE_FISHNODE_TRIGGER7 = "patch of elemental water";
TREASURE_FISHNODE = "school";
TREASURE_FISHWRECK = TREASURE_FISHNODE_TRIGGER5;
TREASURE_FISHELEM = TREASURE_FISHNODE_TRIGGER7;
GATHERER_ReceivesLoot = "You receive loot: (.+)%.";
TREASURE_REGEX = {
[1] = " ([^ ]+)$",
[2] = "^([^ ]+)",
[3] = "([^ ]+) ([^ ]+) ",
};
function Gatherer_FindOreType(input)
local i,j, oreType, oreClass, oreTypeClass;
if ( string.find(input, "rich") and string.find(input, "thorium") ) then
return ORE_RTHORIUM;
end;
if ( string.find(input, "dark") and string.find(input, "iron") ) then
return ORE_DARKIRON;
end
i,j, oreType, oreClass = string.find(input, "([^ ]+) ([^ ]+)$");
if (oreType and oreClass and ((oreClass == ORE_CLASS_VEIN) or (oreClass == ORE_CLASS_DEPOSIT))) then
return oreType;
end
return;
end
function Gatherer_FindTreasureType(in_input)
local iconName, input;
input = string.gsub(in_input, GATHERER_NOTEXT, "")
if ( string.find(input, TREASURE_UNGOROSOIL_G) or string.find(input, TREASURE_UNGOROSOIL)) then
return TREASURE_UNGOROSOIL, TREASURE_UNGOROSOIL;
end
if (string.find(input, TREASURE_POWERCRYST) ) then
return TREASURE_POWERCRYST, TREASURE_POWERCRYST;
end
if (string.find(input, TREASURE_BLOODPETAL_G) or string.find(input, TREASURE_BLOODPETAL)) then
return TREASURE_BLOODPETAL, TREASURE_BLOODPETAL_G;
end
if (string.find(input, TREASURE_BLOODHERO) ) then
return TREASURE_BLOODHERO, TREASURE_BLOODHERO;
end
for iconName in Gather_DB_IconIndex[0] do
local index, treasure_regex, i, j, treasType;
if ( input == iconName ) then
return iconName;
end
if ( string.find(input, iconName) ) then
for index, treasure_regex in TREASURE_REGEX do
i,j, treasType = string.find(input, treasure_regex);
if ( treasType and treasType == iconName ) then
return iconName;
end
i,j, _, treasType = string.find(input, treasure_regex);
if ( treasType and treasType == iconName ) then
return iconName;
end
end
end
end
return;
end`
Thanks! Can you make a pull request?
When I click create a new pull request, I don't see anything that lets me put in code.
Yeah, you need to create a fork first.
thanks jsb, I am doing more work on the localization for both the UI_localization and localization folder. I have a question about zone matching though. How do I do the zone match in the gatherregiondata file? Would it be like this? And then when I do that what is the source and which is the destination? Does everything need to be in alphabetical order for the localized version in that file? As in, I match whatever my entry is for [1,1] in spanish with the corresponding set in english?
Is zone matching the reason for localized versions not showing the map nodes? ["ES 1_12_0"] = { ["ES 1_12_0"] = { -- Identical for name fixes purpose only { 1, 2, 3, 4, 5, 6, 7, 8, 9 ,10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ,15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }; }; ["US/UK"] = { { 1, 2, 21, 20, 4, 6, 5, 9, 8, 14, 17, 7, 18, 11, 12, 10, 13, 3, 15, 16, 19 }, { 8, 17, 21, 11, 7, 6, 10, 16, 15, 2, 12, 14, 20, 25, 13, 9, 23, 19, 24, 1, 5, 4, 3, 22, 18 }; },
I was using an older version of gatherer, I didn't realize I was not using the one on your github. However, I moved my work onto your fork and I am getting this error when I open WoW on my spanish client
[2017/07/28 21:12:23-93]: Gatherer\Gatherer.lua:1400: attempt to index global GatherRegionData' (a nil value) Gatherer\Gatherer.lua:1400: in function Gatherer_AbsCoord'
Gatherer\Gatherer.lua:1224: in function Gatherer_FindClosest' Gatherer\Gatherer.lua:849: in function Gatherer_OnUpdate'
Gatherer\Gatherer.lua:743: in function `Gatherer_TimeCheck'
Is this an issue with zone matching? Which language should be the source and which the destination?