Beast-Masters-addons / feed-o-matic

WoW addon for feeding Hunter pets
9 stars 1 forks source link

This plugin can not run normally in the simplified Chinese(zhCN) client. Can you provide support to the simplified Chinese(zhCN) client? And errors occur when running concurrently with ELVUI #2

Closed Star699 closed 4 years ago

Star699 commented 5 years ago

Can you provide support for simplified Chinese(zhCN) clients? On the simplified Chinese client, it was always hint that found no food for pig. And I think the icon is too small. Can I customize the size of the icon? And it will stop running when it runs with ELVUI, and the icon will not be displayed.I think the problem is with the CreateFrame, where FOM_FeedButton's parent framework is the pet framework. The pet framework is hidden in the ELVUI. I set the parent frame of FOM_FeedButton to UIParent to display, but there will be bugs when the mouse is placed on the icon. I can't solve it with limited programming ability. I'm depressed.

datagutten commented 5 years ago

Is this for WoW classic or BfA? Does it work if you use a bear pet? They eat everything. The size and position of the icon should be similar to the happiness icon in the pet frame. If there is no pet frame the addon would need to allow the user to move the icon, and I am not sure how that should be implemented.

LoreYun commented 4 years ago

I have delete other interface, and clean all config file under wtf folder. Then change language to enUS, the FOM is running perfact! But if change language back to zhCN, it can't be found any food on click feed button.

shutcut: in enUS: in_enUS

in zhCN: in_zhCN

Here is log after uncomment FeedOMatic.lua:207(GFWUtils.Debug = true;) in enUS:

Food list: 1: 20x[Cured Ham Steak], delta 3 2: 17x[Cured Ham Steak], delta 3 3: 13x[Clamlette Surprise], delta 3 Food list: 1: 20x[Cured Ham Steak], delta 3 2: 17x[Cured Ham Steak], delta 3 3: 13x[Clamlette Surprise], delta 3 Food list: 1: 20x[Cured Ham Steak], delta 3 2: 17x[Cured Ham Steak], delta 3 3: 13x[Clamlette Surprise], delta 3 Food list: 1: 20x[Cured Ham Steak], delta 3 2: 17x[Cured Ham Steak], delta 3 3: 13x[Clamlette Surprise], delta 3

in zhCN:

Food list: Food list (with fallback): Food list: Food list (with fallback):

datagutten commented 4 years ago

I checked the code and found that the addon uses the localized diet name to find the right food for the pet. If the diet names from the game don't match the ones in the addon, it does not know which food list to use.

To add them you need to add the localized strings in LocaleSupport.lua. The most important is the diet names: Meat, fish, bread, cheese, fruit, and fungus. The easiest way to get the correct names is to put /dump GetPetFoodTypes() in the chatbox when you have a bear or boar pet. The output will be the diet names.

datagutten commented 4 years ago

Added in #9