魔兽世界美服10.1更新在即,刚刚来到美服的朋友需要用到一些插件,很多是没有汉化版本的,我们可以在不侵犯作者权益的前提下,通过编辑插件中的一些信息来进行汉化
这里找到了一个WA的例子,是一个追踪每周知识点数获取的WA插件:
local objectives = {
{name="Disturbed Dirt or Expedition Scout's Pack (Alchemy)", quests={66373, 66374}, optionKey="alchemy", skillID=171},
{name="Disturbed Dirt or Expedition Scout's Pack (Blacksmithing)", quests={66381, 66382}, optionKey="blacksmithing", skillID=164},
{name="Disturbed Dirt or Expedition Scout's Pack (Enchanting)", quests={66377, 66378}, optionKey="enchanting", skillID=333},
{name="Disturbed Dirt or Expedition Scout's Pack (Engineering)", quests={66379, 66380}, optionKey="engineering", skillID=202},
{name="Disturbed Dirt or Expedition Scout's Pack (Inscription)", quests={66375, 66376}, optionKey="inscription", skillID=773},
{name="Disturbed Dirt or Expedition Scout's Pack (Jewelcrafting)", quests={66388, 66389}, optionKey="jewelcrafting", skillID=755},
{name="Disturbed Dirt or Expedition Scout's Pack (Leatherworking)", quests={66384, 66385}, optionKey="leatherworking", skillID=165},
{name="Disturbed Dirt or Expedition Scout's Pack (Tailoring)", quests={66386, 66387}, optionKey="tailoring", skillID=197},
{name="Elementious Splinter - Elemental Enemies (Alchemy)", quests={70511}, optionKey="alchemy", skillID=171},
{name="Decaying Phlegm - Rousing Decay Enemies (Alchemy)", quests={70504}, optionKey="alchemy", skillID=171},
{name="Molten Globule - Rousing Fire Enemies (Blacksmithing)", quests={70513}, optionKey="blacksmithing", skillID=164},
{name="Primeval Earth Fragment - Rousing Earth Enemies (Blacksmithing)", quests={70512}, optionKey="blacksmithing", skillID=164},
{name="Primalist Charm - Humanoid Primalist Enemies (Enchanting)", quests={70515}, optionKey="enchanting", skillID=333},
{name="Primordial Aether - Arcane Enemies (Enchanting)", quests={70514}, optionKey="enchanting", skillID=333},
{name="Infinitely Attachable Pair o' Docks - Dragonkin Enemies (Engineering)", quests={70517}, optionKey="engineering", skillID=202},
{name="Keeper's Mark - Titan Enemies (Engineering)", quests={70516}, optionKey="engineering", skillID=202},
{name="Draconic Glamour - Dragonkin Enemies (Inscription)", quests={70519}, optionKey="inscription", skillID=773},
{name="Curious Djaradin Rune - Djaradin Enemies (Inscription)", quests={70518}, optionKey="inscription", skillID=773},
{name="Elegantly Engraved Embellishment - Nokhud/Sundered Flame Enemies (Jewelcrafting)", quests={70521}, optionKey="jewelcrafting", skillID=755},
{name="Incandescent Curio - Elemental Enemies (Jewelcrafting)", quests={70520}, optionKey="jewelcrafting", skillID=755},
{name="Exceedingly Soft Skin - Slyvern/Vorquin Enemies (Leatherworking)", quests={70523}, optionKey="leatherworking", skillID=165},
{name="Ossified Hide - Proto-drake or Proto-dragon Enemies (Leatherworking)", quests={70522}, optionKey="leatherworking", skillID=165},
{name="Ohn'arhan Weave - Nokhud Enemies (Tailoring)", quests={70524}, optionKey="tailoring", skillID=197},
{name="Stupidly Effective Stitchery - Gnoll Enemies (Tailoring)", quests={70525}, optionKey="tailoring", skillID=197},
{name="Dreambloom (Herbalism)", quests={71857, 71858, 71859, 71860, 71861, 71864}, optionKey="herbalism", skillID=182},
{name="Iridescent Ore (Mining)", quests={72160, 72161 ,72162, 72163, 72164, 72165}, optionKey="mining", skillID=186},
{name="Curious Hide (Skinning)", quests={70381, 70383, 70384, 70385, 70386, 70389}, optionKey="skinning", skillID=393},
{name="Draconic Treatise (Alchemy)", quests={74108}, optionKey="alchemy", skillID=171},
{name="Draconic Treatise (Blacksmithing)", quests={74109}, optionKey="blacksmithing", skillID=164},
{name="Draconic Treatise (Enchanting)", quests={74110}, optionKey="enchanting", skillID=333},
{name="Draconic Treatise (Engineering)", quests={74111}, optionKey="engineering", skillID=202},
{name="Draconic Treatise (Herbalism)", quests={74107}, optionKey="herbalism", skillID=182},
{name="Draconic Treatise (Inscription)", quests={74105}, optionKey="inscription", skillID=773},
{name="Draconic Treatise (Jewelcrafting)", quests={74112}, optionKey="jewelcrafting", skillID=755},
{name="Draconic Treatise (Leatherworking)", quests={74113}, optionKey="leatherworking", skillID=165},
{name="Draconic Treatise (Mining)", quests={74106}, optionKey="mining", skillID=186},
{name="Draconic Treatise (Skinning)", quests={74114}, optionKey="skinning", skillID=393},
{name="Draconic Treatise (Tailoring)", quests={74115}, optionKey="tailoring", skillID=197},
{name="Valdrakken Profession Quests (Alchemy)", quests={70530, 66940, 66938, 72427, 70532, 70531, 70533, 66937}, optionKey="alchemy", skillID=171, useWorldState=true},
{name="Valdrakken Profession Quests (Blacksmithing)", quests={66941, 70233, 66517, 66897, 70235, 72398, 70234, 70211}, optionKey="blacksmithing", skillID=164, useWorldState=true},
{name="Valdrakken Profession Quests (Enchanting)", quests={66884, 66900, 66935, 72155, 72172, 72173, 72175, 72423}, optionKey="enchanting", skillID=333, useWorldState=true},
{name="Valdrakken Profession Quests (Engineering)", quests={72396, 70545, 66891, 70540, 66890, 66942, 70557, 70539}, optionKey="engineering", skillID=202, useWorldState=true},
{name="Valdrakken Profession Quests (Herbalism)", quests={70614, 70613, 70616}, optionKey="herbalism", skillID=182, useWorldState=true},
{name="Valdrakken Profession Quests (Inscription)", quests={66943, 66944, 70559, 70561, 70558, 70560, 66945, 72438}, optionKey="inscription", skillID=773, useWorldState=true},
{name="Valdrakken Profession Quests (Jewelcrafting)", quests={66516, 70565, 66950, 66949, 72428, 70564, 70563, 70562}, optionKey="jewelcrafting", skillID=755, useWorldState=true},
{name="Valdrakken Profession Quests (Leatherworking)", quests={66364, 66951, 70569, 70568, 70567, 70571, 72407, 66363}, optionKey="leatherworking", skillID=165, useWorldState=true},
{name="Valdrakken Profession Quests (Mining)", quests={70617, 70618, 72157}, optionKey="mining", skillID=186, useWorldState=true},
{name="Valdrakken Profession Quests (Skinning)", quests={70620, 72159, 70619}, optionKey="skinning", skillID=393, useWorldState=true},
{name="Valdrakken Profession Quests (Tailoring)", quests={72410, 70587, 66952, 70586, 70572, 70582, 66953, 66899}, optionKey="tailoring", skillID=197, useWorldState=true},
{name="Crafting Order Quest (Blacksmithing)", quests={70589}, optionKey="blacksmithing", skillID=164},
{name="Crafting Order Quest (Engineering)", quests={70591}, optionKey="engineering", skillID=202},
{name="Crafting Order Quest (Inscription)", quests={70592}, optionKey="inscription", skillID=773},
{name="Crafting Order Quest (Jewelcrafting)", quests={70593}, optionKey="jewelcrafting", skillID=755},
{name="Crafting Order Quest (Leatherworking)", quests={70594}, optionKey="leatherworking", skillID=165},
{name="Crafting Order Quest (Tailoring)", quests={70595}, optionKey="tailoring", skillID=197},
}
-- This returns true if at least one of the required quests is currently active.
local is_active = function(objective)
if not aura_env.config[objective.optionKey] then
return false
end
if not objective.required_quests then
return true
end
for _, q in ipairs(objective.required_quests) do
if C_TaskQuest.GetQuestTimeLeftSeconds(q) or C_QuestLog.IsQuestFlaggedCompleted(q) then
return true
end
end
end
下面的内容较多,这里就省略了。
这里我们找到了需要汉化的信息,往往只有字符串是需要进行汉化的,因为我们只需要针对游戏中显示出来的信息进行翻译,那么就提取出来了上面的内容,先把他们保存下来!
这里涉及到语言处理的内容,里面有 name
和 quests
这种人类语言相关的代码,我们使用机翻时很有可能会把他们也翻译掉,就失去了代码的意义,这里有2个解决办法:
重新核对一些必要的关键信息,请确保你翻译出来的内容拥有一个不错的质量!
举例展示开头:
local objectives = {{
name = "被扰动的泥土或远征侦察者的背包(炼金术)",
quests = {66373, 66374},
optionKey = "alchemy",
skillID = 171
}, {
name = "被扰动的泥土或远征侦察者的背包(锻造)",
quests = {66381, 66382},
optionKey = "blacksmithing",
skillID = 164
}, {
name = "被扰动的泥土或远征侦察者的背包(附魔)",
quests = {66377, 66378},
optionKey = "enchanting",
skillID = 333
}, {