Skip to content

Commit

Permalink
Documentation improvements (#60)
Browse files Browse the repository at this point in the history
Documentation improvements
  • Loading branch information
vmakeev authored Sep 19, 2023
1 parent fe5ded0 commit af4ed02
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

Home Assistant custom component for control Huawei mesh routers over LAN.

[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration)
[![Hacs Default](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration)
[![License](https://img.shields.io/github/license/vmakeev/huawei_mesh_router)](https://github.com/vmakeev/huawei_mesh_router/blob/master/LICENSE.md)
![Active installatons](https://img.shields.io/badge/dynamic/json?color=blue&label=active%20installations&query=$[%27huawei_mesh_router%27][%27total%27]&url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcustom_integrations.json&cacheSeconds=600)

[![Release](https://img.shields.io/github/v/release/vmakeev/huawei_mesh_router)](https://github.com/vmakeev/huawei_mesh_router/releases/latest)
[![ReleaseDate](https://img.shields.io/github/release-date/vmakeev/huawei_mesh_router)](https://github.com/vmakeev/huawei_mesh_router/releases/latest)
![Maintained](https://img.shields.io/maintenance/yes/2023)

[![Localization contribute](https://img.shields.io/badge/localization-contrubute-blue)](docs/localization.md)

[![Russian](docs/images/flags/ru.png)](custom_components/huawei_mesh_router/translations/ru.json)
[![English](docs/images/flags/gb.png)](custom_components/huawei_mesh_router/translations/en.json)
[![Brazilian Portuguese](docs/images/flags/br.png)](custom_components/huawei_mesh_router/translations/pt-BR.json)

## Key features

- obtaining information about all routers and connected devices in the entire mesh network:
Expand Down Expand Up @@ -42,7 +48,17 @@ Home Assistant custom component for control Huawei mesh routers over LAN.
| [Huawei WiFi AX3 Pro](https://consumer.huawei.com/en/routers/ax3-pro/) | WS7206 | No | |
| [Huawei WiFi Mesh 3](https://consumer.huawei.com/en/routers/wifi-mesh3/) | WS8100 | Yes | My router model. All features are available |
| [Huawei WiFi Mesh 7](https://consumer.huawei.com/en/routers/wifi-mesh7/) | WS8800 | Yes | |
| Other routers with HarmonyOS | ------ | No | Will most likely work |


## Not supported models

| Name | Model | Notes |
|------------------------------------------------------------------------------------|--------|-----------------------------------------------|
| [Huawei Q2S](https://consumer.huawei.com/cn/support/routers/ws5280/) | WS5281 | The router blocks requests from the component |
| [Huawei Q2 Pro](https://consumer.huawei.com/cn/support/routers/q2-pro-2pack/) | WS5280 | The router blocks requests from the component |
| [Huawei Q6](https://consumer.huawei.com/cn/support/routers/q6/) | WS7290 | The router blocks requests from the component |

As far as I can understand, problems arise with routers designed for the domestic market of China. Unfortunately, I do not have such devices available so that I can try to find out the reasons for this behavior.

## Installation

Expand Down
Binary file added docs/images/flags/br.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/flags/gb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/flags/ru.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions docs/localization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# How to add support for a new language

## The optimal way

To add support for a new language, first of all you need to create a [fork of the project](https://github.com/vmakeev/huawei_mesh_router/fork).

Next, create a copy of the file [`custom_components/huawei_mesh_router/translations/en.json`](../custom_components/huawei_mesh_router/translations/en.json) and give it a name `<your_language_code>.json`. The new file should also be located in the [`custom_components/huawei_mesh_router/translations/`](../custom_components/huawei_mesh_router/translations/) folder. After that, translate all the values in the json file into your language.

_Note: The language codes follow the [BCP47](https://www.rfc-editor.org/info/bcp47) format, a few examples can be seen [here](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1)._

After that, you will need to make a [pull request](https://docs.github.com/articles/about-pull-requests) to the [original project](https://github.com/vmakeev/huawei_mesh_router), I will check it and add your language to the list of supported.

## A simpler, but less technological way

Download the [`en.json` file](../custom_components/huawei_mesh_router/translations/en.json), translate all the values into the language of your choice, and [create an issue](https://github.com/vmakeev/huawei_mesh_router/issues/new/choose) to add a new language.

Be sure to attach the translated file to the issue and specify which language it is, so that there are no misunderstandings.

After checking, I will add a new translation to the component.

0 comments on commit af4ed02

Please sign in to comment.