Browse Source

translations

pull/74/head
Chris 7 years ago
parent
commit
0f3087ab7d
  1. 10
      CHANGELOG.md
  2. 8
      app/Http/Controllers/ItemController.php
  3. 8
      app/Http/Controllers/SettingsController.php
  4. 3
      app/Providers/AppServiceProvider.php
  5. 29
      app/Setting.php
  6. 85
      database/seeds/SettingsSeeder.php
  7. 58
      resources/lang/de/app.php
  8. 78
      resources/lang/en/app.php
  9. 58
      resources/lang/es/app.php
  10. 58
      resources/lang/fi/app.php
  11. 58
      resources/lang/fr/app.php
  12. 58
      resources/lang/sv/app.php
  13. 2
      resources/views/add.blade.php
  14. 2
      resources/views/app.blade.php
  15. 28
      resources/views/items/form.blade.php
  16. 18
      resources/views/items/list.blade.php
  17. 16
      resources/views/items/trash.blade.php
  18. 10
      resources/views/settings/form.blade.php
  19. 14
      resources/views/settings/list.blade.php
  20. 10
      resources/views/supportedapps/nzbget.blade.php
  21. 6
      resources/views/welcome.blade.php

10
CHANGELOG.md

@ -1,5 +1,15 @@
# Release Notes # Release Notes
## v1.1.2 (2018-02-05)
### Added
- Translation support
- Supported applications
### Changed
- Icon used to put tiles into config mode
## v1.1.0 (2018-02-05) ## v1.1.0 (2018-02-05)
### Added ### Added

8
app/Http/Controllers/ItemController.php

