From: elf2000 Date: Sun, 13 Nov 2005 06:58:40 +0000 (+0000) Subject: o split message catalog to lang_en.inc.php. X-Git-Tag: 1.0~297 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=22bdf7a7b48b8cd9aa1d872149756a04b12b3432;p=s9y.git o split message catalog to lang_en.inc.php. --- diff --git a/plugins/serendipity_event_emoticate/lang_en.inc.php b/plugins/serendipity_event_emoticate/lang_en.inc.php new file mode 100644 index 0000000..228be63 --- /dev/null +++ b/plugins/serendipity_event_emoticate/lang_en.inc.php @@ -0,0 +1,13 @@ + + * EN-Revision: Revision of lang_en.inc.php + */ + +@define('PLUGIN_EVENT_EMOTICATE_NAME', 'Markup: Emoticate'); +@define('PLUGIN_EVENT_EMOTICATE_DESC', 'Convert standard emoticons into graphic images'); +@define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Standard emoticons like :-) and ;-) are converted to images.'); + +?> diff --git a/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php b/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php index 80d50fc..40f5778 100644 --- a/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php +++ b/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php @@ -6,9 +6,7 @@ if (file_exists($probelang)) { include $probelang; } -@define('PLUGIN_EVENT_EMOTICATE_NAME', 'Markup: Emoticate'); -@define('PLUGIN_EVENT_EMOTICATE_DESC', 'Convert standard emoticons into graphic images'); -@define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Standard emoticons like :-) and ;-) are converted to images.'); +include dirname(__FILE__) . '/lang_en.inc.php'; class serendipity_event_emoticate extends serendipity_event { diff --git a/plugins/serendipity_event_entryproperties/lang_en.inc.php b/plugins/serendipity_event_entryproperties/lang_en.inc.php new file mode 100644 index 0000000..100afff --- /dev/null +++ b/plugins/serendipity_event_entryproperties/lang_en.inc.php @@ -0,0 +1,40 @@ + + * EN-Revision: Revision of lang_en.inc.php + */ + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Extended properties for entries'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(cache, non-public articles, sticky posts)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Mark this entry as a Sticky Post'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Entries can be read by'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Myself'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Co-authors'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Everyone'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Allow to cache entries?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'If enabled, a cached version will be generated on every saving. Caching will increase performance, but maybe decrease flexibility for other plugins.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Build cached entries'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Fetching next batch of entries...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Fetching entries %d to %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Building cache for entry #%d, %s...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Entry cached.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Entry caching completed.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Entry caching ABORTED.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (totalling %d entries)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'Disable nl2br'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Hide from article overview / frontpage'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Use group-based restrictions'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'If enabled, you can define which users of a usergroup may be able to read entries. This option has a large impact on the performance of your article overview. Only enable this if you are really going to use this feature.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Use user-based restrictions'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'If enabled, you can define which specific users may be able to read entries. This option has a large impact on the performance of your article overview. Only enable this if you are really going to use this feature.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Hide content in RSS'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'If enabled, the content of this entry will not be shown inside the RSS feed(s).'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Custom Fields'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Additional custom fields can be used in your template at places where you want them to show up. For that, edit your entries.tpl template file and place Smarty tags like {$entry.properties.ep_MyCustomField} in the HTML where you like. Note the prefix ep_ for each field. '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Here you can enter a list of commaseparated field names that you can use to enter for every entry - do not use special characters or spaces for those fieldnames. Example: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'The list of available custom fields can be changed in the plugin configuration.'); + +?> diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index f9fbcfc..8ecb37b 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -6,36 +6,7 @@ if (file_exists($probelang)) { include $probelang; } -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Extended properties for entries'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(cache, non-public articles, sticky posts)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Mark this entry as a Sticky Post'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Entries can be read by'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Myself'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Co-authors'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Everyone'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Allow to cache entries?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'If enabled, a cached version will be generated on every saving. Caching will increase performance, but maybe decrease flexibility for other plugins.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Build cached entries'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Fetching next batch of entries...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Fetching entries %d to %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Building cache for entry #%d, %s...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Entry cached.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Entry caching completed.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Entry caching ABORTED.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (totalling %d entries)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'Disable nl2br'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Hide from article overview / frontpage'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Use group-based restrictions'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'If enabled, you can define which users of a usergroup may be able to read entries. This option has a large impact on the performance of your article overview. Only enable this if you are really going to use this feature.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Use user-based restrictions'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'If enabled, you can define which specific users may be able to read entries. This option has a large impact on the performance of your article overview. Only enable this if you are really going to use this feature.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Hide content in RSS'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'If enabled, the content of this entry will not be shown inside the RSS feed(s).'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Custom Fields'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Additional custom fields can be used in your template at places where you want them to show up. For that, edit your entries.tpl template file and place Smarty tags like {$entry.properties.ep_MyCustomField} in the HTML where you like. Note the prefix ep_ for each field. '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Here you can enter a list of commaseparated field names that you can use to enter for every entry - do not use special characters or spaces for those fieldnames. Example: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'The list of available custom fields can be changed in the plugin configuration.'); +include dirname(__FILE__) . '/lang_en.inc.php'; class serendipity_event_entryproperties extends serendipity_event { diff --git a/plugins/serendipity_plugin_comments/lang_en.inc.php b/plugins/serendipity_plugin_comments/lang_en.inc.php new file mode 100644 index 0000000..0c3a706 --- /dev/null +++ b/plugins/serendipity_plugin_comments/lang_en.inc.php @@ -0,0 +1,18 @@ + + * EN-Revision: Revision of lang_en.inc.php + */ + +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Displays the last comments to your entries'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Wordwrap'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'How many words until a wordwrap will occur? (Default: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Maximum chars per comment'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'How many chars will be displayed for each comment? (Default: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Maximum number of comments'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'How many comments will be shown? (Default: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s about%s'); + +?> diff --git a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php index c3b20ad..72db01b 100644 --- a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php +++ b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php @@ -6,14 +6,7 @@ if (file_exists($probelang)) { include $probelang; } -@define('PLUGIN_COMMENTS_BLAHBLAH', 'Displays the last comments to your entries'); -@define('PLUGIN_COMMENTS_WORDWRAP', 'Wordwrap'); -@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'How many words until a wordwrap will occur? (Default: 30)'); -@define('PLUGIN_COMMENTS_MAXCHARS', 'Maximum chars per comment'); -@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'How many chars will be displayed for each comment? (Default: 120)'); -@define('PLUGIN_COMMENTS_MAXENTRIES', 'Maximum number of comments'); -@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'How many comments will be shown? (Default: 15)'); -@define('PLUGIN_COMMENTS_ABOUT', '%s about%s'); +include dirname(__FILE__) . '/lang_en.inc.php'; class serendipity_plugin_comments extends serendipity_plugin { @@ -28,8 +21,8 @@ class serendipity_plugin_comments extends serendipity_plugin $propbag->add('name', COMMENTS); $propbag->add('description', PLUGIN_COMMENTS_BLAHBLAH); $propbag->add('stackable', true); - $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.3'); + $propbag->add('author', 'Garvin Hicking/Tadashi Jokagi'); + $propbag->add('version', '1.4'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -165,11 +158,15 @@ class serendipity_plugin_comments extends serendipity_plugin if ($sql && is_array($sql)) { foreach($sql AS $key => $row) { - $comments = wordwrap(strip_tags($row['comment']), $max_chars, '@@@', 1); - $aComment = explode('@@@', $comments); - $comment = $aComment[0]; - if (count($aComment) > 1) { - $comment .= ' [...]'; + if ( $serendipity['lang'] == "ja" && function_exists( 'mb_strimwidth')) { + $comment = mb_strimwidth( strip_tags($row['comment']), 0, $max_chars, " [...]"); + } else { + $comments = wordwrap(strip_tags($row['comment']), $max_chars, '@@@', 1); + $aComment = explode('@@@', $comments); + $comment = $aComment[0]; + if (count($aComment) > 1) { + $comment .= ' [...]'; + } } if ($row['comment_type'] == 'TRACKBACK' && $row['comment_url'] != '') { @@ -178,7 +175,21 @@ class serendipity_plugin_comments extends serendipity_plugin $user = htmlspecialchars(strip_tags($row['user'])); } - $entry = array('comment' => wordwrap($comment, $wordwrap, "\n", 1), + + if ( $serendipity['lang'] == "ja" && function_exists( 'mb_strimwidth')) { + $pos = 0; + $parts = array(); + $comment_len = mb_strlen( $comment); + while ( $pos < $comment_len) { + $part = mb_strimwidth( $comment, $pos, $wordwrap); + $pos += mb_strlen( $part); + $parts[] = $part; + } + $comment = implode( "\n", $parts); + } else { + $comment = wordwrap($comment, $wordwrap, "\n", 1); + } + $entry = array('comment' => $comment, 'email' => $row['comment_email']); serendipity_plugin_api::hook_event('frontend_display', $entry); printf( @@ -189,7 +200,7 @@ class serendipity_plugin_comments extends serendipity_plugin . htmlspecialchars($row['subject']) . '
' . "\n" . htmlspecialchars(serendipity_strftime($dateformat, $row['stamp'])) . '
' . "\n" - . strip_tags($entry['comment'], '
') + . strip_tags($entry['comment'], '
') . '


' . "\n\n" ); }