This is a tutorial for code contributions for the Pororoca project. Welcome!
Remember to fork this repo and develop your code starting from the develop
branch.
- Machine requirements
- I want to translate Pororoca to my language
- I want to make my own colour theme
- I want a custom keyboard shortcut
- I want a predefined or random variable
- Is there anything else I can contribute with?
The system requirements are the same as those for .NET 8. Development can be done on Linux, Windows and MacOS.
If you want to run makereleases.ps1
or rununittests.ps1
scripts, you will need PowerShell.
To generate the Windows Installer, you will need NSIS installed and with makensis
added to PATH.
Pororoca uses .resx
files for internationalization.
ResXResourceManager is a great tool for managing translations in .resx
files. In its bottom bar, tab Translate, you can automate translations by using popular APIs, like Google, Bing and MyMemory. But it is only available for Windows.
For other platforms, there are VSCode extensions that allow visualization of .resx
strings as tables. You can also use a text editor for them, as they follow a XML format.
-
In the Pororoca.Desktop.Localization.SourceGeneration project, add your language to the enum and extensions.
-
In the Pororoca.Desktop project, create a new resx file with your language strings, inside the Localization folder, and reference in AdditionalFiles inside
Pororoca.Desktop.csproj
. -
Insert a new key in the
strings.resx
file, of your language name, like:"TopMenuLanguage/YourLanguage",
. The other language files will need a translation for this key. -
Edit
MainWindow.xaml
andMainWindowViewModel.cs
to add your language to the top menu. -
(OPTIONAL) Add a README for your language.
-
(OPTIONAL) Add your language to the Windows installer:
src/Pororoca.Desktop.WindowsInstaller/Installer.nsi
. -
If you want to translate the documentation to your language, open an issue on GitHub and I will concede access to the documentation website repo.
-
Done!
-
Create a new theme in the
Styles\Accents
folder. If your theme is dark-based, start your new theme copying from theAmazonianNight.xaml
theme. If it is light-based, copy from thePampa.xaml
theme. Light-based themes require a few more colour definitions than dark-based themes. -
Add your theme in the
Styles\Themes.xaml
andPororocaThemeManager.cs
files. The PororocaThemeManager also controls the text editor theme and Pororoca variable highlight colour for your theme. -
Insert a key and translations for your theme name in the Localization files. The necessary key will be:
"TopMenuTheme/YourThemeName"
. -
Edit
MainWindow.xaml
andMainWindowViewModel.cs
to add your theme to the top menu. -
Done!
-
If the keyboard shortcut is related to the collection tree (left-side panel), then the keybinding needs to be registered in
CollectionsGroupView.xaml
. If it is related to the main window, then the keybinding resides in theMainWindow.xaml
file. -
Add a ViewModel command and logic for your keyboard shortcut in the
KeyboardShortcuts.cs
file.
Edit the PororocaPredefinedVariableEvaluator.cs
file to add your variable key and logic.
Yes! Check the GitHub issues track.