@ -151,7 +151,7 @@ class ItemController extends Controller
Item::create($request->all()); Item::create($request->all());
return redirect()->route('dash') return redirect()->route('dash')
->with('success','Item created successfully'); ->with('success', __('alert.success.item_created'));
} }
/** /**
@ -206,7 +206,7 @@ class ItemController extends Controller
Item::find($id)->update($request->all()); Item::find($id)->update($request->all());
return redirect()->route('dash') return redirect()->route('dash')
->with('success','Item updated successfully'); ->with('success',__('alert.success.item_updated'));
} }
/** /**
@ -228,7 +228,7 @@ class ItemController extends Controller
} }
return redirect()->route('items.index') return redirect()->route('items.index')
->with('success','Item deleted successfully'); ->with('success',__('alert.success.item_deleted'));
} }
/** /**
@ -244,7 +244,7 @@ class ItemController extends Controller
->where('id', $id) ->where('id', $id)
->restore(); ->restore();
return redirect()->route('items.index') return redirect()->route('items.index')
->with('success','Item restored successfully'); ->with('success',__('alert.success.item_restored'));
} }
/** /**

8
app/Http/Controllers/SettingsController.php

@ -40,7 +40,7 @@ class SettingsController extends Controller
]); ]);
} else { } else {
return redirect()->route('settings.list')->with([ return redirect()->route('settings.list')->with([
'error' => 'This Setting does not exist.', 'error' => __('app.alert.error.not_exist'),
]); ]);
} }
} }
@ -74,11 +74,11 @@ class SettingsController extends Controller
$setting->save(); $setting->save();
return redirect()->route('settings.index')->with([ return redirect()->route('settings.index')->with([
'success' => 'You have successfully edited this Setting!', 'success' => __('app.alert.success.setting_updated'),
]); ]);
} else { } else {
return redirect()->route('settings.index')->with([ return redirect()->route('settings.index')->with([
'error' => 'This Setting does not exist.', 'error' => __('app.alert.error.not_exist'),
]); ]);
} }
} }
@ -95,7 +95,7 @@ class SettingsController extends Controller
$setting->save(); $setting->save();
} }
return redirect()->route('settings.index')->with([ return redirect()->route('settings.index')->with([
'success' => 'You have successfully edited this Setting!', 'success' => __('app.alert.success.setting_updated'),
]); ]);
} }

3
app/Providers/AppServiceProvider.php

@ -46,6 +46,9 @@ class AppServiceProvider extends ServiceProvider
} else { } else {
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true)); Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));
} }
$lang = Setting::fetch('language');
\App::setLocale($lang);
} }
view()->share('alt_bg', $alt_bg); view()->share('alt_bg', $alt_bg);

29
app/Setting.php

@ -15,6 +15,10 @@ class Setting extends Model
*/ */
protected $table = 'settings'; protected $table = 'settings';
protected $fillable = [
'id', 'group_id', 'key', 'type', 'options', 'label', 'value', 'order', 'system'
];
/** /**
* Tell the Model this Table doesn't support timestamps. * Tell the Model this Table doesn't support timestamps.
* *
@ -45,28 +49,28 @@ class Setting extends Model
switch($this->type) { switch($this->type) {
case 'image': case 'image':
if(!empty($this->value)) { if(!empty($this->value)) {
$value = '<a href="'.asset('storage/'.$this->value).'" title="View" target="_blank">View</a>'; $value = '<a href="'.asset('storage/'.$this->value).'" title="'.__('app.settings.view').'" target="_blank">'.__('app.settings.view').'</a>';
} else { } else {
$value = '- not set -'; $value = __('app.options.none');
} }
break; break;
case 'boolean': case 'boolean':
if((bool)$this->value === true) { if((bool)$this->value === true) {
$value = 'Yes'; $value = __('app.options.yes');
} else { } else {
$value = 'No'; $value = __('app.options.no');
} }
break; break;
case 'select': case 'select':
if(!empty($this->value) && $this->value !== 'none') { if(!empty($this->value) && $this->value !== 'none') {
$options = (array)json_decode($this->options); $options = (array)json_decode($this->options);
$value = $options[$this->value]; $value = __($options[$this->value]);
} else { } else {
$value = '- not set -'; $value = __('app.options.none');
} }
break; break;
default: default:
$value = $this->value; $value = __($this->value);
break; break;
} }
@ -80,11 +84,11 @@ class Setting extends Model
case 'image': case 'image':
$value = ''; $value = '';
if(isset($this->value) && !empty($this->value)) { if(isset($this->value) && !empty($this->value)) {
$value .= '<a class="setting-view-image" href="'.asset('storage/'.$this->value).'" title="View" target="_blank"><img src="'.asset('storage/'.$this->value).'" /></a>'; $value .= '<a class="setting-view-image" href="'.asset('storage/'.$this->value).'" title="'.__('app.settings.view').'" target="_blank"><img src="'.asset('storage/'.$this->value).'" /></a>';
} }
$value .= Form::file('value', ['class' => 'form-control']); $value .= Form::file('value', ['class' => 'form-control']);
if(isset($this->value) && !empty($this->value)) { if(isset($this->value) && !empty($this->value)) {
$value .= '<a class="settinglink" href="'.route('settings.clear', $this->id).'" title="Remove">Reset back to default</a>'; $value .= '<a class="settinglink" href="'.route('settings.clear', $this->id).'" title="'.__('app.settings.remove').'">'.__('app.settings.reset').'</a>';
} }
break; break;
@ -102,6 +106,9 @@ class Setting extends Model
break; break;
case 'select': case 'select':
$options = json_decode($this->options); $options = json_decode($this->options);
foreach($options as $key => $opt) {
$options->$key = __($opt);
}
$value = Form::select('value', $options, null, ['class' => 'form-control']); $value = Form::select('value', $options, null, ['class' => 'form-control']);
break; break;
default: default:
@ -199,8 +206,8 @@ class Setting extends Model
$output .= '<div class="searchform">'; $output .= '<div class="searchform">';
$output .= Form::open(['url' => $url, 'method' => 'get']); $output .= Form::open(['url' => $url, 'method' => 'get']);
$output .= '<div class="input-container">'; $output .= '<div class="input-container">';
$output .= Form::text($var, null, ['class' => 'homesearch', 'placeholder' => $name.' search...']); $output .= Form::text($var, null, ['class' => 'homesearch', 'placeholder' => $name.' '.__('app.settings.search').'...']);
$output .= '<button type="submit">Search</button>'; $output .= '<button type="submit">'.ucwords(__('app.settings.remove')).'</button>';
$output .= '</div>'; $output .= '</div>';
$output .= Form::close(); $output .= Form::close();
$output .= '</div>'; $output .= '</div>';

85
database/seeds/SettingsSeeder.php

@ -14,29 +14,39 @@ class SettingsSeeder extends Seeder
public function run() public function run()
{ {
// Groups // Groups
if(!SettingGroup::find(1)) { if(!$setting_group = SettingGroup::find(1)) {
$setting_group = new SettingGroup; $setting_group = new SettingGroup;
$setting_group->id = 1; $setting_group->id = 1;
$setting_group->title = 'System'; $setting_group->title = 'app.settings.system';
$setting_group->order = 0; $setting_group->order = 0;
$setting_group->save(); $setting_group->save();
} else {
$setting_group->title = 'app.settings.system';
$setting_group->save();
} }
if(!SettingGroup::find(2)) { if(!$setting_group = SettingGroup::find(2)) {
$setting_group = new SettingGroup; $setting_group = new SettingGroup;
$setting_group->id = 2; $setting_group->id = 2;
$setting_group->title = 'Appearance'; $setting_group->title = 'app.settings.appearance';
$setting_group->order = 1; $setting_group->order = 1;
$setting_group->save(); $setting_group->save();
} else {
$setting_group->title = 'app.settings.appearance';
$setting_group->save();
} }
if(!SettingGroup::find(3)) { if(!$setting_group = SettingGroup::find(3)) {
$setting_group = new SettingGroup; $setting_group = new SettingGroup;
$setting_group->id = 3; $setting_group->id = 3;
$setting_group->title = 'Miscellaneous'; $setting_group->title = 'app.settings.miscellaneous';
$setting_group->order = 2; $setting_group->order = 2;
$setting_group->save(); $setting_group->save();
} else {
$setting_group->title = 'app.settings.miscellaneous';
$setting_group->save();
} }
if($version = Setting::find(1)) { if($version = Setting::find(1)) {
$version->label = 'app.settings.version';
$version->value = config('app.version'); $version->value = config('app.version');
$version->save(); $version->save();
} else { } else {
@ -45,37 +55,45 @@ class SettingsSeeder extends Seeder
$setting->group_id = 1; $setting->group_id = 1;
$setting->key = 'version'; $setting->key = 'version';
$setting->type = 'text'; $setting->type = 'text';
$setting->label = 'Version'; $setting->label = 'app.settings.version';
$setting->value = config('app.version'); $setting->value = config('app.version');
$setting->system = true; $setting->system = true;
$setting->save(); $setting->save();
} }
if(!Setting::find(2)) { if(!$setting = Setting::find(2)) {
$setting = new Setting; $setting = new Setting;
$setting->id = 2; $setting->id = 2;
$setting->group_id = 2; $setting->group_id = 2;
$setting->key = 'background_image'; $setting->key = 'background_image';
$setting->type = 'image'; $setting->type = 'image';
$setting->label = 'Background Image'; $setting->label = 'app.settings.background_image';
$setting->save();
} else {
$setting->label = 'app.settings.background_image';
$setting->save(); $setting->save();
} }
if(!Setting::find(3)) { if(!$setting = Setting::find(3)) {
$setting = new Setting; $setting = new Setting;
$setting->id = 3; $setting->id = 3;
$setting->group_id = 3; $setting->group_id = 3;
$setting->key = 'homepage_search'; $setting->key = 'homepage_search';
$setting->type = 'boolean'; $setting->type = 'boolean';
$setting->label = 'Homepage Search'; $setting->label = 'app.settings.homepage_search';
$setting->save();
} else {
$setting->label = 'app.settings.homepage_search';
$setting->save(); $setting->save();
} }
if(!Setting::find(4)) {
$options = json_encode([ $options = json_encode([
'none' => '- not set -', 'none' => 'app.options.none',
'google' => 'Google', 'google' => 'app.options.google',
'ddg' => 'DuckDuckGo', 'ddg' => 'app.options.ddg',
'bing' => 'Bing' 'bing' => 'app.options.bing'
]); ]);
if(!$setting = Setting::find(4)) {
$setting = new Setting; $setting = new Setting;
$setting->id = 4; $setting->id = 4;
@ -83,9 +101,38 @@ class SettingsSeeder extends Seeder
$setting->key = 'search_provider'; $setting->key = 'search_provider';
$setting->type = 'select'; $setting->type = 'select';
$setting->options = $options; $setting->options = $options;
$setting->label = 'Search Provider'; $setting->label = 'app.settings.search_provider';
$setting->save();
} else {
$setting->options = $options;
$setting->label = 'app.settings.search_provider';
$setting->save();
}
$language_options = json_encode([
'de' => 'Deutsch (German)',
'en' => 'English',
'fi' => 'Suomi (Finnish)',
'fr' => 'Français (French)',
'sv' => 'Svenska (Swedish)',
'es' => 'Español (Spanish)',
]);
if($languages = Setting::find(5)) {
$languages->options = $language_options;
$languages->save();
} else {
$setting = new Setting;
$setting->id = 5;
$setting->group_id = 1;
$setting->key = 'language';
$setting->type = 'select';
$setting->label = 'app.settings.language';
$setting->options = $language_options;
$setting->value = 'en';
$setting->save(); $setting->save();
} }
} }
} }

58
resources/lang/de/app.php

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'System',
'settings.appearance' => 'Aussehen',
'settings.miscellaneous' => 'Sonstiges',
'settings.version' => 'Ausführung',
'settings.background_image' => 'Hintergrundbild',
'settings.homepage_search' => 'Homepage Suchen',
'settings.search_provider' => 'Suchanbieter',
'settings.language' => 'Sprache',
'settings.reset' => 'Zurücksetzen auf Standard zurück',
'settings.remove' => 'Entfernen',
'settings.search' => 'suche',
'settings.no_items' => 'Keine Elemente gefunden',
'settings.label' => 'Etikett',
'settings.value' => 'Wert',
'settings.edit' => 'Bearbeiten',
'settings.view' => 'Ansicht',
'options.none' => '- nicht festgelegt -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Ja',
'options.no' => 'Nein',
'buttons.save' => 'Speichern',
'buttons.cancel' => 'Abbrechen',
'buttons.add' => 'Hinzufügen',
'buttons.upload' => 'Hochladen einer Datei',
'dash.pin_item' => 'Element auf dem Dashboard anheften',
'dash.no_apps' => 'Derzeit gibt es keine angeheftete Anwendungen :link1 oder :link2',
'dash.link1' => 'Hinzufügen einer Anwendung hier',
'dash.link2' => 'Heften Sie ein Element auf dem Armaturenbrett',
'dash.pinned_items' => 'Angeheftete Elemente',
'apps.app_list' => 'Anwendungsliste',
'apps.view_trash' => 'Ansicht Papierkorb',
'apps.add_application' => 'Anwendung hinzufügen',
'apps.application_name' => 'Anwendungsname',
'apps.colour' => 'Farbe',
'apps.icon' => 'Symbol',
'apps.pinned' => 'Festgesteckt',
'apps.title' => 'Titel',
'apps.hex' => 'Hex-Farbe',
'apps.username' => 'Benutzername',
'apps.password' => 'Passwort',
'apps.config' => 'Konfig',
'url' => 'Url',
'title' => 'Titel',
'delete' => 'Löschen',
'optional' => 'Wahlweise',
'restore' => 'Wiederherstellen',
'alert.success.item_created' => 'Element erfolgreich erstellt',
'alert.success.item_updated' => 'Artikel erfolgreich aktualisiert',
'alert.success.item_deleted' => 'Element erfolgreich gelöscht',
'alert.success.item_restored' => 'Element erfolgreich wiederhergestellt',
'alert.success.setting_updated' => 'Sie haben diese Einstellung erfolgreich bearbeitet',
'alert.error.not_exist' => 'Diese Einstellung existiert nicht.',
);

78
resources/lang/en/app.php

@ -0,0 +1,78 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| App Language Lines
|--------------------------------------------------------------------------
|
*/
'settings.system' => 'System',
'settings.appearance' => 'Appearance',
'settings.miscellaneous' => 'Miscellaneous',
'settings.version' => 'Version',
'settings.background_image' => 'Background Image',
'settings.homepage_search' => 'Homepage Search',
'settings.search_provider' => 'Search Provider',
'settings.language' => 'Language',
'settings.reset' => 'Reset back to default',
'settings.remove' => 'Remove',
'settings.search' => 'search',
'settings.no_items' => 'No items found',
'settings.label' => 'Label',
'settings.value' => 'Value',
'settings.edit' => 'Edit',
'settings.view' => 'View',
'options.none' => '- not set -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Yes',
'options.no' => 'No',
'buttons.save' => 'Save',
'buttons.cancel' => 'Cancel',
'buttons.add' => 'Add',
'buttons.upload' => 'Upload a file',
'dash.pin_item' => 'Pin item to dashboard',
'dash.no_apps' => 'There are currently no pinned applications, :link1 or :link2',
'dash.link1' => 'Add an application here',
'dash.link2' => 'Pin an item to the dash',
'dash.pinned_items' => 'Pinned Items',
'apps.app_list' => 'Application list',
'apps.view_trash' => 'View trash',
'apps.add_application' => 'Add application',
'apps.application_name' => 'Application name',
'apps.colour' => 'Colour',
'apps.icon' => 'Icon',
'apps.pinned' => 'Pinned',
'apps.title' => 'Title',
'apps.hex' => 'Hex colour',
'apps.username' => 'Username',
'apps.password' => 'Password',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Title',
'delete' => 'Delete',
'optional' => 'Optional',
'restore' => 'Restore',
'alert.success.item_created' => 'Item created successfully',
'alert.success.item_updated' => 'Item updated successfully',
'alert.success.item_deleted' => 'Item deleted successfully',
'alert.success.item_restored' => 'Item restored successfully',
'alert.success.setting_updated' => 'You have successfully edited this Setting',
'alert.error.not_exist' => 'This Setting does not exist.',
];

