vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --FlexBar_Localization.lua
2 --[[
3 (DJE) File Created 09/02/2005
4 (DJE) 09/02/2005 Added basic skeleton
5  
6 ]]--
7 --[[
8 This file is the future home of the localizations code and strings
9  
10 As for now I'm just gonna make a list of every string literal
11 that may need localization in the .lua files to aid in
12 developing a nameing convention for the strings, and to get a better idea
13 how big of a job the localization will be.
14  
15 I have not looked at the xmls at all
16  
17 We have to be careful, about strings like "button" only
18 public strings need to be localized with things like this not internals
19 But i'm not sure how seperable these are
20  
21  
22 Any lines with util:print(), util:echo(), FB_ReportToUser() need altered
23  
24 _Conditionals.lua
25 local precedence = {["or<>"] = 1, ["and<>"] = 2, ["not<>"] = 3, ["begin<>"] = 4, ["end<>"] = 5}
26 and many comparisons to these values in the file
27  
28 90ish names of the conditionals
29  
30 _UtilityClasses.lua
31 color names? I'm not sure if the user can see or enter these anyplace
32  
33 a couple or twenty error message lines like: "Error: " .. index .. " is required")
34 These could be tricky because they need to be gramarizable ... i am guessing they will need to be function calls
35 ie msg = FBL_UTIL_ERROR_INDEX_REQUIRED(index)
36 in localization.lua function FBL_UTIL_ERRORMSG_INDEX_REQUIRED =
37 function (index) return "Error: " .. index .. " is required" end
38  
39 _SlashCommands.lua
40 for every command a few strings for example:
41 scmd:AddCommand("remap", FB_Command_ReMap, "misc",
42 "/FlexBar ReMap Button=<buttons> Base=<id> [Reset='True']")
43 -- populate the parameter list for this command
44 -- arguments are: command, parameter name, required, strict, types, allowed, default
45 scmd:AddParam("remap","button",OPTIONAL,STRICT,{"number","table"},{lowerbound=1,upperbound=FBNumButtons}, nil)
46 scmd:AddParam("remap","group" ,OPTIONAL,STRICT,{"number"},{lowerbound=1,upperbound=FBNumButtons}, nil)
47 scmd:AddParam("remap","base" ,REQUIRED,STRICT,{"number"},{lowerbound=1,upperbound=120}, nil)
48 scmd:AddParam("remap","toggle",OPTIONAL,STRICT,{"string"},{"true"},nil)
49 scmd:AddParam("remap","reset" ,OPTIONAL,NON_STRICT,{"string"},{"true"},nil)
50 scmd:AddParam("remap","on" ,OPTIONAL,NON_STRICT,{"string"},FBEventList,nil)
51 scmd:AddParam("remap","target",OPTIONAL,NON_STRICT,nil,nil,nil)
52 scmd:AddParam("remap","if" ,OPTIONAL,NON_STRICT,{"string"},FBConditionList,nil)
53 scmd:AddParam("remap","in" ,OPTIONAL,NON_STRICT,{"number"},nil,nil)
54 scmd:AddParam("remap","tname" ,OPTIONAL,NON_STRICT,{"string"},nil,nil)
55 scmd:AddParam("remap","ttoggle",OPTIONAL,STRICT,{"string"},{"true"},nil)
56  
57 we would need "remap" "/FlexBar ReMap Button=<buttons> Base=<id> [Reset='True']"
58 FBL_COMMAND_NAME_REMAP="remap"
59 FBL_COMMAND_CHATHELP_REMAP="/FlexBar ReMap Button=<buttons> Base=<id> [Reset='True']"
60 most arguments (like "button","toggle" etc) can be reused so it's not too bad
61  
62 5 catagory help like
63 "For Show/Hide Grid, lock and text, group=<group> may be substituted for Button=<...>"
64  
65 A bunch more error messages
66  
67  
68 _HelperFunctions.lua
69 This file is quite furry, lots of bug creating potential in here
70  
71 A bunch of these:
72 FB_ReportToUser("<< FB_GetCoords: ReSet Button #"..buttonnum.." to ("..x..","..y..") >>");
73 NOTE: All FB_ReportToUser strings are strictly for debugging and testing purposes and will not be displayed to the
74 average user of the program - probly no-need to localize these strings
75  
76 also a bunch of util:print(), util:echo() lines
77  
78 Stuff like this, which will not work if we localize the commands:
79 FBcmd:Dispatch("runmacro macro='"..string.sub(msg,lasti+1).."' in=".. seconds)
80  
81 There are a lot of other literals which I'm not sure of
82 the function FB_ItemEnchantEvents() is crawling with them for example
83  
84 _GUIParamInfo.lua
85 just about every line in the file ;)
86  
87 _GUIEventInfo.lua
88 just about every line in this one too
89  
90 _GUI.lua
91 This file is full of stuff too
92  
93 _Globals.lua
94 lots of FBXxxList variables need to be examined by someone who actualy understands what these are for
95  
96 _EventHandlers.lua
97 Another big one here.
98 Lots of commands,events etc are refrenced with literals
99 lots of the usual echos,prints, and FBReportToUsers in here
100  
101 _Flexbar.lua
102 There are alot of literals that I am not sure of, because of ignorance about the engine
103 the usual echos, prints, and FBReportToUsers
104 60 or so keybinding names
105  
106 _TextSub.lua
107 nearly every line, this is text substitutions after all :)
108 Doesn't look too difficult really
109  
110 _config.lua
111 low priority in my opinion, but if we locolize commands the configs in here may not work.
112  
113 ]]--
114  
115 --This variable is for debugging in case we want to see what translation block was exicuted
116 local FBL_LOCALIZATION_MODEUSED="noNE"
117  
118  
119 function FBLocalize()
120 --This functions should be called after variables are loaded, and before profile loading
121 --Sets localization strings to the local WoW is set for
122  
123 --ENGLISH
124 --Set all english strings first, they will be the default if WoW is later distributed in a
125 --Language we don't have here, and/or until these are all translated
126  
127 --
128 -- FlexBar SlashCommands strings
129 FB_NOGROUP_ERR = "No such group"
130 FB_MENUPOPUP_TRIGGER_ERR = "Trigger not part of group %d"
131 FB_MENUPOPUP_ALIGN_ERR = "Unrecognized alignment: %s"
132 FB_AUTOARRANGE_RPT = "%d auto-arranged"
133 FB_GROUP_MEMBERS_ERR = "Error: Groups must have more than one member"
134 FB_GROUP_ANCHOR_ERR = "Error: Anchor must be a member of the buttons being formed into a group"
135 FB_UNGROUP_DISBAND_RPT = "Disbanding group %d"
136 FB_LISTGROUPS_RPT = "The following groups are present:"
137 FB_LISTGROUPS_BUTTON_RPT = "Buttons in group %d :"
138 FB_DISPLAY_MISCHELP_ADD = "For showgrid, hidegrid, lock and text, group=<group> may be substituted for Button=<...>"
139 FB_DISPLAY_APPHELP_ADD = "For all commands, group=<group> may be substituted for Button=<...>"
140 FB_DISPLAY_GROUPHELP_ADD = "The anchor button MUST be a part of the proposed group"
141 FB_DISPLAY_MOVEHELP_ADD = "Once grouped, only the anchor may be locked/unlocked\nMoveXXX only takes positive arguments currently"
142  
143 --OTHER LANGUAGES
144 local CurLocal=GetLocale()
145 if CurLocal=="deDE" then
146 --German
147  
148  
149 --Uncomment the next if any translations exist for this local
150 --FBL_LOCALIZATION_MODEUSED="deDE"
151 elseif CurLocal=="frFR" then
152 --French
153  
154  
155 --Uncomment the next if any translations exist for this local
156 --FBL_LOCALIZATION_MODEUSED="deDE"
157  
158 elseif CurLocal=="koKR" then
159 --Korean
160  
161  
162 --Uncomment the next if any translations exist for this local
163 --FBL_LOCALIZATION_MODEUSED="deDE"
164 else
165 --No translation applied
166 FBL_LOCALIZATION_MODEUSED="usEN"
167 end
168  
169 end
170  
171  
172  
173  
174  
175  
176