Re: [SM-USERS] Translation of messages of a plugin [SOLVED]
On 8 April 2011 20:43, Paul Lesniewski wrote: > > >> Please don't top-post. Refer to the mailing list posting guidelines > >> if you have doubts about how to post here. > >> > >> >>> > I have my Squirrelmail translated into Spanish, but I don't know how > >> >>> > to > >> >>> > translate the messages of my plugins (ie restrict_senders). Do I > >> >>> > have > >> >>> > togenerate my own translation? > >> >>> > >> >>> Yes, unless it's already been translated. Where to put the translated > >> >>> plugin file depends on the plugin. IIRC, Restrict Senders needs its > >> >>> translated file under the main squirrelmail/locales directory. > >> >>> > >> >>> You might want to start here > >> >>> > >> >>> http://squirrelmail.org/docs/translator/translator.html > >> >>> http://squirrelmail.org/wiki/HelpTranslating > >> >>> > >> >>> Both links are found with quick and easy web searches. > >> >> > >> >> Thanks for the reply, > >> >> yes, I already had a look to those links, but I wasnt sure if that was > >> >> the > >> >> right way to do it. > >> >> Ok, so I'll work on that. > >> > > >> > After trying a few things on the documentation, still not translating. I > >> > am > >> > sorry if I am asking about obvious things, but I dont know what else to > >> > try > >> > and I am stuck. > >> > I have followed the steps here: > >> > http://squirrelmail.org/wiki/HelpTranslating > >> > where it says "Translating plugins". > >> > I have changed a tested it, putting a string in the msgstr parameter, as > >> > the > >> > documentation suggests,.. but no luck. > >> > I restarted Apache, but still the same. > >> > If anyone has done this before, it could be very helpful. > >> > >> You need to show what you've done in order for anyone to tell you why > >> it isn't working. Also be specific about which plugin you're > >> translating. We need *EVERY* detail. > >> > > > > Sorry for the top-posting.. long time I haven't posted so I forget. > > Thanks for understanding. Next thing to fix is not to send HTML to > mailing lists, thanks. > > > I have realised now what's missing, by still don't know how to go on. > > The plugin's name is "restrict_senders". Here is what I did: > > - I created path where the .po and .mo files will be saved, that is, as the > > documentation says, using ../locale//LC_MESSAGES > > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES > > These two paths are not the same thing. You need to place your translation > in: > > ./squirrelmail/locale/es_ES/LC_MESSAGES > > > - Then I created the .po file: > > xgettext --keyword=_ -d restrict_senders -s --language=php *.php > > That generated the file: restrict_senders.po > > xgettext is used to generate a .pot file. And you should notice that > Restrict Senders already comes with one for you in its locale > directory. > > > - Compiled it: > > msgfmt -o restrict_senders.mo restrict_senders.po > > - Then I had my restrict_senders.po and restrict_senders.mo > > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES/restrict_senders.po > > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES/restrict_senders.mo > > - Then, modified this bit, for testing, in the restrict_senders.po file: > > #: functions.php:228 > > #, c-format > > msgid "Too many outgoing recipients. Please limit number of recipients to > > %d." > > msgstr "Esta es la traduccion." > > - Then compiled the modified .po file again. > > - Restarted Apache. > > So, I have realised that, at the beginning of the explanation, it says that > > I have to tell Squirrelmail where this file is (obvious now that I know..). > > I copy-paste the example in the documentation, that it's been done with > > another plugin, the view_as_html plugin: > > > > /* i18n.php defines the _() syntax */ > > include_once('../functions/i18n.php'); > > /* Now tell gettext where the locale directory for your plugin is > > * this is in relation to the src/ directory > > */ > > bindtextdomain('view_as_html', SM_PATH . 'plugins/view_as_html/locale'); > > /* Switch to your plugin domain so your messages get translated */ > > textdomain('view_as_html'); > > if($show_html_default == 1) { > > echo ""; > > echo _("View as plain text"); > > echo "\n"; > > } > > else { > > echo ""; > > echo _("View as HTML"); > > echo "\n"; > > } > > /* Switch back to the SquirrelMail domain */ > > bindtextdomain('squirrelmail', SM_PATH . 'locale'); > > textdomain('squirrelmail'); > > > > So, I found I don't know where to put this configuration... > > All this PHP code is unneeded. Restrict Senders is already coded > correctly for being translated. You only need to create a .po and .mo > and put them in the right place. When you're done, please share with > the community if you would. You should send it to our > squirrelmail-i18n mailing list (and this question would also have been > more appropriate there). > > > So, what it looks like, is that I have to change
Re: [SM-USERS] Translation of messages of a plugin [SOLVED]
On Wed, Apr 27, 2011 at 5:57 AM, eva wrote: > On 8 April 2011 20:43, Paul Lesniewski wrote: >> >> >> Please don't top-post. Refer to the mailing list posting guidelines >> >> if you have doubts about how to post here. >> >> >> >> >>> > I have my Squirrelmail translated into Spanish, but I don't know how >> >> >>> > to >> >> >>> > translate the messages of my plugins (ie restrict_senders). Do I >> >> >>> > have >> >> >>> > togenerate my own translation? >> >> >>> >> >> >>> Yes, unless it's already been translated. Where to put the translated >> >> >>> plugin file depends on the plugin. IIRC, Restrict Senders needs its >> >> >>> translated file under the main squirrelmail/locales directory. >> >> >>> >> >> >>> You might want to start here >> >> >>> >> >> >>> http://squirrelmail.org/docs/translator/translator.html >> >> >>> http://squirrelmail.org/wiki/HelpTranslating >> >> >>> >> >> >>> Both links are found with quick and easy web searches. >> >> >> >> >> >> Thanks for the reply, >> >> >> yes, I already had a look to those links, but I wasnt sure if that was >> >> >> the >> >> >> right way to do it. >> >> >> Ok, so I'll work on that. >> >> > >> >> > After trying a few things on the documentation, still not translating. I >> >> > am >> >> > sorry if I am asking about obvious things, but I dont know what else to >> >> > try >> >> > and I am stuck. >> >> > I have followed the steps here: >> >> > http://squirrelmail.org/wiki/HelpTranslating >> >> > where it says "Translating plugins". >> >> > I have changed a tested it, putting a string in the msgstr parameter, as >> >> > the >> >> > documentation suggests,.. but no luck. >> >> > I restarted Apache, but still the same. >> >> > If anyone has done this before, it could be very helpful. >> >> >> >> You need to show what you've done in order for anyone to tell you why >> >> it isn't working. Also be specific about which plugin you're >> >> translating. We need *EVERY* detail. >> >> >> > >> > Sorry for the top-posting.. long time I haven't posted so I forget. >> >> Thanks for understanding. Next thing to fix is not to send HTML to >> mailing lists, thanks. >> >> > I have realised now what's missing, by still don't know how to go on. >> > The plugin's name is "restrict_senders". Here is what I did: >> > - I created path where the .po and .mo files will be saved, that is, as the >> > documentation says, using ../locale//LC_MESSAGES >> > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES >> >> These two paths are not the same thing. You need to place your translation >> in: >> >> ./squirrelmail/locale/es_ES/LC_MESSAGES >> >> > - Then I created the .po file: >> > xgettext --keyword=_ -d restrict_senders -s --language=php *.php >> > That generated the file: restrict_senders.po >> >> xgettext is used to generate a .pot file. And you should notice that >> Restrict Senders already comes with one for you in its locale >> directory. >> >> > - Compiled it: >> > msgfmt -o restrict_senders.mo restrict_senders.po >> > - Then I had my restrict_senders.po and restrict_senders.mo >> > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES/restrict_senders.po >> > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES/restrict_senders.mo >> > - Then, modified this bit, for testing, in the restrict_senders.po file: >> > #: functions.php:228 >> > #, c-format >> > msgid "Too many outgoing recipients. Please limit number of recipients to >> > %d." >> > msgstr "Esta es la traduccion." >> > - Then compiled the modified .po file again. >> > - Restarted Apache. >> > So, I have realised that, at the beginning of the explanation, it says that >> > I have to tell Squirrelmail where this file is (obvious now that I know..). >> > I copy-paste the example in the documentation, that it's been done with >> > another plugin, the view_as_html plugin: >> > >> > /* i18n.php defines the _() syntax */ >> > include_once('../functions/i18n.php'); >> > /* Now tell gettext where the locale directory for your plugin is >> > * this is in relation to the src/ directory >> > */ >> > bindtextdomain('view_as_html', SM_PATH . 'plugins/view_as_html/locale'); >> > /* Switch to your plugin domain so your messages get translated */ >> > textdomain('view_as_html'); >> > if($show_html_default == 1) { >> > echo ""; >> > echo _("View as plain text"); >> > echo "\n"; >> > } >> > else { >> > echo ""; >> > echo _("View as HTML"); >> > echo "\n"; >> > } >> > /* Switch back to the SquirrelMail domain */ >> > bindtextdomain('squirrelmail', SM_PATH . 'locale'); >> > textdomain('squirrelmail'); >> > >> > So, I found I don't know where to put this configuration... >> >> All this PHP code is unneeded. Restrict Senders is already coded >> correctly for being translated. You only need to create a .po and .mo >> and put them in the right place. When you're done, please share with >> the community if you would. You should send i
[SM-USERS] Configuration for dovecot
Hi all, I have a new fc14 system that I've just installed squirrelmail v1.4.21, and trying to configure it with dovecot. I've set the configuration options in squirrelmail to use dovecot, but it just reports the following in the site logs: [Wed Apr 27 18:05:16 2011] [error] [client 68.195.193.42] PHP Warning: call_user_func_array() expects parameter 2 to be array, null given in /var/lib/squirrelmail/www/functions/global.php on line 258, referer: https://www.mydomain.com/webmail/src/login.php What is the cause of this? Where can I find basic documentation for configuring the dovecot requirements? I thought I had dovecot itself configured properly, but perhaps not. Is it just the imap service that has to be configured? Thanks, Alex -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd - squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@lists.sourceforge.net List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Re: [SM-USERS] Configuration for dovecot
On Wed, Apr 27, 2011 at 12:55 PM, Alex wrote: > Hi all, > > I have a new fc14 system that I've just installed squirrelmail > v1.4.21, and trying to configure it with dovecot. I've set the > configuration options in squirrelmail to use dovecot, but it just > reports the following in the site logs: Please explain how you did that. We need to know EXACTLY what you've configured. Please don't make us guess. > [Wed Apr 27 18:05:16 2011] [error] [client 68.195.193.42] PHP Warning: > call_user_func_array() expects parameter 2 to be array, null given in > /var/lib/squirrelmail/www/functions/global.php on line 258, referer: > https://www.mydomain.com/webmail/src/login.php > > What is the cause of this? Dunno. You can go to that line, and immediately above it put in a debugging line something like: sm_print_r(debug_backtrace()); > Where can I find basic documentation for > configuring the dovecot requirements? config/conf.pl ==> option D > I thought I had dovecot itself > configured properly, but perhaps not. Is it just the imap service that > has to be configured? -- Paul Lesniewski SquirrelMail Team Please support Open Source Software by donating to SquirrelMail! http://squirrelmail.org/donate_paul_lesniewski.php -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd - squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@lists.sourceforge.net List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Re: [SM-USERS] Configuration for dovecot
On 27/04/11 21:55, Alex wrote: > Hi all, > > I have a new fc14 system that I've just installed squirrelmail > v1.4.21, and trying to configure it with dovecot. I've set the You, of course read the mailinglist guidlines http://squirrelmail.org/docs/admin/admin-12.html? There lacks quite a bit of info here. You can't expect everyone on this mailing list to know what you mean with fc14 and that it comes with php version 5.3.something? > configuration options in squirrelmail to use dovecot, but it just > reports the following in the site logs: > > [Wed Apr 27 18:05:16 2011] [error] [client 68.195.193.42] PHP Warning: > call_user_func_array() expects parameter 2 to be array, null given in > /var/lib/squirrelmail/www/functions/global.php on line 258, referer: > https://www.mydomain.com/webmail/src/login.php This is fixed in current SVN, I believe: http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail?view=revision&revision=14065 But of course I'm a bit stabbing in the dark, hope I didn't hit anyone. I suggest you read again through this lists guidelines, answer the questions, try the fix I pointed above, and make a more useful follow up mail. Salut, kwadronaut -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd - squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@lists.sourceforge.net List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Re: [SM-USERS] Configuration for dovecot
Hi, >> I have a new fc14 system that I've just installed squirrelmail >> v1.4.21, and trying to configure it with dovecot. I've set the >> configuration options in squirrelmail to use dovecot, but it just >> reports the following in the site logs: > > Please explain how you did that. We need to know EXACTLY what you've > configured. Please don't make us guess. I wasn't sure if you wanted my whole dovecot configuration? I also found that fedora apparently has some restriction on accounts with a uid less than 500. I think that may have been an issue. >> [Wed Apr 27 18:05:16 2011] [error] [client 68.195.193.42] PHP Warning: >> call_user_func_array() expects parameter 2 to be array, null given in >> /var/lib/squirrelmail/www/functions/global.php on line 258, referer: >> https://www.mydomain.com/webmail/src/login.php >> >> What is the cause of this? > > Dunno. You can go to that line, and immediately above it put in a > debugging line something like: > > sm_print_r(debug_backtrace()); Thanks, it pointed out some information in squirrel_logger, and after disabling the plugin, the problem went away. I'll investigate that configuration again. >> Where can I find basic documentation for >> configuring the dovecot requirements? > > config/conf.pl ==> option D Yes, understood. I was actually referring to dovecot itself, and how it should properly be configured for squirrelmail. Considering that it now works, I guess I've configured it properly. The dovecot documentation is enormous. Tough to figure out just where to start, and how it relates to fedora. Thanks again, Alex -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd - squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@lists.sourceforge.net List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Re: [SM-USERS] Configuration for dovecot
Hi, >> I have a new fc14 system that I've just installed squirrelmail >> v1.4.21, and trying to configure it with dovecot. I've set the > > You, of course read the mailinglist guidlines > http://squirrelmail.org/docs/admin/admin-12.html? There lacks quite a > bit of info here. You can't expect everyone on this mailing list to know > what you mean with fc14 and that it comes with php version 5.3.something? Yes, I understand. There is just so much info that I could provide, that I wanted to provide the initial information about the problem, and ask an initial question and ask for pointers on where to find the documentation. Thanks for the info. I'll review the SVN version and see if it applies to my issue. I'll be sure to provide more info next time. Thanks, Alex -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd - squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@lists.sourceforge.net List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Re: [SM-USERS] Translation of messages of a plugin [SOLVED]
On 27 April 2011 19:40, Paul Lesniewski wrote: > On Wed, Apr 27, 2011 at 5:57 AM, eva wrote: >> On 8 April 2011 20:43, Paul Lesniewski wrote: >>> >>> >> Please don't top-post. Refer to the mailing list posting guidelines >>> >> if you have doubts about how to post here. >>> >> >>> >> >>> > I have my Squirrelmail translated into Spanish, but I don't know >>> >> >>> > how >>> >> >>> > to >>> >> >>> > translate the messages of my plugins (ie restrict_senders). Do I >>> >> >>> > have >>> >> >>> > togenerate my own translation? >>> >> >>> >>> >> >>> Yes, unless it's already been translated. Where to put the >>> >> >>> translated >>> >> >>> plugin file depends on the plugin. IIRC, Restrict Senders needs its >>> >> >>> translated file under the main squirrelmail/locales directory. >>> >> >>> >>> >> >>> You might want to start here >>> >> >>> >>> >> >>> http://squirrelmail.org/docs/translator/translator.html >>> >> >>> http://squirrelmail.org/wiki/HelpTranslating >>> >> >>> >>> >> >>> Both links are found with quick and easy web searches. >>> >> >> >>> >> >> Thanks for the reply, >>> >> >> yes, I already had a look to those links, but I wasnt sure if that was >>> >> >> the >>> >> >> right way to do it. >>> >> >> Ok, so I'll work on that. >>> >> > >>> >> > After trying a few things on the documentation, still not translating. >>> >> > I >>> >> > am >>> >> > sorry if I am asking about obvious things, but I dont know what else to >>> >> > try >>> >> > and I am stuck. >>> >> > I have followed the steps here: >>> >> > http://squirrelmail.org/wiki/HelpTranslating >>> >> > where it says "Translating plugins". >>> >> > I have changed a tested it, putting a string in the msgstr parameter, >>> >> > as >>> >> > the >>> >> > documentation suggests,.. but no luck. >>> >> > I restarted Apache, but still the same. >>> >> > If anyone has done this before, it could be very helpful. >>> >> >>> >> You need to show what you've done in order for anyone to tell you why >>> >> it isn't working. Also be specific about which plugin you're >>> >> translating. We need *EVERY* detail. >>> >> >>> > >>> > Sorry for the top-posting.. long time I haven't posted so I forget. >>> >>> Thanks for understanding. Next thing to fix is not to send HTML to >>> mailing lists, thanks. >>> >>> > I have realised now what's missing, by still don't know how to go on. >>> > The plugin's name is "restrict_senders". Here is what I did: >>> > - I created path where the .po and .mo files will be saved, that is, as >>> > the >>> > documentation says, using ../locale//LC_MESSAGES >>> > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES >>> >>> These two paths are not the same thing. You need to place your translation >>> in: >>> >>> ./squirrelmail/locale/es_ES/LC_MESSAGES >>> >>> > - Then I created the .po file: >>> > xgettext --keyword=_ -d restrict_senders -s --language=php *.php >>> > That generated the file: restrict_senders.po >>> >>> xgettext is used to generate a .pot file. And you should notice that >>> Restrict Senders already comes with one for you in its locale >>> directory. >>> >>> > - Compiled it: >>> > msgfmt -o restrict_senders.mo restrict_senders.po >>> > - Then I had my restrict_senders.po and restrict_senders.mo >>> > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES/restrict_senders.po >>> > /path/squirrelmail-1.4.21/plugins/restrict_senders/locale/es_ES/LC_MESSAGES/restrict_senders.mo >>> > - Then, modified this bit, for testing, in the restrict_senders.po file: >>> > #: functions.php:228 >>> > #, c-format >>> > msgid "Too many outgoing recipients. Please limit number of recipients to >>> > %d." >>> > msgstr "Esta es la traduccion." >>> > - Then compiled the modified .po file again. >>> > - Restarted Apache. >>> > So, I have realised that, at the beginning of the explanation, it says >>> > that >>> > I have to tell Squirrelmail where this file is (obvious now that I >>> > know..). >>> > I copy-paste the example in the documentation, that it's been done with >>> > another plugin, the view_as_html plugin: >>> > >>> > /* i18n.php defines the _() syntax */ >>> > include_once('../functions/i18n.php'); >>> > /* Now tell gettext where the locale directory for your plugin is >>> > * this is in relation to the src/ directory >>> > */ >>> > bindtextdomain('view_as_html', SM_PATH . 'plugins/view_as_html/locale'); >>> > /* Switch to your plugin domain so your messages get translated */ >>> > textdomain('view_as_html'); >>> > if($show_html_default == 1) { >>> > echo ""; >>> > echo _("View as plain text"); >>> > echo "\n"; >>> > } >>> > else { >>> > echo ""; >>> > echo _("View as HTML"); >>> > echo "\n"; >>> > } >>> > /* Switch back to the SquirrelMail domain */ >>> > bindtextdomain('squirrelmail', SM_PATH . 'locale'); >>> > textdomain('squirrelmail'); >>> > >>> > So, I found I don't know where to put this configuration... >>> >>> All this PHP code is unneeded.