58
resources/lang/es/app.php

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Sistema',
'settings.appearance' => 'Apariencia',
'settings.miscellaneous' => 'Miscelánea',
'settings.version' => 'Versión',
'settings.background_image' => 'Imagen De Fondo',
'settings.homepage_search' => 'Página De Inicio De Búsqueda',
'settings.search_provider' => 'Proveedor de búsqueda',
'settings.language' => 'Idioma',
'settings.reset' => 'Restablecer a predeterminado',
'settings.remove' => 'Quitar',
'settings.search' => 'búsqueda',
'settings.no_items' => 'No se encontraron elementos',
'settings.label' => 'Etiqueta',
'settings.value' => 'Valor',
'settings.edit' => 'Editar',
'settings.view' => 'Ver',
'options.none' => '- no establecido -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Sí',
'options.no' => 'No',
'buttons.save' => 'Guardar',
'buttons.cancel' => 'Cancelar',
'buttons.add' => 'Añadir',
'buttons.upload' => 'Cargar un archivo',
'dash.pin_item' => 'Pin elemento al tablero',
'dash.no_apps' => 'Actualmente no hay anclados aplicaciones :link1 o :link2',
'dash.link1' => 'Agregue una aplicación aquí',
'dash.link2' => 'Pin de un elemento en el tablero',
'dash.pinned_items' => 'Elementos Anclados',
'apps.app_list' => 'Lista de aplicaciones',
'apps.view_trash' => 'Vista de la basura',
'apps.add_application' => 'Agregar aplicación',
'apps.application_name' => 'Nombre de la aplicación',
'apps.colour' => 'Color',
'apps.icon' => 'Icono',
'apps.pinned' => 'Fijado',
'apps.title' => 'Título',
'apps.hex' => 'Hexagonal de color',
'apps.username' => 'Nombre de usuario',
'apps.password' => 'Contraseña',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Título',
'delete' => 'Borrar',
'optional' => 'Opcional',
'restore' => 'Restaurar',
'alert.success.item_created' => 'Elemento creado con éxito',
'alert.success.item_updated' => 'Artículo actualizado con éxito',
'alert.success.item_deleted' => 'Elemento eliminado correctamente',
'alert.success.item_restored' => 'Elemento restaurado con éxito',
'alert.success.setting_updated' => 'Ha editado con éxito esta configuración',
'alert.error.not_exist' => 'Esta configuración no existe.',
);

