data/TWiki/TWikiPluralsDotPm.txt,v
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
head	1.1;
colas@0
     2
access;
colas@0
     3
symbols;
colas@0
     4
locks; strict;
colas@0
     5
comment	@# @;
colas@0
     6
colas@0
     7
colas@0
     8
1.1
colas@0
     9
date	2006.02.01.12.01.25;	author TWikiContributor;	state Exp;
colas@0
    10
branches;
colas@0
    11
next	;
colas@0
    12
colas@0
    13
colas@0
    14
desc
colas@0
    15
@new-topic
colas@0
    16
@
colas@0
    17
colas@0
    18
colas@0
    19
1.1
colas@0
    20
log
colas@0
    21
@buildrelease
colas@0
    22
@
colas@0
    23
text
colas@0
    24
@---+ Package =TWiki::Plurals=
colas@0
    25
colas@0
    26
Handle conversion of plural topic names to singular form.
colas@0
    27
colas@0
    28
colas@0
    29
%TOC%
colas@0
    30
colas@0
    31
---++ StaticMethod *singularForm* <tt>($web,$pluralForm) -> $singularForm</tt>
colas@0
    32
colas@0
    33
Try to singularise plural topic name.
colas@0
    34
   * =$web= - the web the topic must be in
colas@0
    35
   * =$pluralForm= - topic name
colas@0
    36
Returns undef if no singular form exists, otherwise returns the
colas@0
    37
singular form of the topic
colas@0
    38
colas@0
    39
I18N - Only apply plural processing if site language is English, or
colas@0
    40
if a built-in English-language web (Main, TWiki or Plugins).  Plurals
colas@0
    41
apply to names ending in 's', where topic doesn't exist with plural
colas@0
    42
name.
colas@0
    43
colas@0
    44
SMELL: this is highly langauge specific, and shoud be overridable
colas@0
    45
on a per-installation basis.
colas@0
    46
colas@0
    47
colas@0
    48
@