Skip to content

Commit 34cd84c

Browse files
Translations
1 parent 5508c42 commit 34cd84c

File tree

5 files changed

+54
-2
lines changed

5 files changed

+54
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: New Language
2+
description: Submit a request for a new language to be created in Crowdin for translation.
3+
title: "New Language"
4+
labels: ["new-language"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
To learn more about adding a new language see [here](https://andrew-codechimp.github.io/HA-Battery-Notes/translations)
10+
11+
- type: input
12+
id: language
13+
attributes:
14+
label: Language
15+
description: The language you would like to submit translations for.
16+
validations:
17+
required: true

.github/workflows/crowdin-download.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Crowdin download
22

33
on:
44
workflow_dispatch:
5-
# schedule:
6-
# - cron: '0 * * * *'
5+
schedule:
6+
- cron: "0 0 * * *"
77

88
permissions: write-all
99

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ To get full use of the integration, please visit the [docs](https://andrew-codec
6161

6262
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.
6363

64+
## Translations
65+
66+
To add a new language translation to Battery Notes see [here](https://andrew-codechimp.github.io/HA-Battery-Notes/translations)
67+
6468
## Contributions are welcome!
6569

6670
If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md).

docs/translations.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Translations
2+
3+
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.
4+
5+
Battery Notes uses Crowdin to make contributing easy.
6+
7+
## Changing or adding to existing language
8+
9+
First register and join the translation project
10+
11+
- If you don’t have a crowdin account yet, create one at https://crowdin.com
12+
- Go to the [Battery Notes Crowdin project page](https://crowdin.com/project/battery-notes)
13+
- Click Join.
14+
15+
Next translate a string
16+
17+
- Select the language you want to contribute to from the dashboard.
18+
- Click Translate All.
19+
- Find the string you want to edit, missing translation are marked red.
20+
- Fill in or modify the translation and click Save.
21+
- Repeat for other translations.
22+
23+
!!! info
24+
25+
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.
26+
27+
## Adding a new language
28+
29+
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.
30+

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ nav:
1111
- Library: library.md
1212
- Configuration: configuration.md
1313
- Community: community.md
14+
- Translations: translations.md
1415
- FAQ: faq.md
1516

1617
markdown_extensions:

0 commit comments

Comments
 (0)