Skip to content

Commit

Permalink
Translations
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Feb 10, 2024
1 parent 5508c42 commit 34cd84c
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/new_language_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: New Language
description: Submit a request for a new language to be created in Crowdin for translation.
title: "New Language"
labels: ["new-language"]
body:
- type: markdown
attributes:
value: |
To learn more about adding a new language see [here](https://andrew-codechimp.github.io/HA-Battery-Notes/translations)
- type: input
id: language
attributes:
label: Language
description: The language you would like to submit translations for.
validations:
required: true
4 changes: 2 additions & 2 deletions .github/workflows/crowdin-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Crowdin download

on:
workflow_dispatch:
# schedule:
# - cron: '0 * * * *'
schedule:
- cron: "0 0 * * *"

permissions: write-all

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ To get full use of the integration, please visit the [docs](https://andrew-codec

To add a device definition to the battery library so that it will be automatically configured fill out the above form or see the [docs](https://andrew-codechimp.github.io/HA-Battery-Notes/library) for adding via pull request.

## Translations

To add a new language translation to Battery Notes see [here](https://andrew-codechimp.github.io/HA-Battery-Notes/translations)

## Contributions are welcome!

If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md).
Expand Down
30 changes: 30 additions & 0 deletions docs/translations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translations

You can help by adding missing translations when you are a native speaker. Or add a complete new language when there is no language file available.

Battery Notes uses Crowdin to make contributing easy.

## Changing or adding to existing language

First register and join the translation project

- If you don’t have a crowdin account yet, create one at https://crowdin.com
- Go to the [Battery Notes Crowdin project page](https://crowdin.com/project/battery-notes)
- Click Join.

Next translate a string

- Select the language you want to contribute to from the dashboard.
- Click Translate All.
- Find the string you want to edit, missing translation are marked red.
- Fill in or modify the translation and click Save.
- Repeat for other translations.

!!! info

Battery Notes will automatically pull in latest changes to translations every day and create a Pull Request. After that is reviewed by a maintainer it will be included in the next release of Battery Notes.

## Adding a new language

Create an [Issue](https://github.com/andrew-codechimp/HA-Battery-Notes/issues/new?template=new_language_request.yml&title=New+Language) requesting a new language. We will do the necessary work to add the new translation to the integration and Crowdin site, when it's ready for you to contribute we'll comment on the issue you raised.

1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nav:
- Library: library.md
- Configuration: configuration.md
- Community: community.md
- Translations: translations.md
- FAQ: faq.md

markdown_extensions:
Expand Down

0 comments on commit 34cd84c

Please sign in to comment.