Skip to content

Contributing

Miepee edited this page Nov 12, 2022 · 3 revisions

Translations

You're free to help translate the AM2RLauncher into more languages!

In-Program Text

The In-Program text to translate can be found here: https://github.com/AM2R-Community-Developers/AM2RLauncher/tree/main/AM2RLauncher/AM2RLauncher/Language The .resx files are .xml files. You can edit them by hand, but it's recommended to use an IDE (Visual Studio or JetBrains Rider). You can use the Text.resx as a base. Naming scheme needs to be Text.<LANGUAGE-TWO-LETTER-SHORTCODE>.resx for non-english languages (with some special exceptions for more exotic langauges). In case you edit the file manually, the text that should be edited is the one between <value> and </value>. To test your changes in the launcher, you need to compile the launcher yourself. See the compiling instructions below for more info

Out-of-Program Text

There are currently two out-of program files, both used for Linux metadata:

Appstream

The Appstream file contains metadata for Linux app stores. To add your own language, you can choose either the description, summary (or in rare cases, screenshot) tag and add in xml:lang="[two-letter-shortcode]". Like this: <summary xml:lang="de">Hallo Welt</summary> Note that the description tag should not get translated directly, instead translate the individual paragraphs within there! So something along the lines of

<description> 
<p>
Cool paragraph
</p> 
<p xml:lang="de">
Toller Paragraph
</p>
</description>

The file is an XML file and while some attributes are similar to HTML, not all HTML tags work there! You can't test the changes yourself out before publishing. (TODO: It may be possible to test changes with a linter, but haven't tested that yet).
For more information regarding AppStream, check out the documentation here: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html

XDG-Desktop file

The XDG-Desktop file contains information on how Start / Desktop Menus should display programs. You only need to translate Comment, but you can also translate Name should AM2RLauncher not be fit for your language. You translate a tag, by adding [<two-letter-shortcode>] between the attribute you want to add, and the =. For example Comment[de]=Kommentar für ein Program. You can test the changes out, by spinning up a Linux machine (VM works), putting the .desktop file into /home/<your user name>/.local/share/applications, change your system language to the one you want to test out, and open up your system's start menu.
For more information regarding XDG desktop files, check out the documentation here: https://specifications.freedesktop.org/menu-spec/menu-spec-latest.htm

How do I compile AM2RLauncher from source?

Have the following dependencies installed:

  • Windows: .NET Framework 4.8 SDK
  • Linux/Mac: .NET Core 6.0 SDK or later

After that:

  • Windows: Open the solution with at least Visual Studio 2019 or use the buildall.bat file
  • Linux: Navigate to inside the AM2RLauncher folder and execute dotnet publish AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -c release -r ubuntu.18.04-x64 --no-self-contained -o LinuxBuild
  • Mac: Use Visual Studio for Mac, which will likely crash after compilation. ALternatively navigate to inside the AM2RLauncher folder and execute dotnet publish AM2RLauncher.Mac -c release. The .app file will be found in AM2RLauncher.Mac/bin/release/[framework]/
    Note that Mac is currently for testing purposes only.
Clone this wiki locally