承接 phpbb/translation-validator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

phpbb/translation-validator

最新稳定版本:1.6.1

Composer 安装命令:

composer require phpbb/translation-validator

包简介

A language package validator for phpBB language packs. Language packs are required to pass the validator when submitted to the language pack database.

README 文档

README

With the help of this command line application you are able to validate phpBB language packs. This application runs on your local machine and can be integrated into a GitHub repository.

📋Requirements

This tool requires PHP 8.1 or above. In addition it needs several symfony and other packages, which need to be downloaded and installed with Composer.

🏗️ Installation

Clone this repository:

git clone https://github.com/phpbb/phpbb-translation-validator.git

Install the dependencies with Composer:

composer.phar install

Create a directory called 4.0 in the root of the Translation Validator. Afterwards download the British English language pack and put its content into 4.0/en/. Do the same with the languages you wish to test. Which leads e.g. to:

phpbb-translation-validator/4.0/en/
phpbb-translation-validator/4.0/de/
phpbb-translation-validator/4.0/fr/
phpbb-translation-validator/translation.php

⚗️ Validate language packs

The simplest way to validate this language packages, is to open a command line tool in the validator directory. Then run this command (the final argument is the language you wish to test and that has already been stored to the 4.0 directory; e.g. fr for French):

 php translation.php validate fr

There are more arguments that can be supplied. For example, suppose you wanted to have your 4.x directory in a different location, you wanted to explicitly specify phpBB version 4.x (default validation is against 4.0), you wanted to run in safe mode and you wanted to see all notices displayed - you would run this command:

 php translation.php validate fr 
    --package-dir=/path/to/your/4.0 
    --phpbb-version=4.0 
    --safe-mode 
    --display-notices

The --safe-mode flag indicates that you want to parse files instead of directly including them. This is useful if you want to run validations on a web server.

If you are missing the English language files for the official Viglink extension, they can be easily donwloaded using this command:

php translation.php download --files=phpbb-extensions/viglink --phpbb-version=4.0

🛠️ Integration to your Repository

In your project you can add phpBB Translation Validator as a dependency:

	{
		"require-dev": {
			"phpbb/translation-validator": "2.0.*"
		}
	}

Then add a php vendor/bin/translation.php call to your workflow.

We use GitHub Actions as a continuous integration server and phpunit for our unit testing.

🏠 Local phpunit execution

To run the unit tests locally, use this command:

 php vendor/phpunit/phpunit/phpunit tests/

🤖 Tests

GitHub Actions CI

🧑‍💻 Contributing

If you notice any problems with this application, please raise an issue at the Github-Repository.

To submit your own code contributions, please fork the project and submit a pull request at Github-Repository.

When a new version is released, the version number will be updated in composer.json and translation.php. A new tag will be created and the package will become available at Packagist.

📜 License

GNU General Public License v2

统计信息

  • 总下载量: 8.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 16
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2014-05-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固