Problems converting LocalizedStrings.d.ts
See original GitHub issueWe tried to create bindings for https://github.com/stefalda/react-localization/blob/master/lib/LocalizedStrings.d.ts
And get the following results:
Any idea what happened? Also we tried to fix the error by replacing JSX.Element
with React.ReactElement
and then other errors appear which look like F# syntax errors.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Typescript: .d.ts file not recognized
There might be two issues here: 1.) You need to augment Window interface in global scope. Either remove all import / export keywords...
Read more >No localization from Main.Storyboard (English)
The problem I am facing is that all texts, titles, labels to be translated automatically in the Storyboard are not. At the same...
Read more >Localize SharePoint Framework client-side web parts
Broaden the appeal of your web part by localizing it for different languages spoken by SharePoint users all over the world.
Read more >Changing the localized strings — Seminar Manager 3.3 ...
Changing the localized strings¶. You can change most of the localized strings that are used on the front end and for the e-mails....
Read more >Over the Air (Strings)
If using a distribution for iOS and Android, placeholders for the two formats are automatically converted. Fallbacks. If language fallbacks are set in...
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 Free
Top 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
I have been able to make the library work with Fable. The
react_localization.fs
can probably still need some clean up because I was just focus on getting thing working 😃.react_localization.fs
App.fs
Here is the result:
@matthid In general, when you are using Elmish in your application and want to use React libraries.
The recommanded way is to write the “special” bindings to keep the same DSL and use functional style. We don’t have yet a project to automate this process.
For example, in my app we need to use
react-leaflet
and the binding can be found hereAs you can see it have nothing to look with what ts2fable output.
In the case of
LocalizedStrings.d.ts
I don’t think it’s needed because it isn’t providing components for you to use.The
JSX.Element
case correspond to:And I don’t think, you will use this synthax in your project. I think you could remove the
JSX.Element
references in the generated binding.I think you can use the library to retrieve the string and directly use it in your views.
Pseudo code: