Please support language source file type of js
See original GitHub issueIs your feature related to a specific framework or general for this extension
i18next
Is your feature request related to a problem? Please describe.
I use i18next and use js file as language source file not json.
The directory structure is below.
**/foo/bar/ ├── locales ├── foo.en.js ├── foo.ja.js
- By the way, I can’t show all overview because it is private source.
The content of souce file named foo.{locale}.js
like below.
const locales = {
title: {
content: "foo"
},
body: {
hoo: "bar"
},
.
.
.
(ommited)
.
.
.
};
export default locales;
So, the content of tsx file like below.
...(ommited)...
return (
{ i18next.t('title.content') }
{ i18next.t('body.hoo') }
);
...
Finally, { i18next.t('title.content') }
supposed to show foo
and { i18next.t('body.hoo') }
supposed to show bar
.
But i18n-Ally extension said “there are no translations”.
Describe the solution you’d like So please correspond source language file of js like this.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Please support language source file type of js #403 - GitHub
I use i18next and use js file as language source file not json. The directory structure is below. **/foo/bar/ ├── locales ├── foo.en.js...
Read more >File.type - Web APIs - MDN Web Docs
Returns the media type (MIME) of the file represented by a File object.
Read more >How to make VS Code treat a file extensions as a certain ...
You can use Ctrl + Shift + P (or View -> Command Palette from the menu) and then type settings JSON . Choose...
Read more >File type associations | IntelliJ IDEA Documentation - JetBrains
Configure the IDE to recognize different file types and open files of certain types in IntelliJ IDEA by default.
Read more >Visual Studio Code Display Language (Locale)
If the matching Language Pack is not installed, VS Code will display English. Common questions. Unable to write to file because the file...
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
Did you try with this?
Wow, it works! But… My project also contains rails and its parser is yml. I tried to modify
settings.json
of VSCode like below.After this, although appears sidebar, but i18n-ally said “does not exist” in both yml and js.
By the way, the directory structure of yml file and content like below.
In ruby file,
ja
is omitted in my project.Also, if both yaml and js is enabled, keypath copying is not working well