WoWInterface SVN phUnitFrames

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 6 to Rev 5
    Reverse comparison

Rev 6 → Rev 5

trunk/phUnitFrames.enUS.lua File deleted \ No newline at end of file
trunk/phUnitFrames.frFR.lua File deleted \ No newline at end of file
trunk/phLib.lua
19,22 → 19,5
end
return _copy(object)
end,
 
getLocale = function(id,...)
local msg = phLocale[id];
if not msg then
msg = id;
end;
return string.format(msg,...);
end,
 
registerLocales = function(table)
for id,msg in pairs(table) do
phLocale[id] = msg;
end;
end,
 
}
 
phLocale = {
}
trunk/phUnitFrame.lua
219,17 → 219,17
for attr,value in pairs(spells[count]) do
button:SetAttribute(attr,value);
if attr == "type1" then
action = "|cff69ccf0 "..phLib.getLocale("Left click").." |r ";
action = "|cff69ccf0 Clic gauche |r ";
elseif attr == "type2" then
action = "|cff69ccf0 "..phLib.getLocale("Right click").." |r ";
action = "|cff69ccf0 Clic droit |r ";
elseif attr == "shift-type1" then
action = "|cff69ccf0 Shift+"..phLib.getLocale("Left click").." |r ";
action = "|cff69ccf0 Shift+Clic gauche |r ";
elseif attr == "shift-type2" then
action = "|cff69ccf0 Shift+"..phLib.getLocale("Right click").." |r ";
action = "|cff69ccf0 Shift+Clic droit |r ";
elseif attr == "ctrl-type1" then
action = "|cff69ccf0 Ctrl+"..phLib.getLocale("Left click").." |r ";
action = "|cff69ccf0 Ctrl+Clic gauche |r ";
elseif attr == "ctrl-type2" then
action = "|cff69ccf0 Ctrl+"..phLib.getLocale("Right click").." |r ";
action = "|cff69ccf0 Ctrl+Clic droit |r ";
elseif string.find(attr,"spell") then
local spellname, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange = GetSpellInfo(value);
if rank and rank ~= "" then
244,11 → 244,11
end;
end;
if value == "target" then
name = phLib.getLocale("Target");
name = "Cibler";
elseif value == "assist" then
name = phLib.getLocale("Assist");
name = "Assister";
elseif value == "focus" then
name = phLib.getLocale("Set focus");
name = "Modifier focus";
end;
end;
button.tooltip[count] = action..name;
258,11 → 258,11
buttonMenu = function(button)
if button.unit then
local menu = {
{ text = phLib.getLocale("Role"), notCheckable = true, hasArrow = true, menuList = {
{ text = phLib.getLocale("Default"), checked = (not button.role), arg1 = button, arg2 = nil, func = phUnitFrame.changeRole },
{ text = phLib.getLocale("Tank"), checked = (button.role == 1), arg1 = button, arg2 = 1, func = phUnitFrame.changeRole },
{ text = phLib.getLocale("Damage"), checked = (button.role == 2), arg1 = button, arg2 = 2, func = phUnitFrame.changeRole },
{ text = phLib.getLocale("Heal"), checked = (button.role == 3), arg1 = button, arg2 = 3, func = phUnitFrame.changeRole },
{ text = "Role", notCheckable = true, hasArrow = true, menuList = {
{ text = "Defaut", checked = (not button.role), arg1 = button, arg2 = nil, func = phUnitFrame.changeRole },
{ text = "Tank", checked = (button.role == 1), arg1 = button, arg2 = 1, func = phUnitFrame.changeRole },
{ text = "DPS", checked = (button.role == 2), arg1 = button, arg2 = 2, func = phUnitFrame.changeRole },
{ text = "Soin", checked = (button.role == 3), arg1 = button, arg2 = 3, func = phUnitFrame.changeRole },
}
}
};
289,7 → 289,7
end
if button.tooltip then
GameTooltip:AddLine (" ");
GameTooltip:AddLine (phLib.getLocale("Cast spells on %s",UnitName(unit)).." :",1,1,1);
GameTooltip:AddLine ("Lancer des sorts sur "..UnitName(unit).." :",1,1,1);
for i,msg in pairs(button.tooltip) do
GameTooltip:AddLine (msg);
end;
trunk/phUnitFrames.lua
149,13 → 149,13
end;
 
local menu = {
{ text = phLib.getLocale("Show Blizzard Party Frame"), checked = phUnitFramesConfig.showBlizzardPartyFrame,
{ text = "Afficher les fenetres par defaut", checked = phUnitFramesConfig.showBlizzardPartyFrame,
func = function()
phUnitFrames:togglePartyFrame();
end
},
{ text = phLib.getLocale("Show role"), checked = config.showrole, arg1 = frame, func = phUnitFrames.changeShowRole },
{ text = phLib.getLocale("Width"), notCheckable = true, hasArrow = true, menuList = {
{ text = "Afficher le role", checked = config.showrole, arg1 = frame, func = phUnitFrames.changeShowRole },
{ text = "Largeur", notCheckable = true, hasArrow = true, menuList = {
{ text = 100, checked = (config.width==100), arg1 = frame, arg2 = 100, func = phUnitFrames.changeWidth },
{ text = 125, checked = (config.width==125), arg1 = frame, arg2 = 125, func = phUnitFrames.changeWidth },
{ text = 150, checked = (config.width==150), arg1 = frame, arg2 = 150, func = phUnitFrames.changeWidth },
165,7 → 165,7
{ text = 250, checked = (config.width==250), arg1 = frame, arg2 = 250, func = phUnitFrames.changeWidth },
}
},
{ text = phLib.getLocale("Height"), notCheckable = true, hasArrow = true, menuList = {
{ text = "Hauteur", notCheckable = true, hasArrow = true, menuList = {
{ text = 12, checked = (config.height==12), arg1 = frame, arg2 = 12, func = phUnitFrames.changeHeight },
{ text = 14, checked = (config.height==14), arg1 = frame, arg2 = 14, func = phUnitFrames.changeHeight },
{ text = 16, checked = (config.height==16), arg1 = frame, arg2 = 16, func = phUnitFrames.changeHeight },
175,7 → 175,7
{ text = 24, checked = (config.height==24), arg1 = frame, arg2 = 24, func = phUnitFrames.changeHeight },
}
},
{ text = phLib.getLocale("Model"), notCheckable = true, hasArrow = true, menuList = configMenu },
{ text = "Modele", notCheckable = true, hasArrow = true, menuList = configMenu },
};
EasyMenu(menu, phMenuFrame, "cursor", 0 , 0, "MENU", 5);
end,
trunk/phUnitFrames.toc
8,8 → 8,6
## SavedVariablesPerCharacter: phUnitFramesConfig
phVars.lua
phLib.lua
phUnitFrames.enUS.lua
phUnitFrames.frFR.lua
phUnitFramesModels.lua
phUnitFrame.lua
phUnitFrames.lua
trunk/phUnitFramesModels.lua
1,6 → 1,6
phUnitFramesModels = {
{
name = phLib.getLocale("Default"),
name = "Defaut",
spells = {
{ type1="target" }, -- Cible
{ type2="assist" }, -- Assister
27,7 → 27,7
}
},
{
name = phLib.getLocale("Holy Priest"),
name = "Pretre Sacre",
spells = {
{ type1="target" }, -- Cible
{ type2="assist" }, -- Assister
105,7 → 105,7
},
},
{
name = phLib.getLocale("Protection Paladin"),
name = "Paladin Protection",
spells = {
{ type1="spell", spell1=31789 }, -- Défense vertueuse
{ type2="spell", spell2=633 }, -- Imposition des mains