Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/skill_development/skill_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ Daily
`Tags` contain some tags that apply to the skill. There are no hard rules about
what may be in a tag, but `NeonGecko Original` is reserved for use with skills
owned by the `NeonGeckoCom` organization.
---
`Language Support` is used to define the languages this skill supports
`# TODO: Define Structure`

## LICENSE.md
Every project on GitHub should contain a `LICENSE.md` file with a known license.
Expand Down
46 changes: 46 additions & 0 deletions docs/skill_development/translation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Adding Support for Other Languages
Generally, skill development starts with support for one language (whatever the
skill author speaks). After the skill is behaving as expected,
[skill tests](https://neongeckocom.github.io/neon-docs/skill_development/skill_testing/)
should be added for resources and intents in the initial supported language.

## Translating Resources
First, the skill resources in the `locale` directory will need to be translated.
A good way to start is to copy the directory for a fully supported language and
then go through each resource file and translate the contents. Directories within
`locale` should be named as a `BCP-47` language code, More information
about how these various files are used can be found in the
[Adapt](https://neongeckocom.github.io/neon-docs/skill_development/adapt_intents/)
and [Padatious](https://neongeckocom.github.io/neon-docs/skill_development/padatious_intents/)
documentation.

## Updating Tests
To ensure translations are complete and functional, unit tests are used to check
resources and expected intent matches.

### Resource Tests
After resources are translated, the new language code should be added to `languages`
in the `test/test_resources.yaml` file for the skill. These tests will ensure that
all expected resources are translated for the skill and that future changes to
the skill maintain language support.

### Intent Tests
Once initial translation is completed, `test/test_intents.yaml` should be updated
to include tests for the added language. Copying tests from an existing language
and then translating them can be a helpful starting point; more detailed information
is available in the
[skill testing documentation](https://neongeckocom.github.io/neon-docs/skill_development/skill_testing/).

## Updating Documentation
Documentation should be updated to include translated strings and include intent
examples for the newly supported language.

### README.md
`# TODO: Link to doc`

### skill.json
No manual changes are necessary to `skill.json` if using the Neon skill
automation. More information about the `skill.json` specification can be found
in the [skill.json docs](https://neongeckocom.github.io/neon-docs/developers/skill_json/).
> *Note*: The infrastructure for this is still under construction, but the
> supporting files can be added so `skill.json` is updated in the future.
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ nav:
- Adapt Intents: skill_development/adapt_intents.md
- Padatious Intents: skill_development/padatious_intents.md
- Testing: skill_development/skill_testing.md
- Documentation: skill_development/skill_documentation.md
- Translation: skill_development/translation.md