| 1 |
wakaba |
1.1 |
#?SuikaWikiConfig/2.0 |
| 2 |
|
|
|
| 3 |
|
|
Plugin: |
| 4 |
|
|
@Name: WikiPluginInfo |
| 5 |
|
|
@Description: |
| 6 |
|
|
@@@: WikiPlugin information |
| 7 |
|
|
@@lang:en |
| 8 |
|
|
@License: %%Perl%% |
| 9 |
|
|
@Author: |
| 10 |
|
|
@@Name: |
| 11 |
|
|
@@@@: Wakaba |
| 12 |
|
|
@@@lang:ja |
| 13 |
|
|
@@@script:Latn |
| 14 |
|
|
@@Mail[list]: [email protected] |
| 15 |
|
|
@Date.RCS: |
| 16 |
|
|
$Date: 2004/01/16 07:54:22 $ |
| 17 |
|
|
@RequiredPlugin[list]: |
| 18 |
|
|
WikiStruct |
| 19 |
|
|
@Use: |
| 20 |
|
|
my $WIKIRESOURCE; |
| 21 |
|
|
use Message::Util::Error; |
| 22 |
|
|
|
| 23 |
|
|
PluginConst: |
| 24 |
|
|
@NS_XHTML1: |
| 25 |
|
|
http://www.w3.org/1999/xhtml |
| 26 |
|
|
@WIKIRESOURCE: |
| 27 |
|
|
{($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))} |
| 28 |
|
|
|
| 29 |
|
|
FormattingRule: |
| 30 |
|
|
@Category[list]: |
| 31 |
|
|
view |
| 32 |
|
|
view-resource |
| 33 |
|
|
form-input |
| 34 |
|
|
@Name: wpi--for-each-plugin |
| 35 |
|
|
@Description: |
| 36 |
|
|
@@@: Apply template for each WikiPlugin module |
| 37 |
|
|
@@lang: en |
| 38 |
|
|
@Parameter: |
| 39 |
|
|
@@Name: template |
| 40 |
|
|
@@Type: template |
| 41 |
|
|
@@Default: #REQUIRED |
| 42 |
|
|
@@Description: |
| 43 |
|
|
@@@@: |
| 44 |
|
|
Template to be applied for each module |
| 45 |
|
|
@@lang: en |
| 46 |
|
|
@Formatting: |
| 47 |
|
|
__ATTRTEXT:%template__; |
| 48 |
|
|
$p->{template} ||= $WIKIRESOURCE->get |
| 49 |
|
|
(name => 'WikiPluginInfo:ForEachPlugin:Template', |
| 50 |
|
|
o => $o, wiki => $o->{wiki}); |
| 51 |
|
|
my $formatter = SuikaWiki::Plugin->formatter ('view_resource'); |
| 52 |
|
|
for (sort keys %SuikaWiki::Plugin::Registry::Info) { |
| 53 |
|
|
local $o->{var}->{wpi__plugin_module} = $_; |
| 54 |
|
|
try { |
| 55 |
|
|
$formatter->replace ($p->{template}, |
| 56 |
|
|
param => $o, |
| 57 |
|
|
-parent => $p->{-parent}); |
| 58 |
|
|
} catch Message::Util::Formatter::error with { |
| 59 |
|
|
my $err = shift; |
| 60 |
|
|
if ($err->{-object}->{-category_name} eq 'view_resource') { |
| 61 |
|
|
my $wiki = $err->{option}->{param}->{wiki}; |
| 62 |
|
|
SuikaWiki::Plugin->module_package ('Error') |
| 63 |
|
|
->reporting_formatting_template_error |
| 64 |
|
|
($err, $wiki, |
| 65 |
|
|
template => $p->{template}); |
| 66 |
|
|
undef; |
| 67 |
|
|
} else { |
| 68 |
|
|
$err->throw; |
| 69 |
|
|
} |
| 70 |
|
|
}; |
| 71 |
|
|
} |
| 72 |
|
|
|
| 73 |
|
|
FormattingRule: |
| 74 |
|
|
@Category[list]: |
| 75 |
|
|
view |
| 76 |
|
|
view-resource |
| 77 |
|
|
form-input |
| 78 |
|
|
@Name: wpi--for-each-formatting-category |
| 79 |
|
|
@Description: |
| 80 |
|
|
@@@: Apply template for each formatting caregory |
| 81 |
|
|
@@lang: en |
| 82 |
|
|
@Parameter: |
| 83 |
|
|
@@Name: template |
| 84 |
|
|
@@Type: template |
| 85 |
|
|
@@Default: #REQUIRED |
| 86 |
|
|
@@Description: |
| 87 |
|
|
@@@@: |
| 88 |
|
|
Template to be applied for each module |
| 89 |
|
|
@@lang: en |
| 90 |
|
|
@Formatting: |
| 91 |
|
|
__ATTRTEXT:%template__; |
| 92 |
|
|
$p->{template} ||= $WIKIRESOURCE->get |
| 93 |
|
|
(name => 'WikiPluginInfo:ForEachCategory:Template', |
| 94 |
|
|
o => $o, wiki => $o->{wiki}); |
| 95 |
|
|
my $formatter = SuikaWiki::Plugin->formatter ('view_resource'); |
| 96 |
|
|
for (sort keys %SuikaWiki::Plugin::Rule) { |
| 97 |
|
|
local $o->{var}->{wpi__formatting_category} = $_; |
| 98 |
|
|
try { |
| 99 |
|
|
$formatter->replace ($p->{template}, |
| 100 |
|
|
param => $o, |
| 101 |
|
|
-parent => $p->{-parent}); |
| 102 |
|
|
} catch Message::Util::Formatter::error with { |
| 103 |
|
|
my $err = shift; |
| 104 |
|
|
if ($err->{-object}->{-category_name} eq 'view_resource') { |
| 105 |
|
|
my $wiki = $err->{option}->{param}->{wiki}; |
| 106 |
|
|
SuikaWiki::Plugin->module_package ('Error') |
| 107 |
|
|
->reporting_formatting_template_error |
| 108 |
|
|
($err, $wiki, |
| 109 |
|
|
template => $p->{template}); |
| 110 |
|
|
undef; |
| 111 |
|
|
} else { |
| 112 |
|
|
$err->throw; |
| 113 |
|
|
} |
| 114 |
|
|
}; |
| 115 |
|
|
} |
| 116 |
|
|
|
| 117 |
|
|
FormattingRule: |
| 118 |
|
|
@Category[list]: |
| 119 |
|
|
view |
| 120 |
|
|
view-resource |
| 121 |
|
|
form-input |
| 122 |
|
|
@Name: wpi--for-each-formatting-rule |
| 123 |
|
|
@Description: |
| 124 |
|
|
@@@: Apply template for each formatting rule |
| 125 |
|
|
@@lang: en |
| 126 |
|
|
@Parameter: |
| 127 |
|
|
@@Name: category |
| 128 |
|
|
@@Type: text |
| 129 |
|
|
@@Default: (auto) |
| 130 |
|
|
@@Description: |
| 131 |
|
|
@@@@: Formatting category to which rule belongs |
| 132 |
|
|
@@@lang: en |
| 133 |
|
|
@Parameter: |
| 134 |
|
|
@@Name: template |
| 135 |
|
|
@@Type: template |
| 136 |
|
|
@@Default: #REQUIRED |
| 137 |
|
|
@@Description: |
| 138 |
|
|
@@@@: |
| 139 |
|
|
Template to be applied for each module |
| 140 |
|
|
@@lang: en |
| 141 |
|
|
@Formatting: |
| 142 |
|
|
my $category = $p->{category} || $o->{var}->{wpi__formatting_category}; |
| 143 |
|
|
__ATTRTEXT:%template__; |
| 144 |
|
|
$p->{template} ||= $WIKIRESOURCE->get |
| 145 |
|
|
(name => 'WikiPluginInfo:ForEachRule:Template', |
| 146 |
|
|
o => $o, wiki => $o->{wiki}); |
| 147 |
|
|
my $formatter = SuikaWiki::Plugin->formatter ('view_resource'); |
| 148 |
|
|
for (sort keys %{$SuikaWiki::Plugin::Rule{$category}}) { |
| 149 |
|
|
local $o->{var}->{wpi__formatting_rule} = $_; |
| 150 |
|
|
try { |
| 151 |
|
|
$formatter->replace ($p->{template}, |
| 152 |
|
|
param => $o, |
| 153 |
|
|
-parent => $p->{-parent}); |
| 154 |
|
|
} catch Message::Util::Formatter::error with { |
| 155 |
|
|
my $err = shift; |
| 156 |
|
|
if ($err->{-object}->{-category_name} eq 'view_resource') { |
| 157 |
|
|
my $wiki = $err->{option}->{param}->{wiki}; |
| 158 |
|
|
SuikaWiki::Plugin->module_package ('Error') |
| 159 |
|
|
->reporting_formatting_template_error |
| 160 |
|
|
($err, $wiki, |
| 161 |
|
|
template => $p->{template}); |
| 162 |
|
|
undef; |
| 163 |
|
|
} else { |
| 164 |
|
|
$err->throw; |
| 165 |
|
|
} |
| 166 |
|
|
}; |
| 167 |
|
|
} |
| 168 |
|
|
|
| 169 |
|
|
FormattingRule: |
| 170 |
|
|
@Category[list]: |
| 171 |
|
|
view |
| 172 |
|
|
view-resource |
| 173 |
|
|
form-input |
| 174 |
|
|
@Name: wpi--plugin-name |
| 175 |
|
|
@Description: |
| 176 |
|
|
@@@: WikiPlugin module name |
| 177 |
|
|
@@lang: en |
| 178 |
|
|
@Parameter: |
| 179 |
|
|
@@Name: module |
| 180 |
|
|
@@Type: text |
| 181 |
|
|
@@Default: (auto) |
| 182 |
|
|
@@Description: |
| 183 |
|
|
@@@@: WikiPlugin module name |
| 184 |
|
|
@@@lang: en |
| 185 |
|
|
@Formatting: |
| 186 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 187 |
|
|
$p->{-parent}->append_text ( |
| 188 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 189 |
|
|
->{Name} |
| 190 |
|
|
); |
| 191 |
|
|
|
| 192 |
|
|
FormattingRule: |
| 193 |
|
|
@Category[list]: |
| 194 |
|
|
view |
| 195 |
|
|
view-resource |
| 196 |
|
|
form-input |
| 197 |
|
|
@Name: wpi--plugin-version |
| 198 |
|
|
@Description: |
| 199 |
|
|
@@@: WikiPlugin module version |
| 200 |
|
|
@@lang: en |
| 201 |
|
|
@Parameter: |
| 202 |
|
|
@@Name: module |
| 203 |
|
|
@@Type: text |
| 204 |
|
|
@@Default: (auto) |
| 205 |
|
|
@@Description: |
| 206 |
|
|
@@@@: WikiPlugin module name |
| 207 |
|
|
@@@lang: en |
| 208 |
|
|
@Formatting: |
| 209 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 210 |
|
|
$p->{-parent}->append_text ( |
| 211 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 212 |
|
|
->{Version} |
| 213 |
|
|
); |
| 214 |
|
|
|
| 215 |
|
|
FormattingRule: |
| 216 |
|
|
@Category[list]: |
| 217 |
|
|
view |
| 218 |
|
|
view-resource |
| 219 |
|
|
form-input |
| 220 |
|
|
@Name: wpi--plugin-version-rcs-date |
| 221 |
|
|
@Description: |
| 222 |
|
|
@@@: WikiPlugin module version as RCS date-time |
| 223 |
|
|
@@lang: en |
| 224 |
|
|
@Parameter: |
| 225 |
|
|
@@Name: module |
| 226 |
|
|
@@Type: text |
| 227 |
|
|
@@Default: (auto) |
| 228 |
|
|
@@Description: |
| 229 |
|
|
@@@@: WikiPlugin module name |
| 230 |
|
|
@@@lang: en |
| 231 |
|
|
@Formatting: |
| 232 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 233 |
|
|
$p->{-parent}->append_text ( |
| 234 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 235 |
|
|
->{'Date.RCS'} |
| 236 |
|
|
); |
| 237 |
|
|
|
| 238 |
|
|
FormattingRule: |
| 239 |
|
|
@Category[list]: |
| 240 |
|
|
view |
| 241 |
|
|
view-resource |
| 242 |
|
|
form-input |
| 243 |
|
|
@Name: wpi--plugin-interface-version |
| 244 |
|
|
@Description: |
| 245 |
|
|
@@@: WikiPlugin interface version implemented by the WikiPlugin module |
| 246 |
|
|
@@lang: en |
| 247 |
|
|
@Parameter: |
| 248 |
|
|
@@Name: module |
| 249 |
|
|
@@Type: text |
| 250 |
|
|
@@Default: (auto) |
| 251 |
|
|
@@Description: |
| 252 |
|
|
@@@@: WikiPlugin module name |
| 253 |
|
|
@@@lang: en |
| 254 |
|
|
@Formatting: |
| 255 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 256 |
|
|
$p->{-parent}->append_text ( |
| 257 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 258 |
|
|
->{InterfaceVersion} |
| 259 |
|
|
); |
| 260 |
|
|
|
| 261 |
|
|
FormattingRule: |
| 262 |
|
|
@Category[list]: |
| 263 |
|
|
view |
| 264 |
|
|
view-resource |
| 265 |
|
|
form-input |
| 266 |
|
|
@Name: wpi--plugin-mkplugin-version |
| 267 |
|
|
@Description: |
| 268 |
|
|
@@@: Version of mkplugin that genearted the WikiPlugin module |
| 269 |
|
|
@@lang: en |
| 270 |
|
|
@Parameter: |
| 271 |
|
|
@@Name: module |
| 272 |
|
|
@@Type: text |
| 273 |
|
|
@@Default: (auto) |
| 274 |
|
|
@@Description: |
| 275 |
|
|
@@@@: WikiPlugin module name |
| 276 |
|
|
@@@lang: en |
| 277 |
|
|
@Formatting: |
| 278 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 279 |
|
|
$p->{-parent}->append_text ( |
| 280 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 281 |
|
|
->{mkpluginVersion} |
| 282 |
|
|
); |
| 283 |
|
|
|
| 284 |
|
|
FormattingRule: |
| 285 |
|
|
@Category[list]: |
| 286 |
|
|
view |
| 287 |
|
|
view-resource |
| 288 |
|
|
form-input |
| 289 |
|
|
@Name: wpi--plugin-license |
| 290 |
|
|
@Description: |
| 291 |
|
|
@@@: WikiPlugin module license |
| 292 |
|
|
@@lang: en |
| 293 |
|
|
@Parameter: |
| 294 |
|
|
@@Name: module |
| 295 |
|
|
@@Type: text |
| 296 |
|
|
@@Default: (auto) |
| 297 |
|
|
@@Description: |
| 298 |
|
|
@@@@: WikiPlugin module name |
| 299 |
|
|
@@@lang: en |
| 300 |
|
|
@Formatting: |
| 301 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 302 |
|
|
my $license = $WIKIRESOURCE->temp_get_language_resource_from_array |
| 303 |
|
|
(source => ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 304 |
|
|
->{License}, o => $o)->[0]; |
| 305 |
|
|
$license =~ s{ %%([A-Za-z0-9_.+-]+)%% |
| 306 |
|
|
| ((?:(?!%%).)+)} |
| 307 |
|
|
{$1 ? $WIKIRESOURCE->get_op |
| 308 |
|
|
('WikiPluginInfo:License:'.$1, $o, $p->{-parent}) |
| 309 |
|
|
: $p->{-parent}->append_text ($2); ''}gex; |
| 310 |
|
|
|
| 311 |
|
|
FormattingRule: |
| 312 |
|
|
@Category[list]: |
| 313 |
|
|
view |
| 314 |
|
|
view-resource |
| 315 |
|
|
form-input |
| 316 |
|
|
@Name: wpi--plugin-description |
| 317 |
|
|
@Description: |
| 318 |
|
|
@@@: WikiPlugin module description |
| 319 |
|
|
@@lang: en |
| 320 |
|
|
@Parameter: |
| 321 |
|
|
@@Name: module |
| 322 |
|
|
@@Type: text |
| 323 |
|
|
@@Default: (auto) |
| 324 |
|
|
@@Description: |
| 325 |
|
|
@@@@: WikiPlugin module name |
| 326 |
|
|
@@@lang: en |
| 327 |
|
|
@Formatting: |
| 328 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 329 |
|
|
$p->{-parent}->append_text ( |
| 330 |
|
|
($WIKIRESOURCE->temp_get_language_resource_from_array |
| 331 |
|
|
(source => ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 332 |
|
|
->{Description}, |
| 333 |
|
|
o => $o) || [])->[0], |
| 334 |
|
|
); |
| 335 |
|
|
|
| 336 |
|
|
FormattingRule: |
| 337 |
|
|
@Category[list]: |
| 338 |
|
|
view |
| 339 |
|
|
view-resource |
| 340 |
|
|
form-input |
| 341 |
|
|
@Name: wpi--plugin-required-plugins |
| 342 |
|
|
@Description: |
| 343 |
|
|
@@@: WikiPlugin modules required by this WikiPlugin module |
| 344 |
|
|
@@lang: en |
| 345 |
|
|
@Parameter: |
| 346 |
|
|
@@Name: module |
| 347 |
|
|
@@Type: text |
| 348 |
|
|
@@Default: (auto) |
| 349 |
|
|
@@Description: |
| 350 |
|
|
@@@@: WikiPlugin module name |
| 351 |
|
|
@@@lang: en |
| 352 |
|
|
@Formatting: |
| 353 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 354 |
|
|
my $list = ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 355 |
|
|
->{RequiredPlugin} || []; |
| 356 |
|
|
return unless @$list; |
| 357 |
|
|
my $ul = $p->{-parent}->append_new_node |
| 358 |
|
|
(type => '#element', |
| 359 |
|
|
namespace_uri => $NS_XHTML1, |
| 360 |
|
|
local_name => 'ul'); |
| 361 |
|
|
for (sort @$list) { |
| 362 |
|
|
$ul->append_new_node (type => '#element', |
| 363 |
|
|
namespace_uri => $NS_XHTML1, |
| 364 |
|
|
local_name => 'li') |
| 365 |
|
|
->append_text ($_); |
| 366 |
|
|
## TODO: Should be template aware |
| 367 |
|
|
} |
| 368 |
|
|
|
| 369 |
|
|
FormattingRule: |
| 370 |
|
|
@Category[list]: |
| 371 |
|
|
view |
| 372 |
|
|
view-resource |
| 373 |
|
|
form-input |
| 374 |
|
|
@Name: wpi--plugin-required-modules |
| 375 |
|
|
@Description: |
| 376 |
|
|
@@@: Perl modules required by this WikiPlugin module |
| 377 |
|
|
@@lang: en |
| 378 |
|
|
@Parameter: |
| 379 |
|
|
@@Name: module |
| 380 |
|
|
@@Type: text |
| 381 |
|
|
@@Default: (auto) |
| 382 |
|
|
@@Description: |
| 383 |
|
|
@@@@: WikiPlugin module name |
| 384 |
|
|
@@@lang: en |
| 385 |
|
|
@Formatting: |
| 386 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
| 387 |
|
|
my $list = ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
| 388 |
|
|
->{RequiredModule} || []; |
| 389 |
|
|
return unless @$list; |
| 390 |
|
|
my $ul = $p->{-parent}->append_new_node |
| 391 |
|
|
(type => '#element', |
| 392 |
|
|
namespace_uri => $NS_XHTML1, |
| 393 |
|
|
local_name => 'ul'); |
| 394 |
|
|
for (sort @$list) { |
| 395 |
|
|
$ul->append_new_node (type => '#element', |
| 396 |
|
|
namespace_uri => $NS_XHTML1, |
| 397 |
|
|
local_name => 'li') |
| 398 |
|
|
->append_text ($_); |
| 399 |
|
|
## TODO: Should be template aware |
| 400 |
|
|
} |
| 401 |
|
|
|
| 402 |
|
|
FormattingRule: |
| 403 |
|
|
@Category[list]: |
| 404 |
|
|
view |
| 405 |
|
|
view-resource |
| 406 |
|
|
form-input |
| 407 |
|
|
@Name: wpi--formatting-category-name |
| 408 |
|
|
@Description: |
| 409 |
|
|
@@@: Formatting category name |
| 410 |
|
|
@@lang: en |
| 411 |
|
|
@Parameter: |
| 412 |
|
|
@@Name: category |
| 413 |
|
|
@@Type: text |
| 414 |
|
|
@@Default: (auto) |
| 415 |
|
|
@@Description: |
| 416 |
|
|
@@@@: Formatting category |
| 417 |
|
|
@@@lang: en |
| 418 |
|
|
@Formatting: |
| 419 |
|
|
my $name = $p->{category} || $o->{var}->{wpi__formatting_category}; |
| 420 |
|
|
$name =~ s/(?<=.)_/-/g; |
| 421 |
|
|
$p->{-parent}->append_text ($name); |
| 422 |
|
|
|
| 423 |
|
|
FormattingRule: |
| 424 |
|
|
@Category[list]: |
| 425 |
|
|
view |
| 426 |
|
|
view-resource |
| 427 |
|
|
form-input |
| 428 |
|
|
@Name: wpi--formatting-rule-name |
| 429 |
|
|
@Description: |
| 430 |
|
|
@@@: Formatting rule name |
| 431 |
|
|
@@lang: en |
| 432 |
|
|
@Parameter: |
| 433 |
|
|
@@Name: rule |
| 434 |
|
|
@@Type: text |
| 435 |
|
|
@@Default: (auto) |
| 436 |
|
|
@@Description: |
| 437 |
|
|
@@@@: Formatting rule |
| 438 |
|
|
@@@lang: en |
| 439 |
|
|
@Formatting: |
| 440 |
|
|
my $name = $p->{rule} || $o->{var}->{wpi__formatting_rule}; |
| 441 |
|
|
$name =~ s/(?<=.)_/-/g; |
| 442 |
|
|
$p->{-parent}->append_text ($name); |
| 443 |
|
|
|
| 444 |
|
|
FormattingRule: |
| 445 |
|
|
@Category[list]: |
| 446 |
|
|
view |
| 447 |
|
|
view-resource |
| 448 |
|
|
form-input |
| 449 |
|
|
@Name: wpi--formatting-rule-description |
| 450 |
|
|
@Description: |
| 451 |
|
|
@@@: FormattingRule description |
| 452 |
|
|
@@lang: en |
| 453 |
|
|
@Parameter: |
| 454 |
|
|
@@Name: category |
| 455 |
|
|
@@Type: text |
| 456 |
|
|
@@Default: (auto) |
| 457 |
|
|
@@Description: |
| 458 |
|
|
@@@@: Formatting category |
| 459 |
|
|
@@@lang: en |
| 460 |
|
|
@Parameter: |
| 461 |
|
|
@@Name: rule |
| 462 |
|
|
@@Type: text |
| 463 |
|
|
@@Default: (auto) |
| 464 |
|
|
@@Description: |
| 465 |
|
|
@@@@: Formatting rule |
| 466 |
|
|
@@@lang: en |
| 467 |
|
|
@Formatting: |
| 468 |
|
|
my $category = $p->{category} || $o->{var}->{wpi__formatting_category}; |
| 469 |
|
|
my $rule = $p->{rule} || $o->{var}->{wpi__formatting_rule}; |
| 470 |
|
|
$category =~ s/(?=.)-/_/ if $p->{category}; |
| 471 |
|
|
$rule =~ s/(?=.)-/_/ if $p->{rule}; |
| 472 |
|
|
$p->{-parent}->append_text ( |
| 473 |
|
|
($WIKIRESOURCE->temp_get_language_resource_from_array |
| 474 |
|
|
(source => (($SuikaWiki::Plugin::Rule{ $category } || {}) |
| 475 |
|
|
->{ $rule } || {}) |
| 476 |
|
|
->{Description}, |
| 477 |
|
|
o => $o) || [])->[0] |
| 478 |
|
|
); |
| 479 |
|
|
|
| 480 |
|
|
Resource: |
| 481 |
|
|
@WikiPluginInfo:Description: |
| 482 |
|
|
@@@: Description |
| 483 |
|
|
@@lang: en |
| 484 |
|
|
@WikiPluginInfo:ForEachCategory:Template: |
| 485 |
|
|
%section ( |
| 486 |
|
|
title => {%wpi--formatting-category-name;}p, heading, |
| 487 |
|
|
content => {%wpi--for-each-formatting-rule;}p, |
| 488 |
|
|
); |
| 489 |
|
|
@WikiPluginInfo:ForEachPlugin:Template: |
| 490 |
|
|
%section ( |
| 491 |
|
|
title => {%wpi--plugin-name;}p, heading, |
| 492 |
|
|
content => { |
| 493 |
|
|
%list ( |
| 494 |
|
|
{%res (name => {WikiPluginInfo:Description});}p => |
| 495 |
|
|
{%wpi--plugin-description;}p, |
| 496 |
|
|
{%res (name => {WikiPluginInfo:Version});}p => |
| 497 |
|
|
{%wpi--plugin-version; (%wpi--plugin-version-rcs-date;)}p, |
| 498 |
|
|
{%res (name => {WikiPluginInfo:InterfaceVersion});}p => |
| 499 |
|
|
{%wpi--plugin-interface-version;}p, |
| 500 |
|
|
{%res (name => {WikiPluginInfo:mkpluginVersion});}p => |
| 501 |
|
|
{%wpi--plugin-mkplugin-version;}p, |
| 502 |
|
|
{%res (name => {WikiPluginInfo:License});}p => |
| 503 |
|
|
{%wpi--plugin-license;}p, |
| 504 |
|
|
{%res (name => {WikiPluginInfo:RequiredPlugins});}p => |
| 505 |
|
|
{%wpi--plugin-required-plugins;}p, |
| 506 |
|
|
{%res (name => {WikiPluginInfo:RequiredModules});}p => |
| 507 |
|
|
{%wpi--plugin-required-modules;}p, |
| 508 |
|
|
); |
| 509 |
|
|
}p, |
| 510 |
|
|
); |
| 511 |
|
|
@WikiPluginInfo:ForEachRule:Template: |
| 512 |
|
|
%section ( |
| 513 |
|
|
title => {%wpi--formatting-rule-name;}p, heading, |
| 514 |
|
|
content => { |
| 515 |
|
|
%list ( |
| 516 |
|
|
{%res (name => {WikiPluginInfo:Rule:Name});}p => |
| 517 |
|
|
{%wpi--formatting-category-name;/%wpi--formatting-rule-name;}p, |
| 518 |
|
|
{%res (name => {WikiPluginInfo:Description});}p => |
| 519 |
|
|
{%wpi--formatting-rule-description;}p, |
| 520 |
|
|
); |
| 521 |
|
|
}p, |
| 522 |
|
|
); |
| 523 |
|
|
@WikiPluginInfo:InterfaceVersion: |
| 524 |
|
|
@@@: WikiPlugin interface implemented by this module |
| 525 |
|
|
@@lang: en |
| 526 |
|
|
@WikiPluginInfo:License: |
| 527 |
|
|
@@@: License of this module |
| 528 |
|
|
@@lang: en |
| 529 |
|
|
@WikiPluginInfo:License:GPL: |
| 530 |
|
|
@@@: |
| 531 |
|
|
%paragraph (content => |
| 532 |
|
|
{This program is free software; you can redistribute it and/or |
| 533 |
|
|
modify it under the terms of the %link-to-resource ( |
| 534 |
|
|
label => {%link-to-it (label => {GNU General Public License});}, |
| 535 |
|
|
uri => {http://www.gnu.org/copyleft/gpl.html}, |
| 536 |
|
|
); as published by the %link-to-resource ( |
| 537 |
|
|
label => {%link-to-it (label => {Free Software Foundation});}, |
| 538 |
|
|
uri => {http://www.fsf.org/}, |
| 539 |
|
|
); either version 2 |
| 540 |
|
|
of the License, or (at your option) any later version.}p); |
| 541 |
|
|
|
| 542 |
|
|
%paragraph (content => |
| 543 |
|
|
{This program is distributed in the hope that it will be useful, |
| 544 |
|
|
but %em (content => {WITHOUT ANY WARRANTY});; |
| 545 |
|
|
without even the implied warranty of |
| 546 |
|
|
%em (content => {MERCHANTABILITY}); or |
| 547 |
|
|
%em (content => {FITNESS FOR A PARTICULAR PURPOSE});. See the |
| 548 |
|
|
GNU General Public License for more details.}p); |
| 549 |
|
|
|
| 550 |
|
|
%paragraph (content => |
| 551 |
|
|
{You should have received a copy of the GNU General Public License |
| 552 |
|
|
along with this program; if not, write to the Free Software |
| 553 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 554 |
|
|
USA.}); |
| 555 |
|
|
@@lang: en |
| 556 |
|
|
@WikiPluginInfo:License:Mozilla: |
| 557 |
|
|
@@@: |
| 558 |
|
|
Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 559 |
|
|
|
| 560 |
|
|
%paragraph (content => {The contents of this file are subject to |
| 561 |
|
|
the Mozilla Public License Version 1.1 (the "License"); you may |
| 562 |
|
|
not use this file except in compliance with |
| 563 |
|
|
the License. You may obtain a copy of the License at |
| 564 |
|
|
<%link-to-resource ( |
| 565 |
|
|
label => {%link-to-it (label => {http://www.mozilla.org/MPL/});}, |
| 566 |
|
|
uri => {http://www.mozilla.org/MPL/});>}p); |
| 567 |
|
|
|
| 568 |
|
|
%paragraph (content => {Software distributed under the License is |
| 569 |
|
|
distributed on an "%em (content => {AS IS});" basis, |
| 570 |
|
|
%em (content => {WITHOUT WARRANTY OF ANY KIND});, |
| 571 |
|
|
either express or implied. See the License |
| 572 |
|
|
for the specific language governing rights and limitations under the |
| 573 |
|
|
License.}p); |
| 574 |
|
|
|
| 575 |
|
|
# The Original Code is something code. |
| 576 |
|
|
|
| 577 |
|
|
#The Initial Developer of the Original Code is |
| 578 |
|
|
#Someone <[email protected]>. |
| 579 |
|
|
#Portions created by the Initial Developer are Copyright (C) yyyy |
| 580 |
|
|
#the Initial Developer. All Rights Reserved. |
| 581 |
|
|
|
| 582 |
|
|
#Contributor(s): |
| 583 |
|
|
# Somwone <[email protected]> (original author) |
| 584 |
|
|
|
| 585 |
|
|
%paragraph (content => {Alternatively, the contents of this file may |
| 586 |
|
|
be used under the terms of |
| 587 |
|
|
either the %link-to-resource ( |
| 588 |
|
|
label => {%link-to-it (label => {GNU General Public License});}, |
| 589 |
|
|
uri => {http://www.gnu.org/copyleft/gpl.html}, |
| 590 |
|
|
); Version 2 or later (the "GPL"), or |
| 591 |
|
|
the %link-to-resource ( |
| 592 |
|
|
label => {%link-to-it (label => {GNU Lesser General Public License});}, |
| 593 |
|
|
uri => {http://www.gnu.org/copyleft/lesser.html}, |
| 594 |
|
|
); Version 2.1 or later (the "LGPL"), |
| 595 |
|
|
in which case the provisions of the GPL or the LGPL are applicable instead |
| 596 |
|
|
of those above. If you wish to allow use of your version of this file only |
| 597 |
|
|
under the terms of either the GPL or the LGPL, and not to allow others to |
| 598 |
|
|
use your version of this file under the terms of the MPL, indicate your |
| 599 |
|
|
decision by deleting the provisions above and replace them with the notice |
| 600 |
|
|
and other provisions required by the GPL or the LGPL. If you do not delete |
| 601 |
|
|
the provisions above, a recipient may use your version of this file under |
| 602 |
|
|
the terms of any one of the MPL, the GPL or the LGPL.}p); |
| 603 |
|
|
@@lang: en |
| 604 |
|
|
@WikiPluginInfo:License:Perl: |
| 605 |
|
|
@@@: |
| 606 |
|
|
%paragraph (content => |
| 607 |
|
|
{This program is free software; you can redistribute it and/or |
| 608 |
|
|
modify it under the same terms as Perl itself.}); |
| 609 |
|
|
@@lang: en |
| 610 |
|
|
@WikiPluginInfo:mkpluginVersion: |
| 611 |
|
|
@@@: Version of mkplugin that generated this module |
| 612 |
|
|
@@lang: en |
| 613 |
|
|
@WikiPluginInfo:RequiredModules: |
| 614 |
|
|
@@@: Perl modules required by this module |
| 615 |
|
|
@@lang: en |
| 616 |
|
|
@WikiPluginInfo:RequiredPlugins: |
| 617 |
|
|
@@@: WikiPlugin modules required by this module |
| 618 |
|
|
@@lang: en |
| 619 |
|
|
@WikiPluginInfo:Rule:Name: |
| 620 |
|
|
@@@: Formatting rule name |
| 621 |
|
|
@@lang: en |
| 622 |
|
|
@WikiPluginInfo:Version: |
| 623 |
|
|
@@@: Version |
| 624 |
|
|
@@lang: en |
| 625 |
|
|
|