Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update devGuide for translating symbols, gestures, character descriptions #17590

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions projectDocs/dev/developerGuide/developerGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ It is assumed that characters will have the same description regardless of their

#### Translating this file {#TranslatingCharacterDescriptionsFile}

Translation of `characterDescriptions.dic` happens on SVN following [the automatic workflow process](https://github.com/nvaccess/nvda/wiki/TranslatingUsingAutomaticProcess).
Translation of `characterDescriptions.dic` happens via [Pull Request to NVDA](https://github.com/nvaccess/nvda/blob/master/projectDocs/translating/github.md).

For a full example and reference, please look at [the English `characterDescriptions.dic` file](https://github.com/nvaccess/nvda/blob/master/source/locale/en/characterDescriptions.dic).

Expand All @@ -91,11 +91,6 @@ All locales implicitly inherit the symbol information for English, though any of

The file contains two sections, [complex symbols](#complexSymbols) and [symbols](#symbolInformation).

#### Translating this file {#TranslatingSymbolsFile}

Translation of `symbols.dic` happens on SVN following [the automatic workflow process](https://github.com/nvaccess/nvda/wiki/TranslatingUsingAutomaticProcess).
See the file [locale\en\symbols.dic](https://github.com/nvaccess/nvda/blob/master/source/locale/en/symbols.dic) for the English definitions which are inherited for all locales.

#### Defining Complex Symbols {#complexSymbols}

The first section is optional and defines regular expression patterns for complex symbols.
Expand Down Expand Up @@ -207,6 +202,12 @@ You would also include something like the following in the main symbols section:
thousands separator comma all norep
```

#### Translating this file {#TranslatingSymbolsFile}

Translation of `symbols.dic` happens via [Pull Request to NVDA](https://github.com/nvaccess/nvda/blob/master/projectDocs/translating/github.md).

See the file [locale\en\symbols.dic](https://github.com/nvaccess/nvda/blob/master/source/locale/en/symbols.dic) for the English definitions which are inherited for all locales.

### Gestures {#TranslatingGestures}

The gestures defined originally in NVDA are configured to expect English software and keyboard layout.
Expand Down Expand Up @@ -321,32 +322,26 @@ In this case, you will have to explore NVDA's source code to find this parent cl

#### Translating this file {#TranslatingGesturesFile}

Translations for `gestures.ini` happen on SVN following [the automatic workflow process](https://github.com/nvaccess/nvda/wiki/TranslatingUsingAutomaticProcess).
Translation of `gestures.ini` happens via [Pull Request to NVDA](https://github.com/nvaccess/nvda/blob/master/projectDocs/translating/github.md).

1. In your local copy of the screenReaderTranslations repository, check if the `gestures.ini` file exists, e.g. `d:\SVN\SRT\fr\gestures.ini`
* If this file does not exist, create it by copying it from the last version of NVDA.
* If it already exists, all is fine.
2. In this file the sections correspond to the class to which the script belongs.
1. In this file the sections correspond to the class to which the script belongs.
If the class your looking for does not exist, create this section.
3. Under the targeted section, add a line corresponding to the new shortcut. e.g.:
1. Under the targeted section, add a line corresponding to the new shortcut. e.g.:

```
toggleBold = kb:control+g, kb:control+shift+b
```

If a line already exists for the script name, but you want to modify the shortcut, add the new shortcut on the same line, separating each shortcut with a comma ("`,`").

4. If you want to unmap the original shortcut, just map it to `None`, e.g.:
1. If you want to unmap the original shortcut, just map it to `None`, e.g.:

```
None = kb:control+b
```

Unmapping the original shortcut is only required if this shortcut does not match any other remapped locale shortcut.

5. Save your file in UTF-8 format.
6. Commit your changes to the screenReaderTranslations repo.

## Plugins {#plugins}
### Overview {#pluginsOverview}

Expand Down
58 changes: 58 additions & 0 deletions projectDocs/translating/github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translating Symbols, Character Descriptions and Gestures on GitHub

## Background

This guide provides technical steps on how to translate symbols and character descriptions, and localize gestures via GitHub.

For detailed information on the format of these files, please refer to the following sections in the developer guide:

- `characterDescriptions.dic`: [Translating Character Descriptions](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#characterDescriptions)
- `symbols.dic`: [Translating Symbols](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#symbolPronunciation)
- `gestures.ini`: [Translating Gestures](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#TranslatingGestures)

To keep these files up to date, translators must be concious of changes in NVDA.
For changes to `symbols.dic` and `characterDescriptions.dic`, please subscribe to the read-only [nvda-l10n](https://groups.google.com/a/nvaccess.org/g/nvda-l10n) mailing list.
When changes to these files in English occur, you will be notified via this mailing list.
This allows you to consider adding equivalent descriptions to your localised file.

For changes to NVDA's input gestures, please refer to the [latest changes in NVDA](../../user_docs/en/changes.md).
New gestures will be announced there, and localisations can be added to `gestures.ini` if required.

## Process

1. Find the relevant file to edit in the GitHub directory
- Visit [source/locale](https://github.com/nvaccess/nvda/tree/beta/source/locale)
- Open the directory with your language code
- English example: <https://github.com/nvaccess/nvda/tree/beta/source/locale/en>
- Format (replace `{lang}`): `https://github.com/nvaccess/nvda/tree/beta/source/locale/{lang}`
- Find the relevant file:
- `symbols.dic`, `characterDescriptions.dic` or `gestures.ini`
- English example: <https://github.com/nvaccess/nvda/blob/beta/source/locale/en/symbols.dic>
- Format (replace `{lang}` and `{fileName}`): `https://github.com/nvaccess/nvda/blob/beta/source/locale/{lang}/{fileName}`
1. If the relevant file doesn't exist yet, create a new one.
- To create a new file use the "add file" button from your language's directory.
- English example: <https://github.com/nvaccess/nvda/new/beta/source/locale/en>
- Format (replace `{lang}`): `https://github.com/nvaccess/nvda/new/beta/source/locale/{lang}`
- `characterDescriptions.dic`: Copy and paste desired contents from the [English example](https://raw.githubusercontent.com/nvaccess/nvda/refs/heads/beta/source/locale/en/characterDescriptions.dic).
Note you should translate all the content you copy.
- `symbols.dic`: Copy and paste desired contents from the [English example](https://raw.githubusercontent.com/nvaccess/nvda/refs/heads/beta/source/locale/en/symbols.dic).
Note you should translate all the content you copy.
- `gestures.ini`: This file doesn't require a base file, gestures can be added as needed.
1. Edit the relevant file
- Tab to the "edit file" button to open the editor for the file.
- English example: <https://github.com/nvaccess/nvda/edit/beta/source/locale/en/symbols.dic>
- Format (replace `{lang}` and `{fileName}`): `https://github.com/nvaccess/nvda/edit/beta/source/locale/{lang}/{fileName}`
- Refer to [background](#background) for more information on the format of the files
1. Submit your changes
- Press the "commit changes" button.
- Update the commit message to add your language to the end: "Update filename for language"
- Press "Propose changes"
- A new window should open proposing your changes
- The proposal will contain a description with a large template.
Feel free to ignore or delete it.
- Press "Create pull request".
1. Await feedback from NV Access
- NV Access will provide feedback if any further work is required.
- You will receive a notification when your proposal is accepted - the request will be merged and closed.
- After merging, the changes will become available in [alpha builds](https://www.nvaccess.org/files/nvda/snapshots/) for testing.
The changes will also be made available in the next beta release.
7 changes: 4 additions & 3 deletions projectDocs/translating/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ There are several tasks to be done, and this document hopes to give you an overv

## Translation Mailing List

Translators should subscribe to the [NVDA translations mailing list](https://groups.io/g/nvda-translations) hosted at Groups.IO.
To monitor changes to symbols and character description files, translators should subscribe to the read-only [nvda-l10n](https://groups.google.com/a/nvaccess.org/g/nvda-l10n/about) mailing list.
Translators should subscribe to the [NVDA translations mailing list](https://groups.io/g/nvda-translations) for general conversations regarding translations.

It is an English low traffic list devoted to the discussion of translation.
Important messages that relate to translators will also be sent here, e.g. before official NVDA releases, to remind translators to make sure their localization is up to date.
Expand All @@ -29,8 +30,8 @@ Start by subscribing to the translation list above so that you can get help and

The current process for translation is split between multiple processes:

- Crowdin for the NVDA interface and user documentation
- Github for Character Descriptions, Symbols and Gestures.
- [Crowdin](./crowdin.md) for the NVDA interface and user documentation
- [Github](./github.md) for Character Descriptions, Symbols and Gestures.

Read [Files to be Localized](#files-to-be-localized) to learn the translation for process for these.

Expand Down