diff --git a/README.md b/README.md index 7f8d12a..6d3eeb4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 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) @@ -10,6 +10,12 @@ Home Assistant custom component for control Huawei mesh routers over LAN. [![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: @@ -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 diff --git a/docs/images/flags/br.png b/docs/images/flags/br.png new file mode 100644 index 0000000..9b1a553 Binary files /dev/null and b/docs/images/flags/br.png differ diff --git a/docs/images/flags/gb.png b/docs/images/flags/gb.png new file mode 100644 index 0000000..ff701e1 Binary files /dev/null and b/docs/images/flags/gb.png differ diff --git a/docs/images/flags/ru.png b/docs/images/flags/ru.png new file mode 100644 index 0000000..47da421 Binary files /dev/null and b/docs/images/flags/ru.png differ diff --git a/docs/localization.md b/docs/localization.md new file mode 100644 index 0000000..da7e53c --- /dev/null +++ b/docs/localization.md @@ -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 `.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.