Skip to content

Commit 5340eac

Browse files
Merge pull request #19 from helsingborg-stad/fix/darker-danger-remove-numbers
fix: make warnings red, and danger dark red. Remove numbers.
2 parents 7626156 + ae30432 commit 5340eac

File tree

3 files changed

+152
-67
lines changed

3 files changed

+152
-67
lines changed
2.13 KB
Binary file not shown.

languages/api-alarm-integration-sv_SE.po

Lines changed: 146 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,111 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: API Alarm Integration\n"
44
"Report-Msgid-Bugs-To: \n"
5+
"POT-Creation-Date: 2025-04-01 10:54+0200\n"
6+
"PO-Revision-Date: 2025-04-01 11:08+0200\n"
57
"Last-Translator: \n"
68
"Language-Team: \n"
9+
"Language: sv\n"
710
"MIME-Version: 1.0\n"
811
"Content-Type: text/plain; charset=UTF-8\n"
912
"Content-Transfer-Encoding: 8bit\n"
10-
"POT-Creation-Date: 2017-03-22 15:03+0100\n"
11-
"PO-Revision-Date: 2017-03-22 15:07+0100\n"
12-
"Language: sv\n"
1313
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
14-
"X-Generator: Poedit 1.8.12\n"
14+
"X-Generator: Poedit 3.5\n"
1515
"X-Poedit-Basepath: ..\n"
1616
"X-Poedit-WPHeader: api-alarm-integration.php\n"
1717
"X-Poedit-SourceCharset: UTF-8\n"
18-
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
18+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
20+
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
1921
"X-Poedit-SearchPath-0: .\n"
2022
"X-Poedit-SearchPathExcluded-0: *.js\n"
2123

22-
#: source/php/Disturbance.php:60
24+
#: source/php/AcfFields/php/alarm-module.php:6
25+
msgid "Alarm options"
26+
msgstr "Larminställningar"
27+
28+
#: source/php/AcfFields/php/alarm-module.php:12
29+
msgid "Rest API url"
30+
msgstr "Webbadress för REST Api"
31+
32+
#: source/php/AcfFields/php/alarm-module.php:15
33+
msgid "Example: http://myalarmapi.tld/json"
34+
msgstr "Exempel: http://myalarmapi.tld/json"
35+
36+
#: source/php/AcfFields/php/alarm-module.php:33
37+
msgid "Alarms per page"
38+
msgstr "Larm per sida"
39+
40+
#: source/php/AcfFields/php/alarm-widget.php:6
41+
msgid "Alarm widget"
42+
msgstr "Larmwidget"
43+
44+
#: source/php/AcfFields/php/alarm-widget.php:15
45+
msgid "Titel"
46+
msgstr "Titel"
47+
48+
#: source/php/AcfFields/php/disturbances.php:6 source/php/Disturbance.php:60
2349
msgid "Disturbances"
2450
msgstr "Störningar"
2551

