Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glob support #78

Open
benmonro opened this issue Jul 29, 2019 · 6 comments
Open

glob support #78

benmonro opened this issue Jul 29, 2019 · 6 comments

Comments

@benmonro
Copy link

would be nice if we could pass in a glob to the update script (or any of them that require the src dir).

for example:
ttag update i18n/*.po src/**/!(__tests__)/*.js to have it extract from every js file (not located in a __tests__ directory and then have it update every language.

is this already possible? couldn't find a way to have it exclude test files etc.

@AlexMost
Copy link
Member

AlexMost commented Jul 30, 2019

Hi @benmonro! Have not tried the exclude case. Agree that we should support it. Will try to investigate and report about the results here.

@oscar-b
Copy link

oscar-b commented Sep 3, 2019

This is something I ran into as well. Would want to extract strings into separate .po files, being able to exclude a directory would solve it perfectly!

@benmonro
Copy link
Author

benmonro commented Sep 3, 2019

@AlexMost any update on this?

@AlexMost
Copy link
Member

AlexMost commented Sep 4, 2019

Hi @benmonro and @oscar-b. Haven't chance to look at it, but will try to find some time for this on this week.

@oscar-b
Copy link

oscar-b commented Oct 17, 2019

@AlexMost Sorry to be a pita, but any progress? :)

@dimaqq
Copy link
Contributor

dimaqq commented Jul 17, 2020

Hi all, I wonder if anyone figured out a workaround...
I've been using ttag for over a year now in a nested project:

package.json
node_modules/
src/
src/Foo.js  // ← want to get translations from files like this
src/__scripts__/deploy/
src/__scripts__/deploy/package.json
src/__scripts__/deploy/src/index.js
src/__scripts__/deploy/node_modules/
src/__scripts__/deploy/node_modules/xmlbuilder/typings/index.d.ts  // ← now breaks `ttag update`

This set up used to work for a long while.
Recently, specifically ttag update got broken with a cryptic-ish error:

src/__scripts__/deploy/index.jsSyntaxError: /global-path-to/src/__scripts__/deploy/node_modules/xmlbuilder/typings/index.d.ts: `export =` is not supported by @babel/plugin-transform-typescript
Please consider using `export <value>;`.
   5 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
   6 |
>  7 | export = xmlbuilder;
     | ^^^^^^^^^^^^^^^^^^^^

Thus, I wonder, is there a way to tell tta-cli to ignore some submodule?

Also, if what I'm doing is clearly a bad idea, please tell why :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants