定制 civicrm/strings 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

civicrm/strings

Composer 安装命令:

composer require civicrm/strings

包简介

String extractor for CiviCRM

README 文档

README

civistrings is the string extractor for CiviCRM core and CiviCRM extensions. It scans PHP, Smarty, JS, and partial HTML files for references to the ts() function -- and generates a list of strings using gettext's POT file format.

Requirements

Download: Single Executable (PHAR)

civistrings is distributed in PHAR format, which is a portable executable file (for PHP). It should run on most Unix-like systems where PHP 5.3+ is installed.

Simply download civistrings and put it somewhere in the PATH, eg

sudo curl -LsS https://download.civicrm.org/civistrings/civistrings.phar -o /usr/local/bin/civistrings
sudo chmod +x /usr/local/bin/civistrings

To upgrade an existing installation, re-download the latest civistrings.phar.

Download: Git + Composer

To download the source tree and all dependencies, use git and composer, e.g.

git clone git://github.com/civicrm/civistrings.git
cd civistrings
composer install

The main executable is bin/civistrings. You may execute that file directly, or add the bin/ folder to PATH, e.g.

export PATH=/home/myuser/civistrings/bin:$PATH

Usage

## Scan all recognizable files under "myfolder/"
civistrings -o myfile.pot myfolder

## Scan all *.js files
find -name '*.js' | civistrings - -o myfile.pot

Development

For a full set of development and testing activities, you will need:

TIP: If you use nix-shell, it will provide php, git, composer, box, phpunit8, and phpunit9.

Testing

Tests are based on a series of example files (e.g. ./examples/ex1.php and the corresponding ./examples/ex1.pot).

To run the tests, simply call your favorite instance of phpunit.

Build

To build a new copy of civistrings.phar from source, install git, composer, and box and run:

git clone git://github.com/civicrm/civistrings.git
cd civistrings
composer install
php -dphar.readonly=0 `which box` build

统计信息

  • 总下载量: 630
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 22
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2
  • 更新时间: 2015-02-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固