Git Product home page Git Product logo

civistrings's People

Contributors

bjendres avatar demeritcowboy avatar joshuakissoon avatar mlutfy avatar seamuslee001 avatar totten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

civistrings's Issues

strings from mgd files that are enclosed in {ts}

civistrings does not seem to find translations strings in my .mgd.php file that are enclosed in {ts}{/ts}.

I think I'm using best practices but also this feels a bit like a corner case.

In short, I have a mgd.php file that includes a message template. So, I suspect civistrings thinks it's a php file so looks for ts(). But, since I have message template code, I need it to also find '{ts}{/ts}'.

Should civistrings be patched to handle this situation or is there a different work around I should be using?

php parser doesn't handle newer php syntax for lists

For example it will fail on uk.co.compucorp.civicase for things like this:

list(
      'query' => $roleQuery,
      'where' => $roleWhere
    ) = self::getRoleQuery([
      'can_be_client' => TRUE,
      'all_case_roles_selected' => TRUE,
      'contact' => $params['contact_involved'],
    ]);

Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ')' on line 99

And also just using [] instead of list such as this:

[$entityName, $action, $params] = $entity;

FYI @mlutfy this is why it failed during the presentation today.

Perhaps the parser just needs to be updated to the latest version?

Failed to find autoloader

The code seems to make assumptions on where to find "autoload.php". Any recommendations on where typically civistrings should be installed vs autoload.php?

I typically install my tools in ~/lib/ and symlink them to ~/bin/, so I have ~/bin/civistrings -> ~/lib/civistrings/bin/civistrings. My CiviCRM codebase is in temporary directories because I am testing the build-unified-pots for multi-version string extraction.

Thanks

Getting traceback from php-parser - possibly php8.1 issue

When I run civistrings on a file that has a function that accepts a value by reference (&$var) I get this error:

Error: Warning: Undefined array key 403 in /home/jamie/projects/ptp/repos/civistrings/vendor/nikic/php-p  arser/lib/PhpParser/Lexer.php on line 329
  PHP Fatal error:  Uncaught TypeError: PhpParser\Lexer::getNextToken(): Return value must be of type int,   null returned in /home/jamie/projects/ptp/repos/civistrings/vendor/nikic/php-parser/lib/PhpParser/Lexer  .php:369

I experimentally bumped the version of php-parser from 4.10.2 to the latest 4.13.2 and it resolved the issue.

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.