58
resources/lang/fi/app.php

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Järjestelmä',
'settings.appearance' => 'Ulkonäkö',
'settings.miscellaneous' => 'Sekalainen',
'settings.version' => 'Versio',
'settings.background_image' => 'Tausta Kuva',
'settings.homepage_search' => 'Kotisivu Haku',
'settings.search_provider' => 'Hakupalvelu',
'settings.language' => 'Kieli',
'settings.reset' => 'Palauta takaisin default',
'settings.remove' => 'Poista',
'settings.search' => 'haku',
'settings.no_items' => 'Kohteita ei löytynyt',
'settings.label' => 'Etiketti',
'settings.value' => 'Arvo',
'settings.edit' => 'Muokkaa',
'settings.view' => 'Näkymä',
'options.none' => '- ole asetettu -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Kyllä',
'options.no' => 'Ei',
'buttons.save' => 'Tallenna',
'buttons.cancel' => 'Peruuta',
'buttons.add' => 'Lisää',
'buttons.upload' => 'Lataa tiedosto',
'dash.pin_item' => 'Kiinnitä kohde kojelautaan',
'dash.no_apps' => 'Tällä hetkellä ei ole kiinnitettyjä sovelluksia :link1 tai :link2',
'dash.link1' => 'Lisää sovellus tähän',
'dash.link2' => 'Kiinnitä kohde kojelautaan',
'dash.pinned_items' => 'Kiinnitetyt Kohteet',
'apps.app_list' => 'Sovellus luettelosta',
'apps.view_trash' => 'Näytä roskakori',
'apps.add_application' => 'Lisää sovellus',
'apps.application_name' => 'Sovelluksen nimi',
'apps.colour' => 'Väri',
'apps.icon' => 'Kuvake',
'apps.pinned' => 'Puristuksiin',
'apps.title' => 'Otsikko',
'apps.hex' => 'Hex väri',
'apps.username' => 'Käyttäjätunnus',
'apps.password' => 'Salasana',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Otsikko',
'delete' => 'Poistaa',
'optional' => 'Valinnainen',
'restore' => 'Palauttaa',
'alert.success.item_created' => 'Tuote luotiin onnistuneesti',
'alert.success.item_updated' => 'Kohde on päivitetty onnistuneesti',
'alert.success.item_deleted' => 'Kohde poistettu onnistuneesti',
'alert.success.item_restored' => 'Tuote palautettiin onnistuneesti',
'alert.success.setting_updated' => 'Olet muokannut tätä asetusta',
'alert.error.not_exist' => 'Tätä asetusta ei ole olemassa.',
);

