Skip to content

Commit

Permalink
Fixed translation strings not showing up during initial configuration…
Browse files Browse the repository at this point in the history
… and options configuration

added translations for english language
  • Loading branch information
nfragment committed Mar 28, 2024
1 parent 76a8b84 commit d35ea09
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 55 deletions.
20 changes: 10 additions & 10 deletions custom_components/nodered_conversation/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"step": {
"user": {
"data": {
"nodered_url": "NodeRed Endpoint",
"nodered_user": "NodeRed Endpoint User",
"nodered_pass": "NodeRed Endpoint Pass"
"nodered_url": "NodeRed Endpoint URL",
"nodered_user": "NodeRed Endpoint Username",
"nodered_pass": "NodeRed Endpoint Password"
},
"description": "Enter your NodeRed endpoint, user, and password.",
"title": "NodeRed Endpoint"
"description": "Enter your NodeRed endpoint URL, Username, and Password.",
"title": "NodeRed Conversation Agent - Configuration"
}
},
"error": {
Expand All @@ -21,12 +21,12 @@
"step": {
"init": {
"data": {
"nodered_url": "NodeRed Endpoint",
"nodered_user": "NodeRed Endpoint User",
"nodered_pass": "NodeRed Endpoint Pass"
"nodered_url": "NodeRed Endpoint URL",
"nodered_user": "NodeRed Endpoint Username",
"nodered_pass": "NodeRed Endpoint Password"
},
"description": "Enter your NodeRed endpoint, user, and password.",
"title": "NodeRed Endpoint"
"description": "Enter your NodeRed endpoint URL, Username, and Password.",
"title": "NodeRed Conversation Agent - Options"
}
}
}
Expand Down
73 changes: 28 additions & 45 deletions custom_components/nodered_conversation/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,33 @@
{
"config": {
"error": {
"cannot_connect": "Failed to connect",
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error"
"config": {
"step": {
"user": {
"data": {
"nodered_url": "NodeRed Endpoint URL",
"nodered_user": "NodeRed Endpoint Username",
"nodered_pass": "NodeRed Endpoint Password"
},
"step": {
"user": {
"data": {
"api_key": "API key"
}
}
}
"description": "Enter your NodeRed endpoint URL, Username, and Password.",
"title": "NodeRed Conversation Agent - Configuration"
}
},
"options": {
"step": {
"init": {
"data": {
"max_tokens": "Maximum tokens to return in response",
"model": "Completion Model",
"prompt": "Prompt Template",
"temperature": "Temperature",
"top_p": "Top P"
}
}
}
},
"services": {
"generate_image": {
"description": "Turn a prompt into an image",
"fields": {
"config_entry": {
"description": "The config entry to use for this service",
"name": "Config Entry"
},
"prompt": {
"description": "The text to turn into an image",
"example": "A photo of a dog",
"name": "Prompt"
},
"size": {
"description": "The size of the image to generate",
"name": "Size"
}
},
"name": "Generate image"
}
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
}
},
"options": {
"step": {
"init": {
"data": {
"nodered_url": "NodeRed Endpoint URL",
"nodered_user": "NodeRed Endpoint Username",
"nodered_pass": "NodeRed Endpoint Password"
},
"description": "Enter your NodeRed endpoint URL, Username, and Password.",
"title": "NodeRed Conversation Agent - Options"
}
}
}
}

0 comments on commit d35ea09

Please sign in to comment.