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.
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
bye,
Giovanni.
p.s.
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!
You can set the svn:ignore keyword to * on the assets folder. Make sure, to commit an empty folder first. Otherwhise already existing files will remain even after setting the keyword.
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.
in the Message table should I save translations only for the target languages or also for the source language? I guess the first one but would prefer to be sure
thanks.
Giovanni.
p.s.
anyway… the first usable version will be online very soon
If you have any question, tip, bug report, or anything else feel free to write me. thanks.
Features not yet implemented:
project should have more prefs. like custom sourcemessage and message table names
import / export
when clicking on the "activate project" link the status should be updated too
when saving a set of translations the log should appear in the log box instead in a new page using ajax
For this last two things I hope that you can help me and give me some tips on how to implement it. thanks.
Even if in early state, you can already use this 0.1 version for translate your projects, storing translations in the database… hope you’ll find it useful
(It is based on Yii Framework 1.0 and you must specify the path of it in the index.php file)
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…
Maybe it is when the data are passed to javascript throught json …
The html has
content=“text/html; charset=utf-8”
the database (mysql) and the tables (MyISAM) are using the “utf8_general_ci” Collation and default and I have
default-character-set=utf8
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.
bye,
Giovanni.
p.s.
worked fine using linux… now I’m testing it on windows xp using WampServer that has mysql 5.1.33 installed.
It’s an interesting project. I made something like this before, but with a bad interface. Could you change the first screenshot link to http://img244.images…nslate02sr2.jpg ?
thanks… if you want we could work together on it; I can give you svn access… And anyway feedback and comments are welcome… I hope to sort out that problem with character encoding