I would certainly accept any patches internationalizing the plugin, but I probably don’t have time to work on this myself.
I started the plugin internationalization and commited first changes.
But It’s not full functionnal… I’ll let you know when it will be ok.
There is just an issue : I can’t translate the page_title and menu_title parameters of the add_menu_page function in your dbte_menu function. When I do it, it just display : No Database Table Configured to Edit (from dbte_render).
Do you know why ?
I finished the plugin internationalization, except for the page_title and menu_title as I said in the previous post.
I added sprintf.js file in order to translate with replacements in js files.
You can check it and tell me if you agree with my code…
Regards,
Nicolas Letellier.
Everything that you committed looks pretty good! Thanks for the efforts!
As far as the menu titles goes, I believe it is figuring out the “current” table in the dbte_scripts function by finding the table name in the scripts hook. (The hook is expected to look like “db-table-editor_page_dbte_{table name}”). Then the name produced should match the id of one the data tables.
Currently testing this and looking to this issue more closely
I did find a bug where it was enqueueing the wrong js file. I pushed a patch resolving this to github. As far as page titles go, I couldnt recreate. Maybe an example of what you tried?
Yes, I replaced this in the dbte_menu function of the db-table-editor.php file :
add_menu_page(‘DB Table Editor’, ‘DB Table Editor’
by
add_menu_page(__(‘DB Table Editor’, ‘wp-db-table-editor’), __(‘DB Table Editor’, ‘wp-db-table-editor’)
This broke the custom tables pages, so I think the “current” table as you said.
Ok, I see the problem and believe I have pushed a second and third patch pushed that will translate the page titles. I think this is probably done then.
Thanks again for the help and cheers!
Ok, cool !
Thank you too for the plugin… 🙂
I saw the wordpress plugin update but it seems you forgot to add the new files : sprintf.js and the languages folder…
Thanks! I always mess up svn… its why I use git.