58
resources/lang/fr/app.php

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Système',
'settings.appearance' => 'Apparence',
'settings.miscellaneous' => 'Divers',
'settings.version' => 'Version',
'settings.background_image' => 'Image D\'Arrière-Plan',
'settings.homepage_search' => 'La Page D\'Accueil De Recherche',
'settings.search_provider' => 'Fournisseur de recherche',
'settings.language' => 'Langue',
'settings.reset' => 'Réinitialiser aux valeurs par défaut',
'settings.remove' => 'Supprimer',
'settings.search' => 'chercher',
'settings.no_items' => 'Pas d\'articles trouvés',
'settings.label' => 'Étiquette',
'settings.value' => 'Valeur',
'settings.edit' => 'Modifier',
'settings.view' => 'Vue',
'options.none' => '- non défini -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Oui',
'options.no' => 'Non',
'buttons.save' => 'Enregistrer',
'buttons.cancel' => 'Annuler',
'buttons.add' => 'Ajouter',
'buttons.upload' => 'Télécharger un fichier',
'dash.pin_item' => 'Épingler l\'élément au tableau de bord',
'dash.no_apps' => 'Il n\'existe actuellement aucun épinglé applications :link1 ou :link2',
'dash.link1' => 'Ajouter une application ici',
'dash.link2' => 'Pin un élément au tableau de bord',
'dash.pinned_items' => 'Éléments épinglés',
'apps.app_list' => 'Liste des applications',
'apps.view_trash' => 'Voir la corbeille',
'apps.add_application' => 'Ajouter une application',
'apps.application_name' => 'Nom de l\'application',
'apps.colour' => 'Couleur',
'apps.icon' => 'Icône',
'apps.pinned' => 'Épinglé',
'apps.title' => 'Titre',
'apps.hex' => 'Hexadécimal de la couleur',
'apps.username' => 'Nom d\'utilisateur',
'apps.password' => 'Mot de passe',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Titre',
'delete' => 'Effacer',
'optional' => 'Optionnel',
'restore' => 'Restaurer',
'alert.success.item_created' => 'Élément créé avec succès',
'alert.success.item_updated' => 'Article mis à jour avec succès',
'alert.success.item_deleted' => 'Élément supprimé avec succès',
'alert.success.item_restored' => 'Élément à restaurer avec succès',
'alert.success.setting_updated' => 'Vous avez modifié ce paramètre avec succès',
'alert.error.not_exist' => 'Ce paramètre n\'existe pas.',
);

