Skip to content

Commit

Permalink
Merge pull request #14 from runely/norwegian-language-added
Browse files Browse the repository at this point in the history
Added support for norwegian language. Solving issue #6
  • Loading branch information
runely authored Jun 16, 2020
2 parents 19f1e79 + c38e9c5 commit 00927da
Show file tree
Hide file tree
Showing 11 changed files with 158 additions and 73 deletions.
30 changes: 20 additions & 10 deletions .homeycompose/flow/conditions/any_event_in.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"id": "any_event_in",
"title": {
"en": "Any event !{{starts|doesn't start}} in..."
"en": "Any event !{{starts|doesn't start}} in...",
"no": "En avtale !{{starter|starter ikke}} om..."
},
"args": [
{
Expand All @@ -11,55 +12,64 @@
{
"id": "1",
"label": {
"en": "1 minute"
"en": "1 minute",
"no": "1 minutt"
}
},
{
"id": "2",
"label": {
"en": "2 minutes"
"en": "2 minutes",
"no": "2 minutter"
}
},
{
"id": "5",
"label": {
"en": "5 minutes"
"en": "5 minutes",
"no": "5 minutter"
}
},
{
"id": "10",
"label": {
"en": "10 minutes"
"en": "10 minutes",
"no": "10 minutter"
}
},
{
"id": "15",
"label": {
"en": "15 minutes"
"en": "15 minutes",
"no": "15 minutter"
}
},
{
"id": "20",
"label": {
"en": "20 minutes"
"en": "20 minutes",
"no": "20 minutter"
}
},
{
"id": "25",
"label": {
"en": "25 minutes"
"en": "25 minutes",
"no": "25 minutter"
}
},
{
"id": "30",
"label": {
"en": "30 minutes"
"en": "30 minutes",
"no": "30 minutter"
}
},
{
"id": "60",
"label": {
"en": "60 minutes"
"en": "60 minutes",
"no": "60 minutter"
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion .homeycompose/flow/conditions/any_event_ongoing.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "any_event_ongoing",
"title": {
"en": "Any event !{{is|isn't}} ongoing"
"en": "Any event !{{is|isn't}} ongoing",
"no": "En avtale !{{pågår|pågår ikke}}"
}
}
33 changes: 22 additions & 11 deletions .homeycompose/flow/conditions/event_in.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"id": "event_in",
"title": {
"en": "Event !{{starts|doesn't start}} in..."
"en": "Event !{{starts|doesn't start}} in...",
"no": "Avtale !{{starter|starter ikke}} om..."
},
"args": [
{
Expand All @@ -11,55 +12,64 @@
{
"id": "1",
"label": {
"en": "1 minute"
"en": "1 minute",
"no": "1 minutt"
}
},
{
"id": "2",
"label": {
"en": "2 minutes"
"en": "2 minutes",
"no": "2 minutter"
}
},
{
"id": "5",
"label": {
"en": "5 minutes"
"en": "5 minutes",
"no": "5 minutter"
}
},
{
"id": "10",
"label": {
"en": "10 minutes"
"en": "10 minutes",
"no": "10 minutter"
}
},
{
"id": "15",
"label": {
"en": "15 minutes"
"en": "15 minutes",
"no": "15 minutter"
}
},
{
"id": "20",
"label": {
"en": "20 minutes"
"en": "20 minutes",
"no": "20 minutter"
}
},
{
"id": "25",
"label": {
"en": "25 minutes"
"en": "25 minutes",
"no": "25 minutter"
}
},
{
"id": "30",
"label": {
"en": "30 minutes"
"en": "30 minutes",
"no": "30 minutter"
}
},
{
"id": "60",
"label": {
"en": "60 minutes"
"en": "60 minutes",
"no": "60 minutter"
}
}
]
Expand All @@ -68,7 +78,8 @@
"name": "event",
"type": "autocomplete",
"placeholder": {
"en": "Select event..."
"en": "Select event...",
"no": "Velg avtale..."
}
}
]
Expand Down
6 changes: 4 additions & 2 deletions .homeycompose/flow/conditions/event_ongoing.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"id": "event_ongoing",
"title": {
"en": "Event !{{is|isn't}} ongoing"
"en": "Event !{{is|isn't}} ongoing",
"no": "Avtale !{{pågår|pågår ikke}}"
},
"args": [
{
"name": "event",
"type": "autocomplete",
"placeholder": {
"en": "Select event..."
"en": "Select event...",
"no": "Velg avtale..."
}
}
]
Expand Down
21 changes: 14 additions & 7 deletions .homeycompose/flow/triggers/event_starts.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
{
"id": "event_starts",
"title": {
"en": "Any event starts"
"en": "Event starts",
"no": "En avtale starter"
},
"tokens": [
{
"name": "event_name",
"type": "string",
"title": {
"en": "Event name"
"en": "Title",
"no": "Tittel"
},
"example": {
"en": "Pick up in kindergarden"
"en": "Pick up in kindergarden",
"no": "Hente i barnehagen"
}
},
{
"name": "event_description",
"type": "string",
"title": {
"en": "Event description"
"en": "Description",
"no": "Beskrivelse"
},
"example": {
"en": "Pick up kids in kindergarden"
"en": "Pick up kids in kindergarden",
"no": "Hente barna fra barnehagen"
}
},
{
"name": "event_location",
"type": "string",
"title": {
"en": "Event location"
"en": "Location",
"no": "Sted"
},
"example": {
"en": "Kindergarden street, 30"
"en": "Kindergarden street, 30",
"no": "Barnehagegata, 30"
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ The IcalCalendar can trigger on your calendar events to let you know when events

## Changelog

- 0.0.5
- Added support for norwegian language -> [Issue #6](https://github.com/runely/calendar-homey/issues/6)
- 0.0.4
- Changelog moved out of readme...
- 0.0.3
Expand Down
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class IcalCalendar extends Homey.App {
startStamp = moment(event.DTSTART_TIMESTAMP).format('DD.MM HH:mm')
}
catch (err) {
this.log("eventList: Failed to parse 'DTSTART_TIMESTAMP'", err);
this.log("getEventList: Failed to parse 'DTSTART_TIMESTAMP'", err);
startStamp = "";
}
}
Expand All @@ -254,7 +254,7 @@ class IcalCalendar extends Homey.App {
startStamp = moment(event.DTSTART_DATE).format('DD.MM')
}
catch (err) {
this.log("eventList: Failed to parse 'DTSTART_DATE'", err);
this.log("getEventList: Failed to parse 'DTSTART_DATE'", err);
startStamp = "";
}
}
Expand Down
Loading

0 comments on commit 00927da

Please sign in to comment.