I’m developing a tool for manage the messages stored in the database for localization (when using CDbMessageSource)
Its stil in early stage as you can see, but maybe you can get the idea:
In the project files you define the projects you are working on and want to translate and then set the one active for editing… (don’t pay attention to the “selected target language” column… I’ll have to remove it)
Then in the translate page you have a dropdown menu with the list of target languages for the active project that you defined in the project settings… when you select another language the form and the form data are loaded with ajax without reloading the page thanks to jQuery
For now the project name is called YiiMessageDb but if you think it could have a better name feel free to tell me…
But mainly I’d like to have from you all some tips and some help… if someone would like to join me in this project (will be released with BSD license and hopefully it could be downloaded from the Yii website if qiang agrees) let me know and I can open a svn repository on google code…
From the GUI, it looks great! Perhaps you can provide the code for people to try it out? Don't worry if it is not perfect yet. We are all here to make it better.
Yep I’ll make the source available for download asap… the GUI is very basic right now and I’m started with the webapp tutorial that was nice to do what I had in mind Right now is not fully functionally but I’m adding the last things to have a “preview release” (still not 100% usable) for people to download to. As I wrote I’m considering to put it on svn cause this would make it easier to me to keep it up to date as if I have some users downloading a .zip file it will quickly become outdated as the project is evolving fast (as I told even the screen shots are not 100% up-to-date and I made it just yesterday evening… hehe)
if someone is interested in joining this project just pm me with your google accound id and I'll give you member access. thanks.
let me know
for now I'm using mysql database but once done it could just use sqlite so it won't require a db server and would be more portable… anyway… just load the .sql file you find in the sql folder, rename main-dist.php to main.php in the protected/config folder and set you db user and password and you're ready to go!
I've removed from SVN the content of the assets folder and commited some new updates.
Still not fully functional but for the first “useful” version I just need to compare the translated strings with the untranslated ones and then create or update the corresponding records in the db… (now it populates the SourceMessage table but deleting all the rows so the id are lost and this would break the relations with the Message table … but it was just a test )
I've recently added a status icon to the "active" column in the project admin page that I've used also to set the active project "on the fly" using an ajaxLink… it works but I don't know how to refresh the column in order to have the clicked item having the right icon and being no longer a link and all the others should have the "not active" icon and should be a link…
I've already set a call back (refreshColumnActive) that is just a test for now… I saw that with jquery you should be able to do an each through elements so I was thinking about trying that way maybe setting a common class or id or name to the column cells … but was not sure about that. and also I should be able to retrive (or pass to the callback) the id of the clicked item (project) so that when I do the cycle I know which one to set as active and which ones should be set to inactive.
I've just uploaded on svn (r11) some bug fixes, tested with Yii 1.0.5 on windows, to avoid some notices error messages.
Also added some other small things…
But I have a problem with character encoding: sometimes it loses the utf8 encoding…
The html has
the database (mysql) and the tables (MyISAM) are using the “utf8_general_ci” Collation and default and I have
in my mysql.ini
The problem is that, if I save a string like “Qualità” using YiiMessageDb and then I re-open it going to the “translate” page … I can see it right… while if I then open the table using phpMyAdmin it shows “QualitÃ”
any idea? could you please try to download r11 from svn and help me understand where the problem is? (php/html, mysql settings, phpmyadmin… ?)
thanks a lot.
worked fine using linux… now I’m testing it on windows xp using WampServer that has mysql 5.1.33 installed.