Skip to content

Commit

Permalink
Merge pull request #6 from vannut/feature-icon-language
Browse files Browse the repository at this point in the history
Icon & Language
  • Loading branch information
vannut committed Dec 9, 2021
2 parents b1d94d5 + d1f6d57 commit 7ec578d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Commands/FetchForecast.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public function fetch()
.'&lon='.$this->config->get('lon')
.'&exclude=minutely,hourly,alerts'
.'&units='.$this->config->get('units', 'metric')
.'&appid='.$this->config->get('api_secret_key');
.'&appid='.$this->config->get('api_secret_key')
.'&lang='.$this->config->get('lang','en');


$headers = [
Expand Down
5 changes: 4 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ protected function navigation()
Nav::extend(function ($nav) {
$nav->content('Weather')
->route('weather.settings')
->icon('cloud');
->icon('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-cloud-sun" viewBox="0 0 16 16">
<path d="M7 8a3.5 3.5 0 0 1 3.5 3.555.5.5 0 0 0 .624.492A1.503 1.503 0 0 1 13 13.5a1.5 1.5 0 0 1-1.5 1.5H3a2 2 0 1 1 .1-3.998.5.5 0 0 0 .51-.375A3.502 3.502 0 0 1 7 8zm4.473 3a4.5 4.5 0 0 0-8.72-.99A3 3 0 0 0 3 16h8.5a2.5 2.5 0 0 0 0-5h-.027z"/>
<path d="M10.5 1.5a.5.5 0 0 0-1 0v1a.5.5 0 0 0 1 0v-1zm3.743 1.964a.5.5 0 1 0-.707-.707l-.708.707a.5.5 0 0 0 .708.708l.707-.708zm-7.779-.707a.5.5 0 0 0-.707.707l.707.708a.5.5 0 1 0 .708-.708l-.708-.707zm1.734 3.374a2 2 0 1 1 3.296 2.198c.199.281.372.582.516.898a3 3 0 1 0-4.84-3.225c.352.011.696.055 1.028.129zm4.484 4.074c.6.215 1.125.59 1.522 1.072a.5.5 0 0 0 .039-.742l-.707-.707a.5.5 0 0 0-.854.377zM14.5 6.5a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z"/>
</svg>');
});
}
}
54 changes: 54 additions & 0 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,60 @@ public function __construct()
'imperial' => 'Imperial (Fahrenheit, miles/hour)',
]
],
'lang' => [
'width' => 100,
'type' => 'select',
'default' => 'en',
'options' => [
'af' => 'Afrikaans',
'al' => 'Albanian',
'ar' => 'Arabic',
'az' => 'Azerbaijani',
'bg' => 'Bulgarian',
'ca' => 'Catalan',
'cz' => 'Czech',
'da' => 'Danish',
'de' => 'German',
'el' => 'Greek',
'en' => 'English',
'eu' => 'Basque',
'fa' => 'Persian (Farsi)',
'fi' => 'Finnish',
'fr' => 'French',
'gl' => 'Galician',
'he' => 'Hebrew',
'hi' => 'Hindi',
'hr' => 'Croatian',
'hu' => 'Hungarian',
'id' => 'Indonesian',
'it' => 'Italian',
'ja' => 'Japanese',
'kr' => 'Korean',
'la' => 'Latvian',
'lt' => 'Lithuanian',
'mk' => 'Macedonian',
'no' => 'Norwegian',
'nl' => 'Dutch',
'pl' => 'Polish',
'pt' => 'Portuguese',
'pt_br' => 'Português Brasil',
'ro' => 'Romanian',
'ru' => 'Russian',
'se' => 'Swedish',
'sk' => 'Slovak',
'sl' => 'Slovenian',
'es' => 'Spanish',
'sr' => 'Serbian',
'th' => 'Thai',
'tr' => 'Turkish',
'uk' => 'Ukrainian',
'vi' => 'Vietnamese',
'zh_cn' => 'Chinese Simplified',
'zh_tw' => 'Chinese Traditional',
'zu' => 'Zulu',
],
'instructions' => 'select your language of choice, default EN',
]


]);
Expand Down

0 comments on commit 7ec578d

Please sign in to comment.