Extract messages from TypeScript files
See original GitHub issueIt would be really nice if the cli could extract messages from .tsx?
files as well.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Extracting $localize messages from typescript not working ...
I found a workaround: since only the extraction to xlf files doesn't work but the translation after build:prod is well effective even for...
Read more >gettext-extractor
A flexible and powerful Gettext message extractor with support for JavaScript, TypeScript and JSX. It works by running your files through a ...
Read more >Playground Example - Import Export
Let's look at importing code from a module. import { danger, message, warn, DangerDSLType } from "danger"; // This takes a set of...
Read more >Message Extraction | Format.JS
Now that you've declared some messages, it's time to extract them.
Read more >TypeScript Programming with Visual Studio Code
create new file. Now add the following TypeScript code. You'll notice the TypeScript keyword let and the string type declaration. let message: string ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! I finally refactored cli to support other preprocessors than babel. I created package
typescript-lingui-extract-messages
where I placed your script: https://github.com/lingui/js-lingui/blob/master/packages/typescript-lingui-extract-messages/src/index.tsHowever, I’m not able to compile it. Could you please send me configuration which you used to compile this file?
I took a quick stab at it. What I have is here, with both ts and js versions. All the fancy file handling is missing. Currently the
extract
function just expects a file name and returns a map of messages. This is all I have time for now. I might have some more time to look at it next week.