58
resources/lang/sv/app.php

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Systemet',
'settings.appearance' => 'Utseende',
'settings.miscellaneous' => 'Övrigt',
'settings.version' => 'Version',
'settings.background_image' => 'Bakgrundsbild',
'settings.homepage_search' => 'Startsida Sök',
'settings.search_provider' => 'Sök Leverantör',
'settings.language' => 'Språk',
'settings.reset' => 'Återställ tillbaka till standard',
'settings.remove' => 'Avlägsna',
'settings.search' => 'sök',
'settings.no_items' => 'Inga poster hittades',
'settings.label' => 'Etikett',
'settings.value' => 'Värde',
'settings.edit' => 'Ändra',
'settings.view' => 'Visa',
'options.none' => '- inte sätta -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Ja',
'options.no' => 'Nej',
'buttons.save' => 'Spara',
'buttons.cancel' => 'Avbryt',
'buttons.add' => 'Lägg till',
'buttons.upload' => 'Ladda upp en fil',
'dash.pin_item' => 'Pin objekt till instrumentpanelen',
'dash.no_apps' => 'Det finns för närvarande inga fästa applikationer, :link1 eller :link2',
'dash.link1' => 'Lägg till en ansökan här',
'dash.link2' => 'Pin-ett objekt till dash',
'dash.pinned_items' => 'Fasta Objekt',
'apps.app_list' => 'Applikationslista',
'apps.view_trash' => 'Visa papperskorgen',
'apps.add_application' => 'Lägg till applikation',
'apps.application_name' => 'Ansökan namn',
'apps.colour' => 'Färg',
'apps.icon' => 'Ikonen',
'apps.pinned' => 'Nålas',
'apps.title' => 'Titel',
'apps.hex' => 'Hex-färg',
'apps.username' => 'Användarnamn',
'apps.password' => 'Lösenord',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Titel',
'delete' => 'Radera',
'optional' => 'Frivillig',
'restore' => 'Återställa',
'alert.success.item_created' => 'Objekt som skapats',
'alert.success.item_updated' => 'Föremålet uppdaterades framgångsrikt',
'alert.success.item_deleted' => 'Objekt som har tagits bort',
'alert.success.item_restored' => 'Artikeln återställdes framgångsrikt',
'alert.success.setting_updated' => 'Du har framgångsrikt redigerat denna inställning',
'alert.error.not_exist' => 'Denna inställning existerar inte.',
);

2
resources/views/add.blade.php

@ -1,4 +1,4 @@
<?php $addclass = (isset($ajax)) ? ' active' : ''; ?> <?php $addclass = (isset($ajax)) ? ' active' : ''; ?>
<section class="add-item{{ $addclass }}"> <section class="add-item{{ $addclass }}">
<a id="add-item" href="">Pin item to dash</a> <a id="add-item" href="">{{ __('app.dash.pin_item') }}</a>
</section> </section>

2
resources/views/app.blade.php

@ -15,7 +15,7 @@
<nav class="sidenav"> <nav class="sidenav">
<a class="close-sidenav" href=""><i class="fas fa-times-circle"></i></a> <a class="close-sidenav" href=""><i class="fas fa-times-circle"></i></a>
@if(isset($all_apps)) @if(isset($all_apps))
<h2>Pinned Items</h2> <h2>{{ __('app.dash.pinned_items') }}</h2>
<ul id="pinlist"> <ul id="pinlist">
@foreach($all_apps as $app) @foreach($all_apps as $app)
<?php <?php

28
resources/views/items/form.blade.php

