OrchardCoreContrib / OrchardCoreContrib.PoExtractor

Extracts localizable strings from .cs, .vb, .cshtml and .liquid files into POT files
MIT License
48 stars 35 forks source link

feat(PoExtractor): add single file output #94

Closed VincenzoCarlino closed 2 months ago

VincenzoCarlino commented 4 months ago

Implementation of: #93

VincenzoCarlino commented 4 months ago

It would be nice to have few unit tests, there're many corner cases that we need to test, to ensure nothing is broken

Look at this commit

It's a preview of some kinds of test we can do. All code is inside the main static function, so we can test it as I've done it in this commit, or we try to extract the code from main in something more testable. Let me know if you like it.

hishamco commented 4 months ago

Thanks, @VincenzoCarlino, we might need to test more cases such as if there's a PO file with the same specified file

VincenzoCarlino commented 4 months ago

Thanks, @VincenzoCarlino, we might need to test more cases such as if there's a PO file with the same specified file

Yes @hishamco , this is just an example of the structure of tests. Tomorrow I'll add more tests.

hishamco commented 4 months ago

Please fix the build

VincenzoCarlino commented 4 months ago

Hi @hishamco , I think that we don't have an easy way to test output files... using the real filesystem in the pipeline is not a good option. Do you have any suggestions?

hishamco commented 4 months ago

Let me try ..

VincenzoCarlino commented 4 months ago

Ok @hishamco I'll wait for your commit, let me know if I can do something.

hishamco commented 3 months ago

Sorry for the late, I will struggle to have a look today because we need to finalize this and publish a release before Orchard Core 2.0.0

VincenzoCarlino commented 2 months ago

Sorry for the late, I will struggle to have a look today because we need to finalize this and publish a release before Orchard Core 2.0.0

Hello, any update? Thanks @hishamco

hishamco commented 2 months ago

Seems I forgot this one, let me check it tonight if it's possible. My plan to publish a release ASAP and will be a part of OC 2.0.0

hishamco commented 2 months ago

I suggest trying this PR from Program.cs then we can focus on make the CLI commands testable

hishamco commented 2 months ago

@VincenzoCarlino please remove the changes in the test project, then I will merge, this not take so long to merge

hishamco commented 2 months ago

Thanks for your contribution @VincenzoCarlino