From: Tomas K. <to...@us...> - 2003-09-13 10:52:01
|
> On Fri, 12 Sep 2003 08:31:00 +0300 (EEST) > "Tomas Kuliavas" <to...@us...> wrote: > > > One suggestion (sample from avelsieve + some changes). > > > > if (defined("SM_PATH")) { > > bindtextdomain('your_plugin', SM_PATH . 'locale'); > > } else { > > bindtextdomain ('your_plugin', '../locale'); > > } > > > > Keep all translations in one place (locale directory). But number of > > '../' may depend on plugin. > > But installing a plugin is usually a matter of untarring inside the > plugins/ directory, and this would mean that installing a plugin would > need an extra step of copying over the locale directory to > SM_PATH/locale. I used to make it work this way, but I don't like it > that much. tomas@calipso:~/cvs-devel/locales$ ls po/*.pot po/avelsieve.pot po/change_mysqlpass.pot po/disk_quota.pot po/show_user_and_ip.pot po/view_as_html.pot po/change_ldappass.pot po/chg_sasl_passwd.pot po/file_manager.pot po/smallcal.pot po/vpopmail.pot po/change_merakpass.pot po/contactclean.pot po/online_users.pot po/squirrelmail.pot tomas@calipso:~/cvs-devel/locales$ ls locale/el_GR/LC_MESSAGES/*.po locale/el_GR/LC_MESSAGES/avelsieve.po locale/el_GR/LC_MESSAGES/squirrelmail.po tomas@calipso:~/cvs-devel/locales$ That's the reason of using SM_PATH/locale. locales cvs will be branched to SM-1_4_2-LOCALES after 1.4.2 release and translators can submit their translation updates after 1.4.2 release. And this branch will include all translations of gettext enabled plugins that I know. Just one more step in order to separate translations from SM core. But plugin developers can do it own way. We live in a free world. -- Tomas |