GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - phpbb/phpbb-translation-validator: A tool checking packages for compliance with the policies https://area51.phpbb.com/docs/dev/master/language/guidelines.html

BranchesTags
Open more actions menu

Latest commit

 

History

296 Commits
296 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src/Phpbb/TranslationValidator
src/Phpbb/TranslationValidator
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
composer.lock
composer.lock
 
 
license.txt
license.txt
 
 
phpunit.xml
phpunit.xml
 
 
translation.php
translation.php
 
 

Repository files navigation

phpBB Translation Validator

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

About

A tool checking packages for compliance with the policies https://area51.phpbb.com/docs/dev/master/language/guidelines.html

www.phpBB.com

Resources

Readme
GPL-2.0 license
Activity
Custom properties

Stars

10 stars

Watchers

16 watching

Forks

9 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.