Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Online dictionary creator

124»

Comments

  • MarkMark Vanilla Staff
    ahhhhhh - I see what you're saying...
  • :D it's pure genius!
  • Mark, since I have no expertise in this, is there a way to call the XML lib into play via extension? or is that simply reserved for the functionality of all the AJAX used onboard?
  • >> ahhhhhh - I see what you're saying... It clicked. YAY!
  • MarkMark Vanilla Staff
    Actually, that xml parser is a piece of garbage I coded for the filebrowser. It's fast, but completely inflexible. I'll probably be trashing it for the next rev of the filebrowser.
  • ahh, gotcha, I took a quick look at it but couldn't make heads or tails of whether it was worth it or not. I'll see if I can come up with my own class or library overnight to test this little idea of mine sprinkled with mini and marti's bits of code.
  • suggestion: take martis, it makes much more sense. I must admit if people wanted me to carry this project on i'd use his code as the base (with his permission obviously) i still dont quite get the xml thing, but yay!
  • lechlech
    edited August 2005
    Mini, there's some stuff in both of the source files you guys have provided which proves useful in how you're reading and saving the files, I'm simply using them as reference for now. But by all means though, don't leave this up to me, continue to come up with your own twists.

    The xml thing is simply an idea I'm right now toying with as a static source for all dictionaries. Meaning you can only read from it, but not over-write it. Also it serves to aid if mark decides to really go through with performing remote extension updates and the like. This way, if say, the master dictionary file for some reason get's screwed up, you can simply pull it into the dictionary creator, and output a brand new one.

    master dictionary.xml@lussumo.com -> Dictionary Editor on your server -> Write out new dictionary file

    This could also possibly serve as a cross reference point if say, you have customized your dictionary file and upon update, really don't want to go through once again and make the same changes. I suppose I could also output a custom_languagename.xml to store all those changes in addition to spitting out the language file with it's proper associative array. So at update time, it could do a quick one-time sweep through existing keys, look for changes you've made and change them again to what they were instead of using new ones.
  • mark, i've also noticed two duplicate entries in the english.php language file.

    // Added July 17, 2005 $Context->Dictionary["ErrPermissionAddComments"] = "You do not have permission to add comments to discussions."; $Context->Dictionary["ErrPermissionStartDiscussions"] = "You do not have permission to start discussions.";
  • how is that a duplicate? And i'm still not 100% but i get the basic xml idea. If i was give it the ability to do revisions, what would be the best way to do this? Add a comment after each line with the name+time (and previous value?)?
  • mini, do a search in the default /languages/english.php for those 2 lines I previously posted and you'll see 2 instances of them.

    I've got the groundwork laid down for the language editor/writer extension and it's functional as far as a simple extension goes. I just need to populate it with some of the functionality you and marti have laid down up to this point. I just now need to keep some security in mind while writing out the functionality of this extension file.

    here's The xml idea in detail since you still don't get it mini :)

    In brief, storing the current associative array of values found in the [languagenamehere].php file into a master xml file, IE english.xml. This would be a totally seperate and static XML file. This is where the language editor extension comes fully into play. Instead of reading the current language php file, it would pull everything from the XML file, either locally or grab a fresh set of entries off of the lussumo server. Then you could either save it as is to your server, or edit it up and save new or over an existing language file without the need to go in by hand and upload stuff.

    I suppose the same could be done for extensions themselves later on as well as for updating other modules. deliver it all as XML, and write it out as php. But right now I'm only starting with single language files. I'll see if I can get some XML functionality in there to start letting you at least back up the file as XML to start, that should be fairly simple. Reading from XML is another story.
This discussion has been closed.