ports/75303: New port: sysutils/pear-Translation2 PEAR class for multilingual applications management
Antonio Carlos Venancio Junior
antonio at php.net
Mon Dec 20 12:50:35 UTC 2004
>Number: 75303
>Category: ports
>Synopsis: New port: sysutils/pear-Translation2 PEAR class for multilingual applications management
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 20 12:50:24 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Antônio Carlos Venâncio Júnior
>Release: FreeBSD 4.10-STABLE i386
>Organization:
>Environment:
System: FreeBSD antonio.cb.sc.gov.br 4.10-STABLE FreeBSD 4.10-STABLE #6: Wed Nov 24 10:18:56 BRST 2004 root at antonio.cb.sc.gov.br:/usr/src/sys/compile/ANTONIO i386
>Description:
New port: sysutils/pear-Translation2 PEAR class for multilingual applications management
This class provides an easy way to retrieve all the strings for a multilingual
site from a data source (i.e. db).
The following containers are provided, more will follow:
- PEAR::DB
- PEAR::MDB
- PEAR::MDB2
- gettext
- XML
- PEAR::DB_DataObject (experimental)
It is designed to reduce the number of queries to the db, caching the results
when possible. An Admin class is provided to easily manage translations
(add/remove a language, add/remove a string).
Currently, the following decorators are provided:
- CacheLiteFunction (for file-based caching)
- CacheMemory (for memory-based caching)
- DefaultText (to replace empty strings with their keys)
- Iconv (to switch from/to different encodings)
- Lang (resort to fallback languages for empty strings)
- SpecialChars (replace html entities with their hex codes)
- UTF-8 (to convert UTF-8 strings to ISO-8859-1)
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# pear-Translation2
# pear-Translation2/Makefile
# pear-Translation2/distinfo
# pear-Translation2/pkg-descr
#
echo c - pear-Translation2
mkdir -p pear-Translation2 > /dev/null 2>&1
echo x - pear-Translation2/Makefile
sed 's/^X//' >pear-Translation2/Makefile << 'END-of-pear-Translation2/Makefile'
X# Ports collection makefile for: pear-Translation2
X# Date created: 20 December 2004
X# Whom: Antonio Carlos Venancio Junior (<antonio at inf.ufsc.br>)
X#
X# $FreeBSD$
X#
X
XPORTNAME= Translation2
XPORTVERSION= 2.0.0
XCATEGORIES= sysutils devel pear
XDISTNAME= ${PORTNAME}-${PORTVERSION}beta4
X
XMAINTAINER= antonio at php.net
XCOMMENT= PEAR class for multilingual applications management
X
XBUILD_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
XRUN_DEPENDS= ${BUILD_DEPENDS}
X
XUSE_PHP= yes
X
XFILES= Translation2.php Translation2/Admin.php Translation2/Container.php \
X Translation2/Decorator.php Translation2/Admin/Decorator.php \
X Translation2/Admin/Container/dataobjectsimple.php \
X Translation2/Admin/Container/db.php \
X Translation2/Admin/Container/gettext.php \
X Translation2/Admin/Container/mdb.php \
X Translation2/Admin/Container/mdb2.php \
X Translation2/Admin/Container/xml.php \
X Translation2/Admin/Decorator/Autoadd.php \
X Translation2/Container/dataobjectsimple.php \
X Translation2/Container/db.php Translation2/Container/gettext.php \
X Translation2/Container/mdb.php Translation2/Container/mdb2.php \
X Translation2/Container/xml.php \
X Translation2/Decorator/CacheLiteFunction.php \
X Translation2/Decorator/CacheMemory.php \
X Translation2/Decorator/DefaultText.php \
X Translation2/Decorator/Iconv.php Translation2/Decorator/Lang.php \
X Translation2/Decorator/SpecialChars.php \
X Translation2/Decorator/UTF8.php
XDOCS= gettext_readme.txt
XEXAMPLES= gettext_admin.php gettext_domains.ini gettext_langs.ini \
X gettext_prepare.php gettext_settings.php settings.php \
X Translation2_example.php Translation2_example.sql \
X Translation2_gettext_example.php
X_EXAMPLESDIR= docs/examples
X
XLATEST_LINK= pear-Translation2
XOPTIONS= PEAR_CACHE_LITE "PEAR::Cache_Lite support" off \
X PEAR_DB "PEAR::DB support" off \
X PEAR_DB_DATAOBJECT "PEAR::DB_DataObject support" off \
X PEAR_MDB "PEAR::MDB support" off \
X PEAR_MDB2 "PEAR::MDB2 support" off \
X PEAR_FILE_GETTEXT "PEAR::File_Gettext support" off \
X PEAR_I18NV2 "PEAR::I18Nv2 support" off \
X PEAR_XML_SERIALIZER "PEAR::XML_Serializer support" off
X
Xpost-extract:
X ${MKDIR} ${WRKSRC}/Translation2
X ${MV} ${WRKSRC}/[A-D]* ${WRKSRC}/Translation2
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_PEAR_CACHE_LITE)
XBUILD_DEPENDS+= ${PEARDIR}/Cache/Lite.php:${PORTSDIR}/sysutils/pear-Cache_Lite
X.endif
X
X.if defined(WITH_PEAR_DB)
XBUILD_DEPENDS+= ${PEARDIR}/DB.php:${PORTSDIR}/databases/pear-DB
X.endif
X
X.if defined(WITH_PEAR_DB_DATAOBJECT)
XBUILD_DEPENDS+= ${PEARDIR}/DB/DataObject.php:${PORTSDIR}/databases/pear-DB_DataObject
X.endif
X
X.if defined(WITH_PEAR_MDB)
XBUILD_DEPENDS+= ${PEARDIR}/MDB.php:${PORTSDIR}/databases/pear-MDB
X.endif
X
X.if defined(WITH_PEAR_MDB2)
XBUILD_DEPENDS+= ${PEARDIR}/MDB2.php:${PORTSDIR}/databases/pear-MDB2
X.endif
X
X.if defined(WITH_PEAR_FILE_GETTEXT)
XBUILD_DEPENDS+= ${PEARDIR}/File/Gettext.php:${PORTSDIR}/sysutils/pear-File_Gettext
X.endif
X
X.if defined(WITH_PEAR_I18NV2)
XBUILD_DEPENDS+= ${PEARDIR}/File/I18Nv2.php:${PORTSDIR}/sysutils/pear-I18Nv2
X.endif
X
X.if defined(WITH_PEAR_XML_SERIALIZER)
XBUILD_DEPENDS+= ${PEARDIR}/XML/Serializer.php:${PORTSDIR}/devel/pear-XML_Serializer
X.endif
X
X.include "${PORTSDIR}/devel/pear-PEAR/Makefile.common"
X.include <bsd.port.post.mk>
END-of-pear-Translation2/Makefile
echo x - pear-Translation2/distinfo
sed 's/^X//' >pear-Translation2/distinfo << 'END-of-pear-Translation2/distinfo'
XMD5 (PEAR/Translation2-2.0.0beta4.tgz) = 349dc87b7cdd148b30a8e50848bbd2d7
XSIZE (PEAR/Translation2-2.0.0beta4.tgz) = 43116
END-of-pear-Translation2/distinfo
echo x - pear-Translation2/pkg-descr
sed 's/^X//' >pear-Translation2/pkg-descr << 'END-of-pear-Translation2/pkg-descr'
XThis class provides an easy way to retrieve all the strings for a multilingual
Xsite from a data source (i.e. db).
XThe following containers are provided, more will follow:
X- PEAR::DB
X- PEAR::MDB
X- PEAR::MDB2
X- gettext
X- XML
X- PEAR::DB_DataObject (experimental)
XIt is designed to reduce the number of queries to the db, caching the results
Xwhen possible. An Admin class is provided to easily manage translations
X(add/remove a language, add/remove a string).
X
XCurrently, the following decorators are provided:
X- CacheLiteFunction (for file-based caching)
X- CacheMemory (for memory-based caching)
X- DefaultText (to replace empty strings with their keys)
X- Iconv (to switch from/to different encodings)
X- Lang (resort to fallback languages for empty strings)
X- SpecialChars (replace html entities with their hex codes)
X- UTF-8 (to convert UTF-8 strings to ISO-8859-1)
X
XWWW: http://pear.php.net/package/Translation2/
END-of-pear-Translation2/pkg-descr
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list