WoWInterface SVN phUnitFrames

Compare Revisions

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

Rev 5 → Rev 6

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 Clic gauche |r ";
action = "|cff69ccf0 "..phLib.getLocale("Left click").." |r ";
elseif attr == "type2" then
action = "|cff69ccf0 Clic droit |r ";
action = "|cff69ccf0 "..phLib.getLocale("Right click").." |r ";
elseif attr == "shift-type1" then
action = "|cff69ccf0 Shift+Clic gauche |r ";
action = "|cff69ccf0 Shift+"..phLib.getLocale("Left click").." |r ";
elseif attr == "shift-type2" then
action = "|cff69ccf0 Shift+Clic droit |r ";
action = "|cff69ccf0 Shift+"..phLib.getLocale("Right click").." |r ";
elseif attr == "ctrl-type1" then
action = "|cff69ccf0 Ctrl+Clic gauche |r ";
action = "|cff69ccf0 Ctrl+"..phLib.getLocale("Left click").." |r ";
elseif attr == "ctrl-type2" then
action = "|cff69ccf0 Ctrl+Clic droit |r ";
action = "|cff69ccf0 Ctrl+"..phLib.getLocale("Right click").." |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 = "Cibler";
name = phLib.getLocale("Target");
elseif value == "assist" then
name = "Assister";
name = phLib.getLocale("Assist");
elseif value == "focus" then
name = "Modifier focus";
name = phLib.getLocale("Set focus");
end;
end;
button.tooltip[count] = action..name;
258,11 → 258,11
buttonMenu = function(button)
if button.unit then
local menu = {
{ 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 },
{ 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 },
}
}
};
289,7 → 289,7
end
if button.tooltip then
GameTooltip:AddLine (" ");
GameTooltip:AddLine ("Lancer des sorts sur "..UnitName(unit).." :",1,1,1);
GameTooltip:AddLine (phLib.getLocale("Cast spells on %s",UnitName(unit)).." :",1,1,1);
for i,msg in pairs(button.tooltip) do
GameTooltip:AddLine (msg);
end;
trunk/phUnitFrames.frFR.lua New file
0,0 → 1,32

if GetLocale() == "frFR" then
 
phLib.registerLocales({
 
["Default"] = "Défaut",
["Width"] = "Largeur",
["Height"] = "Hauteur",
["Model"] = "Modèle",
 
["Left click"] = "Clic gauche",
["Right click"] = "Clic droit",
 
["Role"] = "Rôle",
["Tank"] = "Tank",
["Damage"] = "Dégâts",
["Heal"] = "Soin",
 
["Target"] = "Cibler",
["Assist"] = "Assister",
["Set focus"] = "Changer focus",
 
["Show Blizzard Party Frame"] = "Afficher la fenêtre de groupe Blizzard",
["Show role"] = "Afficher le rôle",
["Cast spells on %s"] = "Lancer des sorts sur %s",
 
["Holy Priest"] = "Prêtre Sacré",
["Protection Paladin"] = "Paladin Protection",
 
});
 
end;
\ No newline at end of file
trunk/phUnitFrames.lua
149,13 → 149,13
end;
 
local menu = {
{ text = "Afficher les fenetres par defaut", checked = phUnitFramesConfig.showBlizzardPartyFrame,
{ text = phLib.getLocale("Show Blizzard Party Frame"), checked = phUnitFramesConfig.showBlizzardPartyFrame,
func = function()
phUnitFrames:togglePartyFrame();
end
},
{ text = "Afficher le role", checked = config.showrole, arg1 = frame, func = phUnitFrames.changeShowRole },
{ text = "Largeur", notCheckable = true, hasArrow = true, menuList = {
{ text = phLib.getLocale("Show role"), checked = config.showrole, arg1 = frame, func = phUnitFrames.changeShowRole },
{ text = phLib.getLocale("Width"), 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 = "Hauteur", notCheckable = true, hasArrow = true, menuList = {
{ text = phLib.getLocale("Height"), 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 = "Modele", notCheckable = true, hasArrow = true, menuList = configMenu },
{ text = phLib.getLocale("Model"), notCheckable = true, hasArrow = true, menuList = configMenu },
};
EasyMenu(menu, phMenuFrame, "cursor", 0 , 0, "MENU", 5);
end,
trunk/phUnitFrames.toc
8,6 → 8,8
## 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 = "Defaut",
name = phLib.getLocale("Default"),
spells = {
{ type1="target" }, -- Cible
{ type2="assist" }, -- Assister
27,7 → 27,7
}
},
{
name = "Pretre Sacre",
name = phLib.getLocale("Holy Priest"),
spells = {
{ type1="target" }, -- Cible
{ type2="assist" }, -- Assister
105,7 → 105,7
},
},
{
name = "Paladin Protection",
name = phLib.getLocale("Protection Paladin"),
spells = {
{ type1="spell", spell1=31789 }, -- Défense vertueuse
{ type2="spell", spell2=633 }, -- Imposition des mains
trunk/phLib.lua
19,5 → 19,22
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/phUnitFrames.enUS.lua New file
0,0 → 1,22

\ No newline at end of file