From: jervfors Date: Sat, 15 May 2004 09:56:28 +0000 (+0000) Subject: Removing HTML from strings and cleaning up code X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=637fbe4de3814710d652ab412c24d8343f742f3b Removing HTML from strings and cleaning up code git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7462 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index b06d6b33..53158f6b 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -35,94 +35,103 @@ $media = getPref($data_dir,$username,'newmail_media', '(none)'); // Set $allowsound to false if you don't want sound files available $allowsound = "true"; -echo html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . "\n" . - html_tag( 'tr', "\n" . - html_tag( 'td', '' . _("Options") . ' - ' . _("New Mail Notification") . '', 'center', $color[0] ) - ) . "\n" . - html_tag( 'tr' ) . "\n" . - html_tag( 'td', '', 'left' ); +echo html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) . "\n" . + html_tag( 'tr' ) . "\n" . + html_tag( 'td', '', 'center' ) . + '' . _("Options") . ' - ' . _("New Mail Notification") . "
\n" . + html_tag( 'table', '', '', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) . "\n" . + html_tag( 'tr' ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . "
\n"; + +echo html_tag( 'p', + sprintf(_("The %s option will check ALL of your folders for unseen mail, not just the inbox for notification."), '"'._("Check all boxes, not just INBOX").'"') + ) . "\n" . + html_tag( 'p', + sprintf(_("Selecting the %s option will enable the showing of a popup window when unseen mail is in your folders (requires JavaScript)."), '"'._("Show popup window on new mail").'"') + ) . "\n" . + html_tag( 'p', + sprintf(_("Use the %s option to only check for messages that are recent. Recent messages are those that have just recently showed up and have not been \"viewed\" or checked yet. This can prevent being continuously annoyed by sounds or popups for unseen mail."), '"'._("Count only messages that are RECENT").'"') + ) . "\n" . + html_tag( 'p', + sprintf(_("Selecting the %s option will change the title in some browsers to let you know when you have new mail (requires JavaScript, and only works in IE but you won't see errors with other browsers). This will always tell you if you have new mail, even if you have %s enabled."), 'quot;'._("Change title on supported browsers").'"', '"'._("Count only messages that are RECENT").'"') + ) . "\n"; if ($allowsound == "true") { - echo html_tag( 'p', - _("Select Enable Media Playing to turn on playing a media file when unseen mail is in your folders. When enabled, you can specify the media file to play in the provided file box.") - ) . "\n"; + echo html_tag( 'p', + sprintf(_("Select %s to turn on playing a media file when unseen mail is in your folders. When enabled, you can specify the media file to play in the provided file box."), '"'._("Enable Media Playing").'"') + ) . "\n" . + html_tag( 'p', + sprintf(_("Select from the list of %s the media file to play when new mail arrives. If no file is specified, %s, no sound will be used."), '"'._("Select server file").'"', '"'._("(none)").'"') + ) . "\n"; } - echo html_tag( 'p', - _("The Check all boxes, not just INBOX option will check ALL of your folders for unseen mail, not just the inbox for notification.") - ) . "\n" . - html_tag( 'p', - _("Selecting the Show popup option will enable the showing of a popup window when unseen mail is in your folders (requires JavaScript).") - ) . "\n" . - html_tag( 'p', - _("Use the Check RECENT to only check for messages that are recent. Recent messages are those that have just recently showed up and have not been \"viewed\" or checked yet. This can prevent being continuously annoyed by sounds or popups for unseen mail.") - ) . "\n" . - html_tag( 'p', - _("Selecting the Change title option will change the title in some browsers to let you know when you have new mail (requires JavaScript, and only works in IE but you won't see errors with other browsers). This will always tell you if you have new mail, even if you have Check RECENT enabled.") - ); - if ($allowsound == "true") { - echo html_tag( 'p', - _("Select from the list of server files the media file to play when new mail arrives. If no file is specified, \"(none)\", no sound will be used.") - ) . "\n"; - } - echo '
'. - html_tag( 'table', '', '', '', 'width="100%" cellpadding="0" cellspacing="2" border="0"' ) . "\n" . - html_tag( 'tr' ) . "\n" . - html_tag( 'td', ' ', 'right', '', 'nowrap' ) . "\n"; - if ($allowsound == "true") { - echo html_tag( 'td', '', 'left' ) . - ' ' . _("Enable Media Playing") . ''. - '' . "\n"; - } - echo html_tag( 'tr' ) . "\n" . - html_tag( 'td', ' ', 'right', '', 'nowrap' ) . "\n" . - html_tag( 'td', '', 'left' ) . - ' ' . _("Check all boxes, not just INBOX") . ''. - ''. "\n" . - html_tag( 'tr' ) . "\n" . - html_tag( 'td', ' ', 'right', '', 'nowrap' ) . "\n" . - html_tag( 'td', '', 'left' ) . - ' ' . _("Count only messages that are RECENT") . ''. - ''. "\n" . - html_tag( 'tr' ) . "\n" . - html_tag( 'td', ' ', 'right', '', 'nowrap' ) . "\n" . - html_tag( 'td', '', 'left' ) . - ' ' . _("Change title on supported browsers.") . '   (' . _("requires JavaScript to work") . ')'. - ''. "\n" . - html_tag( 'tr' ) . "\n" . - html_tag( 'td', ' ', 'right', '', 'nowrap' ) . "\n" . + +echo '' . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center', $color[4] ) . "\n" . '
' . "\n"; + +echo '' . "\n" . + html_tag( 'table', '', '', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) . "\n"; + +// Option: media_allbox +echo html_tag( 'tr' ) . + html_tag( 'td', _("Check all boxes, not just INBOX").':', 'right', '', 'nowrap' ) . + html_tag( 'td', '', 'left' ) . + '' . "\n"; + +// Option: media_recent +echo html_tag( 'tr' ) . + html_tag( 'td', _("Count only messages that are RECENT").':', 'right', '', 'nowrap' ) . + html_tag( 'td', '', 'left' ) . + '' . "\n"; + +// Option: media_changetitle +echo html_tag( 'tr' ) . + html_tag( 'td', _("Change title on supported browsers").':', 'right', '', 'nowrap' ) . + html_tag( 'td', '', 'left' ) . + ' ('._("requires JavaScript to work").')' . "\n"; + +// Option: media_popup +echo html_tag( 'tr' ) . + html_tag( 'td', _("Show popup window on new mail").':', 'right', '', 'nowrap' ) . + html_tag( 'td', '', 'left' ) . + ' ('._("requires JavaScript to work").')' . "\n"; + +if ($allowsound == "true") { +// Option: media_enable + echo html_tag( 'tr' ) . + html_tag( 'td', _("Enable Media Playing").':', 'right', '', 'nowrap' ) . html_tag( 'td', '', 'left' ) . ' ' . _("Show popup window on new mail") . '   (' . _("requires JavaScript to work") . ')'. - '' . "\n"; - if ($allowsound == "true") { - echo html_tag( 'tr' ) . "\n" . - html_tag( 'td', _("Select server file:"), 'right', '', 'nowrap' ) . "\n" . - html_tag( 'td', '', 'left' ) . - '' . "\n" . + '' . "\n"; // Iterate sound files for options $d = dir(SM_PATH . 'plugins/newmail/sounds'); while($entry=$d->read()) { @@ -130,38 +139,33 @@ if ($allowsound == "true") { if ($entry != '..' && $entry != '.' && $entry != 'CVS') { echo '\n"; } } $d->close(); + $media_output = ($media == '(none)') ? _("(none)") : substr($media, strrpos($media, '/')+1); echo ''. - ''. - ''. - ''. - html_tag( 'tr', "\n" . - html_tag( 'td', _("Current File:"), 'right', '', 'nowrap' ) . - html_tag( 'td', '' . - htmlspecialchars($media) . '', 'left' ) - ) . "\n"; - } - echo html_tag( 'tr', "\n" . - html_tag( 'td', ' ' ) . - html_tag( 'td', - ''. - '', - 'left' ) - ) . "\n" . - ''. "\n" . - '
'. "\n" . - ''. "\n" . -''; - + '' . + html_tag( 'tr', "\n" . + html_tag( 'td', _("Current File:"), 'right', '', 'nowrap' ) . + html_tag( 'td', '' . + htmlspecialchars($media_output) . '', 'left' ) + ) . "\n"; +} +echo html_tag( 'tr', "\n" . + html_tag( 'td', ' ' ) . + html_tag( 'td', + '' . + '', + 'left' ) + ) . "\n"; ?> + diff --git a/po/squirrelmail.pot b/po/squirrelmail.pot index be1cafae..b8fabed2 100644 --- a/po/squirrelmail.pot +++ b/po/squirrelmail.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2004-05-13 08:02+0200\n" +"POT-Creation-Date: 2004-05-15 12:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1282,6 +1282,9 @@ msgstr "" msgid "Reason:" msgstr "" +msgid "Server responded:" +msgstr "" + msgid "Server responded: " msgstr "" @@ -3143,64 +3146,69 @@ msgstr "" msgid "New Mail Notification" msgstr "" +#, c-format msgid "" -"Select Enable Media Playing to turn on playing a media file when " -"unseen mail is in your folders. When enabled, you can specify the media file " -"to play in the provided file box." +"The %s option will check ALL of your folders for unseen mail, not just the " +"inbox for notification." msgstr "" -msgid "" -"The Check all boxes, not just INBOX option will check ALL of your " -"folders for unseen mail, not just the inbox for notification." +msgid "Check all boxes, not just INBOX" msgstr "" +#, c-format msgid "" -"Selecting the Show popup option will enable the showing of a popup " -"window when unseen mail is in your folders (requires JavaScript)." +"Selecting the %s option will enable the showing of a popup window when " +"unseen mail is in your folders (requires JavaScript)." msgstr "" -msgid "" -"Use the Check RECENT to only check for messages that are recent. " -"Recent messages are those that have just recently showed up and have not " -"been \"viewed\" or checked yet. This can prevent being continuously annoyed " -"by sounds or popups for unseen mail." +msgid "Show popup window on new mail" msgstr "" +#, c-format msgid "" -"Selecting the Change title option will change the title in some " -"browsers to let you know when you have new mail (requires JavaScript, and " -"only works in IE but you won't see errors with other browsers). This will " -"always tell you if you have new mail, even if you have Check RECENT " -"enabled." +"Use the %s option to only check for messages that are recent. Recent " +"messages are those that have just recently showed up and have not been " +"\"viewed\" or checked yet. This can prevent being continuously annoyed by " +"sounds or popups for unseen mail." msgstr "" -msgid "" -"Select from the list of server files the media file to play when new " -"mail arrives. If no file is specified, \"(none)\", no sound will be used." +msgid "Count only messages that are RECENT" msgstr "" -msgid "Enable Media Playing" +#, c-format +msgid "" +"Selecting the %s option will change the title in some browsers to let you " +"know when you have new mail (requires JavaScript, and only works in IE but " +"you won't see errors with other browsers). This will always tell you if you " +"have new mail, even if you have %s enabled." msgstr "" -msgid "Check all boxes, not just INBOX" +msgid "Change title on supported browsers" msgstr "" -msgid "Count only messages that are RECENT" +#, c-format +msgid "" +"Select %s to turn on playing a media file when unseen mail is in your " +"folders. When enabled, you can specify the media file to play in the " +"provided file box." msgstr "" -msgid "Change title on supported browsers." +msgid "Enable Media Playing" msgstr "" -msgid "requires JavaScript to work" +#, c-format +msgid "" +"Select from the list of %s the media file to play when new mail arrives. If " +"no file is specified, %s, no sound will be used." msgstr "" -msgid "Show popup window on new mail" +msgid "Select server file" msgstr "" -msgid "Select server file:" +msgid "(none)" msgstr "" -msgid "(none)" +msgid "requires JavaScript to work" msgstr "" msgid "Try"