--- /dev/null
+<?php # $Id$
+
+/**
+ * @version $Revision$
+ * @author Translator Name <yourmail@example.com>
+ * 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.');
+
+?>
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
{
--- /dev/null
+<?php # $Id$
+
+/**
+ * @version $Revision$
+ * @author Translator Name <yourmail@example.com>
+ * 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, <em>%s</em>...');
+@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 <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">plugin configuration</a>.');
+
+?>
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, <em>%s</em>...');
-@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 <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">plugin configuration</a>.');
+include dirname(__FILE__) . '/lang_en.inc.php';
class serendipity_event_entryproperties extends serendipity_event
{
--- /dev/null
+<?php # $Id$
+
+/**
+ * @version $Revision$
+ * @author Translator Name <yourmail@example.com>
+ * 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');
+
+?>
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
{
$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',
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'] != '') {
$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(
. htmlspecialchars($row['subject'])
. '</a><br />' . "\n"
. htmlspecialchars(serendipity_strftime($dateformat, $row['stamp'])) . '<br />' . "\n"
- . strip_tags($entry['comment'], '<br><img>')
+ . strip_tags($entry['comment'], '<br /><img>')
. '<br /><br /><br />' . "\n\n"
);
}