Simple .Net5 application for moving text literals to resource file.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
The project starts with the idea of helping to internationalize a Web application. All the hardcoded literals must be placed in a resource file, and all this work could be made easily by a tool.
In the context fo Visual Studio and .Net way of making this internatinalization process, this tool automatically extract text literals from cshtml files to a resource resx file. A Razor reference will be written in place, referencing the value on the resource file.
You can execute current release with Docker.
docker run --rm -v "$($PWD):/home" ghcr.io/ark667/resxtractor:master `
-s ../home/[relative_path_to_cshtmls] `
-t ../home/[relative_path_to_resx] `
You can also clone the repo and build it yourself.
-
Clone the repo
git clone https://github.com/Ark667/Resxtractor.git
-
Build application
dotnet build .\Resxtractor\Resxtractor.sln
-
Execute help option
.\Resxtractor\Resxtractor\bin\Debug\net5.0\Resxtractor.exe --help
Basic usage is pretty straightforward. Just call with required paths. By default the tool will create new files with modifications, use -r argument to make replacements.
.\Resxtractor.exe `
-s ../home/[relative_path_to_cshtmls] `
-t ../home/[relative_path_to_resx] `
Can also be executed from Docker container. First build the image.
docker build -f ".\Resxtractor\Resxtractor\Dockerfile" .
Then execute from container. The mapped volume will allow the command to access local files to make the extractions.
docker run --rm -v "$($PWD):/home" ghcr.io/ark667/resxtractor:master `
-s ../home/[relative_path_to_cshtmls] `
-t ../home/[relative_path_to_resx] `
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Feel free to use the code in this repository as it is under MIT license. See LICENSE.txt
for more information.
Aingeru Medrano - @AingeruBlack
Project Link: https://github.com/Ark667/Resxtractor