@ -1,9 +1,9 @@
<section class="module-container"> <section class="module-container">
<header> <header>
<div class="section-title">Add application</div> <div class="section-title">{{ __('app.apps.add_application') }}</div>
<div class="module-actions"> <div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button> <button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a> <a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</header> </header>
<div class="create"> <div class="create">
@ -14,17 +14,17 @@
</div>--> </div>-->
<div class="input"> <div class="input">
<label>Application name *</label> <label>{{ __('app.apps.application_name') }} *</label>
{!! Form::text('title', null, array('placeholder' => 'Title', 'id' => 'appname', 'class' => 'form-control')) !!} {!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'id' => 'appname', 'class' => 'form-control')) !!}
<hr /> <hr />
<label>URL</label> <label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('url', null, array('placeholder' => 'Url','class' => 'form-control')) !!} {!! Form::text('url', null, array('placeholder' => __('app.url'),'class' => 'form-control')) !!}
</div> </div>
<div class="input"> <div class="input">
<label>Colour *</label> <label>{{ __('app.apps.colour') }} *</label>
{!! Form::text('colour', null, array('placeholder' => 'Hex Colour','class' => 'form-control color-picker')) !!} {!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
<hr /> <hr />
<label>Pinned</label> <label>{{ __('app.apps.pinned') }}</label>
<label class="switch"> <label class="switch">
<?php <?php
$checked = false; $checked = false;
@ -37,7 +37,7 @@
</label> </label>
</div> </div>
<div class="input"> <div class="input">
<label>Icon</label> <label>{{ __('app.apps.icon') }}</label>
<div class="icon-container"> <div class="icon-container">
<div id="appimage"> <div id="appimage">
@if(isset($item->icon) && !empty($item->icon)) @if(isset($item->icon) && !empty($item->icon))
@ -46,7 +46,7 @@
@endif @endif
</div> </div>
<div class="upload-btn-wrapper"> <div class="upload-btn-wrapper">
<button class="btn">Upload a file</button> <button class="btn">{{ __('app.buttons.upload')}} </button>
<input type="file" name="myfile" /> <input type="file" name="myfile" />
</div> </div>
</div> </div>
@ -66,8 +66,8 @@
<footer> <footer>
<div class="section-title">&nbsp;</div> <div class="section-title">&nbsp;</div>
<div class="module-actions"> <div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button> <button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a> <a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</footer> </footer>

18
resources/views/items/list.blade.php

@ -4,24 +4,24 @@
<section class="module-container"> <section class="module-container">
<header> <header>
<div class="section-title"> <div class="section-title">
Application list {{ __('app.apps.app_list') }}
@if( isset($trash) && $trash->count() > 0 ) @if( isset($trash) && $trash->count() > 0 )
<a class="trashed" href="{{ route('items.index', ['trash' => true]) }}">View trash ({{ $trash->count() }})</a> <a class="trashed" href="{{ route('items.index', ['trash' => true]) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
@endif @endif
</div> </div>
<div class="module-actions"> <div class="module-actions">
<a href="{{ route('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>Add</span></a> <a href="{{ route('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
</div> </div>
</header> </header>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th>Title</th> <th>{{ __('app.title') }}</th>
<th>Url</th> <th>{{ __('app.url') }}</th>
<th class="text-center" width="100">Edit</th> <th class="text-center" width="100">{{ __('app.settings.edit') }}</th>
<th class="text-center" width="100">Delete</th> <th class="text-center" width="100">{{ __('app.delete') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -30,7 +30,7 @@
<tr> <tr>
<td>{{ $app->title }}</td> <td>{{ $app->title }}</td>
<td><a href="{{ $app->url }}">{{ $app->url }}</a></td> <td><a href="{{ $app->url }}">{{ $app->url }}</a></td>
<td class="text-center"><a href="{!! route('items.edit', $app->id) !!}" title="Edit {!! $app->title !!}"><i class="fas fa-edit"></i></a></td> <td class="text-center"><a href="{!! route('items.edit', $app->id) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center"> <td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!} {!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<button class="link" type="submit"><i class="fa fa-trash-alt"></i></button> <button class="link" type="submit"><i class="fa fa-trash-alt"></i></button>
@ -41,7 +41,7 @@
@else @else
<tr> <tr>
<td colspan="4" class="form-error text-center"> <td colspan="4" class="form-error text-center">
<strong>No items found</strong> <strong>{{ __('app.settings.no_items') }}</strong>
</td> </td>
</tr> </tr>
@endif @endif

16
resources/views/items/trash.blade.php

@ -7,18 +7,17 @@
Showing Deleted Applications Showing Deleted Applications
</div> </div>
<div class="module-actions"> <div class="module-actions">
<a href="{{ route('items.index') }}" title="" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a> <a href="{{ route('items.index') }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</header> </header>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th>Title</th> <th>{{ __('app.title') }}</th>
<th>Description</th>
<th>Url</th> <th>Url</th>
<th class="text-center" width="100">Restore</th> <th class="text-center" width="100">{{ __('app.restore') }}</th>
<th class="text-center" width="100">Delete</th> <th class="text-center" width="100">{{ __('app.delete') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -26,9 +25,8 @@
@foreach($trash as $app) @foreach($trash as $app)
<tr> <tr>
<td>{{ $app->title }}</td> <td>{{ $app->title }}</td>
<td>{{ $app->description }}</td> <td>{{ __('app.url') }}</td>
<td>{{ $app->url }}</td> <td class="text-center"><a href="{!! route('items.restore', $app->id) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center"><a href="{!! route('items.restore', $app->id) !!}" title="Restore {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center"> <td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!} {!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<input type="hidden" name="force" value="1" /> <input type="hidden" name="force" value="1" />
@ -40,7 +38,7 @@
@else @else
<tr> <tr>
<td colspan="5" class="form-error text-center"> <td colspan="5" class="form-error text-center">
<strong>No items found</strong> <strong>{{ __('app.settings.no_items') }}</strong>
</td> </td>
</tr> </tr>
@endif @endif

10
resources/views/settings/form.blade.php

@ -1,9 +1,9 @@
<section class="module-container"> <section class="module-container">
<header> <header>
<div class="section-title">{{ $setting->label }}</div> <div class="section-title">{{ __($setting->label) }}</div>
<div class="module-actions"> <div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button> <button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a> <a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</header> </header>
<div class="create"> <div class="create">
@ -22,8 +22,8 @@
<footer> <footer>
<div class="section-title">&nbsp;</div> <div class="section-title">&nbsp;</div>
<div class="module-actions"> <div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button> <button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a> <a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</footer> </footer>

14
resources/views/settings/list.blade.php

@ -6,7 +6,7 @@
<section class="module-container"> <section class="module-container">
<header> <header>
<div class="section-title"> <div class="section-title">
{{ $group->title }} {{ __($group->title) }}
</div> </div>
</header> </header>
@ -14,22 +14,22 @@
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th>Label</th> <th>{{ __('app.settings.label') }}</th>
<th style="width: 60%;">Value</th> <th style="width: 60%;">{{ __('app.settings.value') }}</th>
<th class="text-center" style="width: 75px;">Edit</th> <th class="text-center" style="width: 75px;">{{ __('app.settings.edit') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@if (count($group->settings) > 0) @if (count($group->settings) > 0)
@foreach ($group->settings as $setting) @foreach ($group->settings as $setting)
<tr> <tr>
<td>{{ $setting->label }}</td> <td>{{ __($setting->label) }}</td>
<td> <td>
{!! $setting->list_value !!} {!! $setting->list_value !!}
</td> </td>
<td class="text-center"> <td class="text-center">
@if((bool)$setting->system !== true) @if((bool)$setting->system !== true)
<a href="{!! route('settings.edit', ['id' => $setting->id]) !!}" title="Edit {!! $setting->label !!}" class="secondary"><i class="fa fa-pencil"></i></a> <a href="{!! route('settings.edit', ['id' => $setting->id]) !!}" title="{{ __('app.settings.edit') }} {!! $setting->label !!}" class="secondary"><i class="fa fa-pencil"></i></a>
@endif @endif
</td> </td>
</tr> </tr>
@ -38,7 +38,7 @@
<tr> <tr>
<td colspan="3" class="form-error text-center"> <td colspan="3" class="form-error text-center">
<strong>No items found</strong> <strong>{{ __('app.settings.no_items') }}</strong>
</td> </td>
</tr> </tr>
@endif @endif

10
resources/views/supportedapps/nzbget.blade.php

@ -1,12 +1,12 @@
<h2>Config (optional)</h2> <h2>{{ __('app.apps.config') }} ({{ __('app.optional') }})</h2>
<div class="items"> <div class="items">
<input type="hidden" name="config[type]" value="\App\SupportedApps\Nzbget" /> <input type="hidden" name="config[type]" value="\App\SupportedApps\Nzbget" />
<div class="input"> <div class="input">
<label>Username</label> <label>{{ __('app.apps.username') }}</label>
{!! Form::text('config[username]', null, array('placeholder' => 'Username', 'class' => 'form-control')) !!} {!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'class' => 'form-control')) !!}
</div> </div>
<div class="input"> <div class="input">
<label>Password</label> <label>{{ __('app.apps.password') }}</label>
{!! Form::text('config[password]', null, array('placeholder' => 'Password', 'class' => 'form-control')) !!} {!! Form::text('config[password]', null, array('placeholder' => __('app.apps.password'), 'class' => 'form-control')) !!}
</div> </div>
</div> </div>

6
resources/views/welcome.blade.php

@ -8,7 +8,11 @@
@else @else
<div class="message-container2"> <div class="message-container2">
<div class="alert alert-danger"> <div class="alert alert-danger">
<p>There are currently no pinned Applications, <a href="{{ route('items.create') }}">Add an application here</a> or <a id="pin-item" href="">Pin an item to the dash</a></p> <p>{{ __('app.dash.no_apps',
[
'link1' => '<a href="'.route('items.create').'">'.__('app.dash.link1').'</a>',
'link2' => '<a id="pin-item" href="">'.__('app.dash.link2').'</a>'
]) }}</p>
</div> </div>
</div> </div>

Loading…
Cancel
Save