question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`lingui extract` command prints possibly misleading messages

See original GitHub issue

Is your feature request related to a problem? Please describe. Not really a problem, more like a UX issue.

After lingui extract command finishes there is a message which is likely to be irrelevant due to user’s different script configuration. The message is:

(use "npm run extract" to update catalogs with new messages)
(use "npm run compile" to compile catalogs for production)

Describe proposed solution Print a message without assuming that there are user-defined npm scripts at all:

(run "lingui extract" command to update catalogs with new messages)
(run "lingui compile" command to compile catalogs for production)

# OR

(use "npx lingui extract" to update catalogs with new messages)
(use "npx lingui compile" to compile catalogs for production)

And, if Yarn is used then it should be use "yarn lingui ... appropriately. This is being detected already.

Describe alternatives you’ve considered Not printing this block at all

Additional context I have a project with junior developers and such messages can be misleading to them. Now I have to document this so they know that in our setup these two operations use different script names.

Here is my scripts section

"scripts": {
  "locales:extract": "lingui extract",
  "locales:build": "lingui compile",
  "locales:dev": "onchange \"src/**/*.{ts,tsx}\" -- npm run locales:extract"
}

Update: proposed a solution with npx, added my scripts configuration which leads to irrelevant suggestions message

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
tricoder42commented, Sep 21, 2020

Yeah, exactly. Looking at your scripts there’s no way to make it work for everyone. Let’s keep it open for a while and think it through. Changing help texts isn’t a breaking change so we can do it anytime.

0reactions
tricoder42commented, Nov 5, 2020

That sounds awesome 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

lingui/js-lingui - Gitter
Hi all, I'm trying to get Lingui working in a new project again, but keep running into @lingui/macro: Cannot read property 'attributes' of...
Read more >
API Reference - CLI (@lingui/cli) — LinguiJS documentation
This command extracts messages from source files and creates a message catalog for each language using the following steps: Extract messages from all...
Read more >
Localizing JavaScript & React Apps with LinguiJS | Phrase
Extracting messages from JavaScript source code and placing them into translation files is done via the LinguiJS CLI; so is compiling those ...
Read more >
Untitled
Roeier haven rotterdam, Brody neuenschwander artwork, Ufc 182 results, Gl800 software. ... Motorola razr droid maxx, Quotes on the effect of music, Wkim-fm, ......
Read more >
DOCUMENT RESUME SD 129 065 Tense Marking-in Black ...
A Linguidtic and ... ant, spent many painstaking hours in extraction of data from ... a black population it is possible that the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found