Skip to content

Contribute a Translation

Tim Kennedy edited this page Jul 1, 2024 · 18 revisions

Current Languages

Language Code Version Added
English en-US n/a
English en-GB 0.5.21
Spanish es-ES 0.5.21
Dutch nl-NL 0.5.22
Italian it-IT 0.5.22
Catalan ca-ES 0.5.23
French fr-FR 0.5.23
German de-DE 0.5.23
Polish pl-PL 0.5.24
Slovak sk-SK 0.5.25
Slovenian sl-SL 0.6.0
Portuguese (Brazil) pt-BR 0.6.1
Korean ko-KR 0.6.1

How to contribute

If you would like to contribute to the WUView translation effort your help would certainly be appreciated. 👏

If you have a question or feedback to share, I've enabled Discussions for this repository.

New procedures as of 2023/11/12

To make this a smoother process for everyone involved, it has become necessary to create new procedures.

  • Each new translation contribution or language file update must be associated with a pull request or a new translation issue.
  • Only one language file per PR or issue.
  • Before submitting a new translation or an updated language file, the file must be checked using the new Check Language File tool found here.
  • Updates to a language file will no longer be added to the bottom of the file. Instead, they will be done in place and comments will be added to the bottom of the language file. Adding updates to the bottom was leading to too many duplicate keys.
  • These comments will have a header record that will note when the change was made.
  • Changes to the language file will be noted in the comments. One comment per change.

Pull Requests

PRs are welcome for adding a new language or for making updates to an existing one. Now that I'm more comfortable working with PRs, they are the preferred way to add or update a language. However, if you aren't comfortable with using a pull request, I'm happy to work with you to find a way that we are both comfortable with.


Do's and Don'ts

  • Do use the Languages/Strings.en-US.xaml file as a starting point. This file will be up to date with the latest changes. Look to the upper right, there is a button labeled Raw. Immediately to the right there are buttons to copy or download the file.

  • Do update the strings between the tags. For example, in the following, Version would be updated to the appropriate word or phrase.

<sys:String x:Key="About_Version">Version</sys:String>
  • Don't change the opening or closing tags.
<sys:String x:Key="About_Example"> and </sys:String>
  • Don't change the value of the key.
x:Key="About_Example"
  • Please don't sort, minify, or prettify the file or change the layout in any way.

File layout

The file is arranged in sections. Strings are grouped together based on how or where in the application they are used. The key will provide a hint as to how the word or phrase is used.


Interpolated strings

When you see a digit in curly braces, (e.g., {0}), that string will be interpolated at runtime, replacing the {0} with an appropriate value. The value can be a string or a number. For example, "Displaying {0} of {1} updates" might be displayed as "Displaying 23 of 142 updates". In addition to checking the translation, also check that the placement of the {0} makes sense in the translated language.


Editor

If you use an editor that can display the file in XML format, such as Notepad++, Visual Studio or VS Code, it will be easier to visualize the file and see what needs to be updated.


Provide the Language Name

  • Specify the name of the language, as it should appear in the language drop-down on the settings page. This should be the local spelling of the language name.
  • The language name in English.
  • The language code. For example, (en-US)

Put this information after Language name here: in the comments section at the top of the language file.


Acknowledgement

If you wish to be acknowledged, specify your GitHub user ID, or another way you wish to be identified. The acknowledgement will appear on the About page.


File Name

When translation is complete, save the file as Strings.xx-XX.xaml where xx-XX is the language code. Until a better method comes along, open a new Translation Issue, fill out the form and attach the file. Or, open a pull request if you are comfortable with that method.


Thank You! ❤️