diff options
author | edwin <edwin@FreeBSD.org> | 2004-12-22 06:28:29 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-12-22 06:28:29 +0800 |
commit | e59b9116130b70ac59b283e6a8fa663e8fd0af0a (patch) | |
tree | c24089300c3250492643da7fc26d785fc9034913 /sysutils | |
parent | b309733b194e82e38dd8c52b8d369065af3aee73 (diff) | |
download | freebsd-ports-gnome-e59b9116130b70ac59b283e6a8fa663e8fd0af0a.tar.gz freebsd-ports-gnome-e59b9116130b70ac59b283e6a8fa663e8fd0af0a.tar.zst freebsd-ports-gnome-e59b9116130b70ac59b283e6a8fa663e8fd0af0a.zip |
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)
PR: ports/75303
Submitted by: Antônio Carlos Venâncio Júnior <antonio@php.net>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/pear-Translation2/Makefile | 96 | ||||
-rw-r--r-- | sysutils/pear-Translation2/distinfo | 2 | ||||
-rw-r--r-- | sysutils/pear-Translation2/pkg-descr | 23 |
4 files changed, 122 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 264dccad9815..bc76433cd0b9 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -317,6 +317,7 @@ SUBDIR += pear-File_Gettext SUBDIR += pear-I18Nv2 SUBDIR += pear-Log + SUBDIR += pear-Translation2 SUBDIR += pecl-fileinfo SUBDIR += penv SUBDIR += perf diff --git a/sysutils/pear-Translation2/Makefile b/sysutils/pear-Translation2/Makefile new file mode 100644 index 000000000000..14eec2007f09 --- /dev/null +++ b/sysutils/pear-Translation2/Makefile @@ -0,0 +1,96 @@ +# Ports collection makefile for: pear-Translation2 +# Date created: 20 December 2004 +# Whom: Antonio Carlos Venancio Junior (<antonio@inf.ufsc.br>) +# +# $FreeBSD$ +# + +PORTNAME= Translation2 +PORTVERSION= 2.0.0 +CATEGORIES= sysutils devel pear +DISTNAME= ${PORTNAME}-${PORTVERSION}beta4 + +MAINTAINER= antonio@php.net +COMMENT= PEAR class for multilingual applications management + +BUILD_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR +RUN_DEPENDS= ${BUILD_DEPENDS} + +USE_PHP= yes + +FILES= Translation2.php Translation2/Admin.php Translation2/Container.php \ + Translation2/Decorator.php Translation2/Admin/Decorator.php \ + Translation2/Admin/Container/dataobjectsimple.php \ + Translation2/Admin/Container/db.php \ + Translation2/Admin/Container/gettext.php \ + Translation2/Admin/Container/mdb.php \ + Translation2/Admin/Container/mdb2.php \ + Translation2/Admin/Container/xml.php \ + Translation2/Admin/Decorator/Autoadd.php \ + Translation2/Container/dataobjectsimple.php \ + Translation2/Container/db.php Translation2/Container/gettext.php \ + Translation2/Container/mdb.php Translation2/Container/mdb2.php \ + Translation2/Container/xml.php \ + Translation2/Decorator/CacheLiteFunction.php \ + Translation2/Decorator/CacheMemory.php \ + Translation2/Decorator/DefaultText.php \ + Translation2/Decorator/Iconv.php Translation2/Decorator/Lang.php \ + Translation2/Decorator/SpecialChars.php \ + Translation2/Decorator/UTF8.php +DOCS= gettext_readme.txt +EXAMPLES= gettext_admin.php gettext_domains.ini gettext_langs.ini \ + gettext_prepare.php gettext_settings.php settings.php \ + Translation2_example.php Translation2_example.sql \ + Translation2_gettext_example.php +_EXAMPLESDIR= docs/examples + +LATEST_LINK= pear-Translation2 +OPTIONS= PEAR_CACHE_LITE "PEAR::Cache_Lite support" off \ + PEAR_DB "PEAR::DB support" off \ + PEAR_DB_DATAOBJECT "PEAR::DB_DataObject support" off \ + PEAR_MDB "PEAR::MDB support" off \ + PEAR_MDB2 "PEAR::MDB2 support" off \ + PEAR_FILE_GETTEXT "PEAR::File_Gettext support" off \ + PEAR_I18NV2 "PEAR::I18Nv2 support" off \ + PEAR_XML_SERIALIZER "PEAR::XML_Serializer support" off + +.include <bsd.port.pre.mk> + +post-extract: + ${MKDIR} ${WRKSRC}/Translation2 + ${MV} ${WRKSRC}/[A-D]* ${WRKSRC}/Translation2 + +.if defined(WITH_PEAR_CACHE_LITE) +BUILD_DEPENDS+= ${PEARDIR}/Cache/Lite.php:${PORTSDIR}/sysutils/pear-Cache_Lite +.endif + +.if defined(WITH_PEAR_DB) +BUILD_DEPENDS+= ${PEARDIR}/DB.php:${PORTSDIR}/databases/pear-DB +.endif + +.if defined(WITH_PEAR_DB_DATAOBJECT) +BUILD_DEPENDS+= ${PEARDIR}/DB/DataObject.php:${PORTSDIR}/databases/pear-DB_DataObject +.endif + +.if defined(WITH_PEAR_MDB) +BUILD_DEPENDS+= ${PEARDIR}/MDB.php:${PORTSDIR}/databases/pear-MDB +.endif + +.if defined(WITH_PEAR_MDB2) +BUILD_DEPENDS+= ${PEARDIR}/MDB2.php:${PORTSDIR}/databases/pear-MDB2 +.endif + +.if defined(WITH_PEAR_FILE_GETTEXT) +BUILD_DEPENDS+= ${PEARDIR}/File/Gettext.php:${PORTSDIR}/sysutils/pear-File_Gettext +.endif + +.if defined(WITH_PEAR_I18NV2) +BUILD_DEPENDS+= ${PEARDIR}/File/I18Nv2.php:${PORTSDIR}/sysutils/pear-I18Nv2 +.endif + +.if defined(WITH_PEAR_XML_SERIALIZER) +BUILD_DEPENDS+= ${PEARDIR}/XML/Serializer.php:${PORTSDIR}/devel/pear-XML_Serializer +.endif + +.include "${PORTSDIR}/devel/pear-PEAR/Makefile.common" +.include <bsd.port.post.mk> diff --git a/sysutils/pear-Translation2/distinfo b/sysutils/pear-Translation2/distinfo new file mode 100644 index 000000000000..f0aeef75e2f2 --- /dev/null +++ b/sysutils/pear-Translation2/distinfo @@ -0,0 +1,2 @@ +MD5 (PEAR/Translation2-2.0.0beta4.tgz) = 349dc87b7cdd148b30a8e50848bbd2d7 +SIZE (PEAR/Translation2-2.0.0beta4.tgz) = 43116 diff --git a/sysutils/pear-Translation2/pkg-descr b/sysutils/pear-Translation2/pkg-descr new file mode 100644 index 000000000000..5b572820c836 --- /dev/null +++ b/sysutils/pear-Translation2/pkg-descr @@ -0,0 +1,23 @@ +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) + +WWW: http://pear.php.net/package/Translation2/ |