Jogu Predictions

Description
Jogu Predictions records Jogu the Drunk's current crop prediction when you speak to him and shares this with other users of the AddOn. This allows you to know his prediction without talking to him (which can save you some gold if you're not Best Friends with him), as long as someone else using the AddOn has talked to him and asked for his prediction recently.

Version 1.1.0 saves Jogu's predictions between sessions, so once you've talked to Jogu on one character, you can view his prediction on any other character even if there's nobody else running the AddOn to sync with.

Use /jp, /jogup or /jogupredictions to print out the current prediction and /jp sync to update the prediction from other users.

Translations
Currently Jogu Predictions is only available in English and German (not completely localised yet), meaning only people on English or German clients will be able to update the prediction by talking to Jogu; but anyone running the AddOn will receive updates from others.

The AddOn records a list of Jogu's prediction phrases, making it easy for me to add support for your locale. Just copy/paste the contents of your WTF\Account\<Account Name>\SavedVariables\JoguPredictions.lua into a comment on Curse/WoW Interface and put either the vegetable's English item name or the itemID next to each phrase.

If commenting on WoW Interface, please highlight the text and click the blue "Wrap [highlight=lua] around selected text" button before posting the comment. If commenting on Curse, please put the text into a CurseForge Paste and put the URL to that in the comment instead.

ItemIDs can be found on the end of Wowhead/Armory URLs, as well as in the AddOn's locale files (each locale file has a list of vegetable itemIDs and their English names).

To translate the AddOn's text into your language, please visit the CurseForge localisation page. The General namespace contains the AddOn's text, while the Phrases namespace contains Jogu's prediction phrases (which can be translated directly on CurseForge as well, if you prefer that to leaving a comment).

Choonster:
- Moved the caching checks to the caching function
- Also fixed the checks to properly recognise when the cache has its
data.
- Cache function will now delete itself when the cache has its data.
- Added cache population function
-- This is called at PLAYER_ENTERING_WORLD as well as in the slash
command and DataObject:OnTooltipShow method.
-- Hopefully this should fix the caches not being populated.
- Fixed the deDE locale file, deleted the teset enUS file properly.
- Fixed a typo at the end of the locale files.
- Added proper locale files
- Removed the test enUS.lua file
- Localisation fix
- Changed phrase table keys to strings
- Added code to convert the keys to number in the locale initialisation
code in core.lua
- Added licence, fixed .pkgmeta
- Initial Commit

Whisper sync only updates the prediction by communicating with other people on your realm running the AddOn. If there's nobody else running the AddOn, the only way to update the prediction is to talk to Jogu.

I seem to be having problems with the whisper sync. /jp gives me the current prediction but when I first login and when typing /jp sync I get:
Jogu Predictions: Starting Whisper sync.
Jogu Predictions: Whisper sync did not receive a prediction reply. The current prediction will be updated when you or someone else using Jogu Predictions talks to Jogu.

Lua Code:

JOGU_PHRASES ={

["enUS"]={

"Shpring for a leek, and you might get two.", -- [1]

"Fields of white turnips. Raw and shpicy!", -- [2]

},

}

JOGUP_SAVED_ITEMID =74850

JOGUP_SAVED_UPDATE ="2013-02-13T09:53"

Thanks,

Whisper sync only updates the prediction by communicating with other people on your realm running the AddOn. If there's nobody else running the AddOn, the only way to update the prediction is to talk to Jogu.

I seem to be having problems with the whisper sync. /jp gives me the current prediction but when I first login and when typing /jp sync I get:
Jogu Predictions: Starting Whisper sync.
Jogu Predictions: Whisper sync did not receive a prediction reply. The current prediction will be updated when you or someone else using Jogu Predictions talks to Jogu.