Skip to content

Instantly share code, notes, and snippets.

View Producdevity's full-sized avatar
🎯
Focusing

Yassine Gherbi Producdevity

🎯
Focusing
View GitHub Profile
@kelleyvanevert
kelleyvanevert / README.md
Last active May 24, 2023 12:19
A little helper script that uses Babel to scan your React source code for untranslated content

A little helper script that uses Babel to scan your React source code for untranslated content

This script will analyze the translation coverage in your source code. It improves upon i18next-scanner here and there, and is custom-tailored to a use-case I have.

The key insight here is that parsing and scanning code with Babel is remarkably simple, and you can just build a small tool with it when the need arises. And there's a good chance this is an easier path than trying to get existing tooling to work for you!

It assumes you wrap all your content strings like such:

" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'