Toolbelt.Blazor.I18nText icon indicating copy to clipboard operation
Toolbelt.Blazor.I18nText copied to clipboard

Reducing the number of required files

Open endeffects opened this issue 6 years ago • 6 comments
trafficstars

Hi, is there any chance to reduce the number of required / generated files to use your extension? It would be nice to have the translation sources only.

endeffects avatar Jul 16 '19 13:07 endeffects

Could you tell me more detail about what do you want?

Do you already have specific ideas?

jsakamoto avatar Jul 16 '19 13:07 jsakamoto

Well, i've noticed that blazor itself creates precompiled *.razor.g.cs files in the folder obj\Debug\netstandard2.0\Razor\

So maybe this could be something to replace the IntelliSense files.

The next step could be to have the json files in the wwwroot only and get rid of the csv support. So there is only one source of truth.

Losing the csv support is a drawback for sure, but there are probably other options to convert them.

This is just an idea to get a more cleaner solution.

endeffects avatar Jul 16 '19 15:07 endeffects

Well, i've noticed that blazor itself creates precompiled *.razor.g.cs files in the folder obj\Debug\netstandard2.0\Razor
So maybe this could be something to replace the IntelliSense files.

Thank you for your suggest to good point!

I understand what you want to say, however, I have no skill to implement the same way of Razor Compiler.
I have to learn more about how to implement using obj folder, or I expect someone implement it and send me to pull request.

The next step could be to have the json files in the wwwroot only and get rid of the csv support. So there is only one source of truth.

I agree that this idea is one of the choice.

In my opinion and my experience, csv support has very important impact to translator's working.
Writing json file would be hard work for many people who are not IT engineer.

And this package resolve language fall-backing at compile time.
We should consider well how to resolve language fall-backing at run-time or compile-time, those pros/cons.

Conclusion

I'm sorry about I cant do anything at this time to realize your idea immediately, due to I have no enough skill to do it.

However, I keep in my mind this issue, and in future days, I wan to hide Typed Text Table class file into obj folder, at least.

I welcome to keep this discussion!

jsakamoto avatar Jul 17 '19 13:07 jsakamoto

Today, I succeeded that exclude "Localized Text Resource JSON" files from project content files on "Toolbelt.Blazor.I18nText" ver.5.

image

"Localized Text Resource JSON" files are generated in under the output folder, like the other output files such as .dll files from C# source codes.

"Typed Text Table class" files are still in the project at this time. I'll keep to try to resolve it.

Thank you for your nice proposal.

jsakamoto avatar Aug 18 '19 14:08 jsakamoto

Sounds great 🤗👍

endeffects avatar Aug 18 '19 15:08 endeffects

@endeffects Wow, 3 years passed! 😱

Anyway, I've finally made "Typed Text Table class" files be invisible from project folders by using the "C# Source Generator" feature. 🎉

image

I recommend trying to use the latest version of "Blazor I18n Text" if you are interested in it.

https://twitter.com/jsakamoto/status/1508184594809466881

jsakamoto avatar Mar 29 '22 00:03 jsakamoto