26-
#: source/php/App.php:55
27-
#: templates/alarm-list.php:40
52+
#: source/php/AcfFields/php/disturbances.php:10
53+
msgid "Enable disturbance messages"
54+
msgstr "Aktivera störningsmeddelande"
55+
56+
#: source/php/AcfFields/php/disturbances.php:15
57+
msgid "Activate"
58+
msgstr "Aktivera"
59+
60+
#: source/php/AcfFields/php/disturbances.php:31
61+
msgid "Api url"
62+
msgstr "Api url"
63+
64+
#: source/php/AcfFields/php/disturbances.php:34
65+
msgid "The base url to the api alarm manager"
66+
msgstr "Basurl:en till apa alarm manager"
67+
68+
#: source/php/AcfFields/php/disturbances.php:63
69+
msgid "Filter places"
70+
msgstr "Filtrera på plats"
71+
72+
#: source/php/AcfFields/php/disturbances.php:66
73+
msgid ""
74+
"You will first need to set your api url and save this page before places "
75+
"will be filled with alternatives. Leave blank to get disturbances from all "
76+
"places."
77+
msgstr ""
78+
"Du måste först ange din API-URL och spara denna sida innan platser fylls "
79+
"med alternativ. Lämna tomt för att få störningar från alla platser."
80+
81+
#: source/php/AcfFields/php/disturbances.php:86
82+
msgid "Big disturbances"
83+
msgstr "Storstörningar"
84+
85+
#: source/php/AcfFields/php/disturbances.php:87
86+
msgid "Small disturbances"
87+
msgstr "Lillstörningar"
88+
89+
#: source/php/AcfFields/php/disturbances.php:96
90+
msgid "Output automatically"
91+
msgstr "Mata ut automatiskt"
92+
93+
#: source/php/AcfFields/php/disturbances.php:123
94+
msgid "Output selector for big disturbance"
95+
msgstr "Välj utmaningsankare för storstörning"
96+
97+
#: source/php/AcfFields/php/disturbances.php:126
98+
msgid "CSS Selector for where to output big disturbances. Defaults to body."
99+
msgstr "CSS-väljare för var storstörningar ska visas. Standardvärde är body."
100+
101+
#: source/php/AcfFields/php/disturbances.php:155
102+
msgid "Output selector for small disturbance"
103+
msgstr "Välj utmaningsankare för lillstörning"
104+
105+
#: source/php/AcfFields/php/disturbances.php:158
106+
msgid "CSS Selector for where to output small disturbances. Defaults to body."
107+
msgstr "CSS-väljare för var lillstörningar ska visas. Standardvärde är body."
108+
109+
#: source/php/App.php:55 templates/alarm-list.php:40
28110
msgid "Show filters"
29111
msgstr "Visa filter"
30112

@@ -40,6 +122,47 @@ msgstr "Visa mer information"
40122
msgid "Show less information"
41123
msgstr "Visa mindre information"
42124

125+
#: source/php/Module.php:49
126+
msgid "No results found on your query."
127+
msgstr "Inga resultat hittades på din sökfråga."
128+
129+
#: source/php/Module.php:50
130+
msgid "Failed to get data, please try again later!"
131+
msgstr "Kunde inte hämta data, vänligen försök igen senare. "
132+
133+
#: source/php/Module.php:51
134+
msgid "Load more"
135+
msgstr "Ladda fler"
136+
137+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:21
138+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:22
139+
msgid "Fire Danger Levels"
140+
msgstr "Brandrisknivåer"
141+
142+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:23
143+
msgid "Outputs a list of fire danger levels from Alarm API"
144+
msgstr "Matar ut en lista av brandrisknivåer från Alarm API:et"
145+
146+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:34
147+
#, php-format
148+
msgid "Updated at %s"
149+
msgstr "Uppdaterad: %s"
150+
151+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:116
152+
msgctxt "fire danger level"
153+
msgid "Fire ban"
154+
msgstr "Eldningsförbud"
155+
156+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:117
157+
msgctxt "fire danger level"
158+
msgid "Strict fire ban"
159+
msgstr "Skärpt eldningsförbud"
160+
161+
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:118
162+
msgctxt "fire danger level"
163+
msgid "No fire ban"
164+
msgstr "Inget eldningsförbud"
165+
43166
#: source/php/Widget.php:13
44167
msgid "Displays a list with alarms"
45168
msgstr "Visar en lista med alla alarm"
@@ -48,8 +171,7 @@ msgstr "Visar en lista med alla alarm"
48171
msgid "Text search"
49172
msgstr "Testsök"
50173

51-
#: templates/alarm-list.php:10
52-
#: templates/alarm-list.php:36
174+
#: templates/alarm-list.php:10 templates/alarm-list.php:36
53175
msgid "Search"
54176
msgstr "Sök"
55177

@@ -69,87 +191,50 @@ msgstr "Datum från"
69191
msgid "Date to"
70192
msgstr "Datum till"
71193

72-
#: templates/alarm-list.php:59
73-
#: templates/alarms.blade.php:142
74-
#: templates/alarms.blade.php:144
194+
#: templates/alarm-list.php:59 templates/alarms.blade.php:142
75195
msgid "Time"
76196
msgstr "Tid"
77197

78-
#: templates/alarm-list.php:62
79-
#: templates/alarms.blade.php:146
80-
#: templates/alarms.blade.php:148
198+
#: templates/alarm-list.php:62 templates/alarms.blade.php:146
81199
msgid "Incident"
82200
msgstr "Händelse"
83201

