Skip to content

Latest commit

 

History

History
58 lines (49 loc) · 3.17 KB

CONTRIBUTING.md

File metadata and controls

58 lines (49 loc) · 3.17 KB

Contributing to MediaTester

First off, thanks for taking the time to contribute!

The following is a set of guidelines for contributing to MediaTester.

Table Of Contents

How Can I Contribute?

How Can I Contribute?

Adding a Language Translation

If you would like to request or provide a language translation, first search the issues to see if there is an existing request. If you cannot find an issue related to the language you are interested in, go ahead and create a new issue.

Steps to add a New Language Translation to the Windows GUI Application

  1. Create a fork of the git repo then create a feature branch in your fork.
  2. Open the solution in Visual Studio 2019.
  3. Add a new language entry to Languages.cs. This makes it show up on the drop-down list.
  4. Update text on the Main form.
    1. Open the Main form by double-clicking Main.cs.
    2. Click on the top of the Main form then open the properties.
    3. Change the Language property from "(Default)" to the language you want to add.
      • Be sure to select only the language without the additional country designation in parentheses.
    4. Make a single change to a label then save to verify a new "Main.??.resx" file is created.
      • Any changes made to the form apply to the active language only.
    5. Copy the default values
      • Open Main.resx
      • Sort by name then select all rows that do not start with ">>"
      • Copy with Ctrl-c
      • Open the new Main.??.resx (Expand Main.cs)
      • Delete any rows that were added automatically (ignore any errors about modifying)
      • Select the first row (String1) then paste with Ctrl-v
      • Change all the default values to the new translated values.
    6. You may edit text in the designer view or the Main.??.resx grid view.
      • You may adjust sizes of text containers if necessary but try to choose translations that fit in the same size space if possible to prevent layout complications later.
      • Make sure all text is translated, including tooltip values.
  5. Update text values used in code.
    1. Add a new Language resource file.
      • Right-click the MediaTesterGui project > Add > New Item... > Resource File
      • Name the file Strings.??.resx, where ?? is the two character ISO 639-1 code for the language. Use the same code from the file generated by the Main form.
      • Click: Add
    2. Copy the default strings
      • Open Strings.resx
      • Sort by name then select all rows by pressing Ctrl-a
      • Copy with Ctrl-c
      • Open the new Strings.??.resx
      • Select the first row (String1) then paste with Ctrl-v
    3. Edit the string values for the new language then save.
      • Do not change any variable names contained in curly braces. i.e. {TotalBytesVerified}
      • Use Shift-Enter to add a line break.
  6. Be sure to test your changes to ensure the new language looks good and makes sense in context then submit a pull request!
    • Do not commit changes that VS makes to Main.Dessigner.cs or Main.resx - Changes to these files for a new language are benign and make merging messy.
    • Tag your language issue by including #?? in the PR description, where ?? is the issue number.