Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

25 Commits

Repository files navigation

Robo Tasks

Latest Version on PackagistSoftware LicenseQuality ScoreTotal Downloads

Robo task to extract gettext values from files using gettext/gettext library

Created by Oscar Otero http://oscarotero.comoom@oscarotero.com (MIT License)

Install

Using composer:

composer require gettext/robo

usage example

Create a RoboFile.php with the following code:

require'vendor/autoload.php';
useRobo\Tasks;
class RoboFile extendsRobo\Tasks
{
useGettext\Robo\Gettext;
/** * Scan files to find new gettext values */publicfunctiongettext()
{
$this->taskGettext()
//Scan folders with php files
->scan('templates/', '/\.php$/')
->scan('other-files/', '/\.php$/')
//Save the domain1
->save('domain1', 'Locale/es/LC_MESSAGES/domain1.po')
->save('domain1', 'Locale/gl/LC_MESSAGES/domain1.po')
//Save the domain2
->save('domain2', 'Locale/es/LC_MESSAGES/domain1.po')
->save('domain2', 'Locale/gl/LC_MESSAGES/domain1.po')
->run();
}
}

Use robo to run the code:

robo gettext

Please see CHANGELOG for more information about recent changes.

The MIT License (MIT). Please see LICENSE for more information.

About

Robo task to extract gettext values from files

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages