Git Product home page Git Product logo

robo's People

Contributors

epi-jrd avatar oscarotero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

robo's Issues

Twig Extractor Fails If Any Custom Extensions Used

Yeah, that's basically it. Because the Twig extractor can't be passed an instance of Twig to use, it always creates one with no extensions loaded, and then throws an error if it hits any custom extension items of any kind.

I tried to get around it by copying the task itself and changing it to fetch Twig from a container so I can hand it my Laravel container to get Twig out of, but that leads to a whole new set of problems; since the PHP reader tries to include any PHP file it finds before it reads it for the functions, forcing the container to load crashes that extractor with a "duplicate class" error, because it tries to load the class, even thought the container already loaded it...

Getting "Undefined index: messages" Exception in MultidimensionalArrayTrait.php: 78

I'm using gettext/gettext and gettext/robo for translating two different (but interconnected) pages. The first I'm only using it to translate the js-files with no problem. The second one, however, translates both php- and js-files and Robo keeps throwing this error multiple times (presumably when it finds a translatable string.
This doesn't seem to bother much though since the Robo script finishes the scanning and generates a valid pot-file in the end.

Here's the error that gets printed when Robo has finished scanning:

ERROR: Invalid argument supplied for foreach() in [...]/vendor/gettext/gettext/src/Utils/MultidimensionalArrayTrait.php:78

Robofile.php:

require "../vendor/autoload.php";

class RoboFile extends \Robo\Tasks
{
    use Gettext\Robo\GettextScanner;

    public function gettext()
    {
        $this->taskGettextScanner()
            ->extract("../", "/.*\.js/")
            ->extract("../", "/.*\.php/")
            ->generate("messages.pot")
            ->run();
    }
}

Running a debugger when Robo runs gives the error in the title.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.