Admittedly after preparing this script for others to use, I kind of forgot to test it... Whoops! This is an update that should fix the script and make Gluon happy. Instead of taking the languages folder, it takes the application folder, to help resolve conflicts with Gluon. The script was also originally configured to run with the language folder being the current working directory, and as such, the changes to the language files would never be saved.
Like the “w2p:componentComplete” event I added a while back, this is
another event that I use in my website, and I thought it would be
helpful to share it with others. This way, you can easily catch when a
web2py component starts loading, and write a handler for whatever
reason (in my case, determining when the user is navigating to a new
page through a smooth loading function piggybacking off of the web2py
component system)
Playing with this file made me realize that the quotes defining the
strings themselves are added to the regex searches, and that my
previous addition caused invalid syntax. So, I decided to fix this by
placing the first quote before the markmin decorator. (Triple quotes
won’t work, however…)
iOS devices don’t like listening to clicks on most objects. They
typically prefer a and button objects. This fix replaces the
#closeflash span with a link to “#” instead (while also inheriting
text-decoration and color styling), so that mobile (iOS) devices will
allow you to close the flash.
Sometimes we may want to know when the component is finished with it’s
loading process entirely to trigger animations or something similar. I
added this for my own website, and I think that others may want to use
this. It’s a small addition, but I hope that it will be helpful to
others!