You can contribute to DevToys app by:
- Report issues and bugs here.
- Submit feature requests here.
- Creating a pull request.
- Internationalization and localization:
- See instructions below.
- Make sure your machine is running on Windows 10 1903+.
- Make sure you have Visual Studio 2019 16.10+ or Visual Studio 2022 17.0+ installed.
- In Visual Studio Installer, install the required components by importing the vs2022.vsconfig or vs2019.vsconfig file.
- Run
init.ps1
in a PowerShell command prompt to restore all the dependencies. - Open
src/DevToys.sln
with Visual Studio and set Solution Platform to x64*. - Once opened, set
src/dev/DevToys.Startup/DevToys.Startup.wapproj
as startup project. - Now you should be able to build and run DevToys on your machine. If it fails, try to close the solution and reopen it again.
*If x64 doesn't work, use the architecture of your system
There are two possibilities offered:
- Go on DevToy's Crowdin project. Crowdin is a localization management platform that helps individuals to translate a project without having to be familiar with its repository.
- Log in or create an account. Join the DevToys project.
- Select the language of your choice in the list of existing supported language and let yourself guided by the website to translate the app.
- If you want to add a new language, please create a new discussion on Crowdin's website or on GitHub. We will be happy to add your language to the list.
- When your translation is done, it will be synchronized with our GitHub repository within 1 hour and create a pull request.
This approach is more complex but has the advantage that it allows you to test your changes on your local machine.
- After following
How to Build and Run DevToys from source
, close Visual Studio, if any instance is running. - In File Explorer, copy the folder
dev/impl/DevToys/Strings/en-US
and rename the copied folder with the language indication of your choice. For example, "fr-FR" for French (France). - Open
src/DevToys.sln
with Visual Studio. - Open each
.resw
file from the language folder you created and translate the text. - Build and Run the app and test your changes.
DevToys is using MEF as a dependency injection framework. Every tool available (i.e Base64 Encoder/Decoder, JSON Formatter, Settings...) are dynamically discovered and instantiated through MEF. A tool is divided in 3 components:
- IToolProvider and its metadata, which represents the tool as displayed in the main menu in the app.
IToolProvider
should be MEF exported. - IToolViewModel, which is a ViewModel as described by the MVVM pattern in UWP. It doesn't have to be MEF exported but may be required depending on what the tool needs to work.
- A
Page
that represents the view of the tool.
The tool provider is instantiated when the app starts. The view and view models are instantiated when the user selects the tool in the main menu.
Several attributes can be used when implementing an IToolProvider
. They can be used in customize the behavior of the tool in DevToys without needing to implement a special logic for it.
You can find the attributes here. Here is a non-exhaustive list of attribute to use:
- CompactOverlaySizeAttribute
- NameAttribute
- NotScrollableAttribute
- OrderAttribute
- ProtocolNameAttribute
Icons in the UI of a tool or in the main UI of DevToys uses Fluent System Icons. For the icons of the tools, a custom font is used. See documentation here for modifying it (or ask us for help!).
A good tool to take an example on is Json <> Yaml
converter.
We try to avoid at maximum any UWP capability/permission like internet
, camera
, location
...etc. The reason why is that this app is designed to be a tool that we can trust when pasting sensitive data inside.
Therefore, when making changes to DevToys, please try at maximum to avoid any capability requirement.
- DO use
PascalCase
:
- class names
- method names
- const names
- DO use
camelCase
:
- method arguments
- local variables
- private fields
-
DO NOT use Hungarian notation.
-
DO NOT use underscores, hyphens, or any other non-alphanumeric characters.
-
DO NOT use Caps for any names.
-
DO use predefined type names like
int
,string
etc. instead ofInt32
,String
. -
DO use
_
prefix for private field names. -
DO use the
I
prefix for Interface names. -
DO vertically align curly brackets.
-
DO NOT use
Enum
orFlag(s)
suffix for Enum names. -
DO use prefix
Is
,Has
,Have
,Any
,Can
or similar keywords for Boolean names. -
DO use curly brackets for single line
if
,for
andforeach
statements. -
DO use nullable reference type by adding
#nullable enable
at the top of every C# file.