84-
#: templates/alarm-list.php:63
85-
#: templates/alarms.blade.php:148
86-
#: templates/alarms.blade.php:150
202+
#: templates/alarm-list.php:63 templates/alarms.blade.php:148
87203
msgid "Level"
88204
msgstr "Nivå"
89205

90-
#: templates/alarm-list.php:66
91-
#: templates/alarms.blade.php:152
92-
#: templates/alarms.blade.php:154
206+
#: templates/alarm-list.php:66 templates/alarms.blade.php:152
93207
msgid "Address"
94208
msgstr "Adress"
95209

96-
#: templates/alarm-list.php:67
97-
#: templates/alarms.blade.php:155
98-
#: templates/alarms.blade.php:157
210+
#: templates/alarm-list.php:67 templates/alarms.blade.php:155
99211
msgid "Station"
100212
msgstr "Station"
101213

102214
#: templates/alarm-list.php:72
103215
msgid "Show more alarms"
104216
msgstr "Visa fler alarm"
105217

106-
#. Plugin Name of the plugin
218+
#. Plugin Name of the plugin/theme
107219
msgid "API Alarm Integration"
108-
msgstr ""
220+
msgstr "Larmintregration"
109221

110-
#. Plugin URI of the plugin
222+
#. Plugin URI of the plugin/theme
111223
msgid "https://github.com/helsingborg-stad/api-alarm-integration"
112224
msgstr ""
113225

114-
#. Description of the plugin
226+
#. Description of the plugin/theme
115227
msgid "Shows alarms from API Alarm Manager"
116228
msgstr ""
117229

118-
#. Author of the plugin
230+
#. Author of the plugin/theme
119231
msgid "Kristoffer Svanmark"
120232
msgstr ""
121233

122-
#. Author URI of the plugin
234+
#. Author URI of the plugin/theme
123235
msgid "https://github.com/helsingborg-stad"
124236
msgstr ""
125237

126-
#: source/php/Module.php:51
127-
msgid "Failed to get data, please try again later!"
128-
msgstr ""
129-
130-
#: source/php/Module.php:52
131-
msgid "Load more"
132-
msgstr ""
133-
134-
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:20
135-
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:21
136-
msgid "Fire Danger Levels"
137-
msgstr "Brandrisknivåer"
138-
139-
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:22
140-
msgid "Outputs a list of fire danger levels from Alarm API"
141-
msgstr "Matar ut en lista av brandrisknivåer från Alarm API:et"
142-
143-
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:33
144-
msgid "Updated at %s"
145-
msgstr "Uppdaterad: %s"
146-
147-
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:98
148-
msgctxt "fire danger level"
149-
msgid "Fire ban"
150-
msgstr "Eldningsförbud"
151-
152-
#: source/php/Module/FireDangerLevels/FireDangerLevels.php:99
153-
msgctxt "fire danger level"
154-
msgid "No risk"
155-
msgstr "Ingen varning"
238+
#~ msgctxt "fire danger level"
239+
#~ msgid "No risk"
240+
#~ msgstr "Ingen varning"

source/php/Module/FireDangerLevels/FireDangerLevels.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ private function appendCacheBustQueryParam($url, $ttl = 5) {
9898
private function getNoticeTypeFromLevel($level): string
9999
{
100100
return [
101-
'2' => 'warning',
102-
'3' => 'danger',
101+
'2' => 'danger',
102+
'3' => 'danger-dark',
103103
][$level] ?? 'success';
104104
}
105105

@@ -113,16 +113,16 @@ private function getIconNameFromLevel($level): string
113113

114114
private function getNoticeTextFromLevel($level): string
115115
{
116-
$prefix = "$level - ";
117116
$fireBanText = _x('Fire ban', 'fire danger level', 'api-alarm-integration');
118-
$noRiskText = _x('No risk', 'fire danger level', 'api-alarm-integration');
117+
$fireBanTextStrict = _x('Strict fire ban', 'fire danger level', 'api-alarm-integration');
118+
$noRiskText = _x('No fire ban', 'fire danger level', 'api-alarm-integration');
119119

120120
$text = [
121121
'2' => $fireBanText,
122-
'3' => $fireBanText
122+
'3' => $fireBanTextStrict
123123
][$level] ?? $noRiskText;
124124

125-
return "$prefix $text";
125+
return $text;
126126
}
127127

128128
/**

0 commit comments

Comments
 (0)