Skip to content

Commit

Permalink
Merge pull request #113 from tsevasa/main
Browse files Browse the repository at this point in the history
fixed spelling and style in docs
  • Loading branch information
Naviary2 authored Jul 20, 2024
2 parents 96daaa7 + 149f0aa commit a2ef442
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions docs/NAVIGATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ It has subfolders for all the EJS, CSS, JavaScript, sound and image files of the

[src/client/views](../src/client/views) contains all our EJS documents.

The routers that actually send these as htmls to the client are located in [src/server/routes/root.js](../src/server/routes/root.js).
The routers that actually send these as HTMLs to the client are located in [src/server/routes/root.js](../src/server/routes/root.js).

[src/client/scripts/game](../src/client/scripts/game/) contains all our javascipt code for running the game in the `/play` page in the user's browser.

Expand All @@ -39,13 +39,13 @@ The main script is [main.js](../src/client/scripts/game/main.js), which initiate

This repository uses [i18next](https://www.npmjs.com/package/i18next) to provide translations of the website into different languages.

[translation](../translation) contains a [TOML](https://toml.io/) file with translated text for each supported language - read more in the [translation guide](./TRANSLATIONS.md).
The [translation](../translation) directory contains a [TOML](https://toml.io/) file with translated text for each supported language - read more in the [translation guide](./TRANSLATIONS.md).

The EJS files in [src/client/views](../src/client/views) get converted into html files for each supported language during deployment to `dist`.
The EJS files in [src/client/views](../src/client/views) get converted into HTML files for each supported language during deployment to `dist`.

The translated text in each EJS file is directly inserted into the corresponding html file during deployment.
The translation text in each EJS file is directly inserted into the corresponding HTML file during deployment.

The translated text in each clientside javacript file is stored in the `translations` object, which is inserted directly below the head tag of each EJS file.
The translation text in each clientside javacript file is stored in the `translations` object, which is initiated directly below the `<head>` tag of each EJS file.


## Accounts ##
Expand Down
14 changes: 7 additions & 7 deletions docs/TRANSLATIONS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Translation guide #

This guide will walk you through the process of creating translations for [InfiniteChess.org](https://www.infinitechess.org). What it won't tell you is how to setup your workspace, please refer to [SETUP.md](./SETUP.md) for that. It is assumed that you have gone through it (you can ignore step 5).
This guide will walk you through the process of creating translations for [InfiniteChess.org](https://www.infinitechess.org). It is assumed you have already gone through the [Setup](./SETUP.md) process.

## Navigaton ##
## Navigation ##

Anything that matters to you as a translator should be located in the [translation](../translation/) directory. Translation files are stored in TOML format (you can read more about its syntax [here](https://toml.io/)). Generally, it is a very aproachable format, and you only need to understand the absolute basics of it, which are explained below.
Anything that matters to you as a translator is located in the [translation](../translation/) directory. Translation files are stored in TOML format (you can read more about its syntax [here](https://toml.io/)). Generally, it is a very aproachable format, and you only need to understand the absolute basics of it, which are explained below.

## Translation files ##

Expand All @@ -20,7 +20,7 @@ You should name your file this way and only this way, otherwise it won't be corr

### Content ###

Translation files in TOML format consist of keys and values, table headers and comments, like this:
Translation files in TOML format consist of keys, values, table headers and comments, like this:

```toml
[table-header]
Expand All @@ -34,12 +34,12 @@ key2 = "value2"
## Translation process ##

In case you are translating a language that is currently not present in the project, you can start the process by copying [en-US.toml](../translation/en-US.toml) and renaming it as described above. If you are updating an existing language, the only thing you need to do is to update the `version` variable on top of your TOML document to the value of the `version` variable in [en-US.toml](../translation/en-US.toml).
In case you are translating a language that is currently not present in the project, you can start the process by copying [en-US.toml](../translation/en-US.toml) and renaming it as described above. If you are updating an existing language, the only thing you need to do is to update the `version` variable at the top of your TOML document to the value of the `version` variable in [en-US.toml](../translation/en-US.toml).

> [!IMPORTANT]
> You should always use [en-US.toml](../translation/en-US.toml) as a reference. It is the only file that is up to date and comes straight from the developers. Do not use any other files!
Then you can start a test server with `npx nodemon` and start translating. If you head to your browser at address `https://localhost:3443` the website should be there and it should automatically update as you make your changes (after reloading the page). Make sure you have selected the language that you are editing in the website's UI. There is a footer with a language selection dropdown at the bottom of almost every page.
Then you can start a test server with `npx nodemon` and start translating. If you insert the address `https://localhost:3443` into your browser, the website should be there and it should automatically update as you make your changes (after reloading the page). Make sure that you have selected the language that you are editing in the website's UI. There is a footer with a language selection dropdown at the bottom of almost every page.

In case you are updating an existing language and you aren't sure what has changed since the last update, you can view changes of `en-US.toml` [here](https://github.com/Infinite-Chess/infinitechess.org/commits/main/translation/en-US.toml).

Expand All @@ -56,4 +56,4 @@ When you are finished, you should open a pull request as described in [SETUP.md]
## Conclusion ##
Thank you for your contribution! In case you have any troubles or questions, you can join [the discord](https://discord.gg/NFWFGZeNh5).
Thank you for your contribution! In case of any trouble or questions, you can join [the discord](https://discord.gg/NFWFGZeNh5).

0 comments on commit a2ef442

Please sign in to comment.