MOBILE-3325 settings: Polish interface
parent
721f7c6f36
commit
7c9d8cddbc
|
@ -1941,6 +1941,7 @@
|
|||
"core.settings.navigatoruseragent": "local_moodlemobileapp",
|
||||
"core.settings.networkstatus": "local_moodlemobileapp",
|
||||
"core.settings.opensourcelicenses": "local_moodlemobileapp",
|
||||
"core.settings.preferences": "moodle",
|
||||
"core.settings.privacypolicy": "local_moodlemobileapp",
|
||||
"core.settings.publisher": "local_moodlemobileapp",
|
||||
"core.settings.pushid": "local_moodlemobileapp",
|
||||
|
@ -1950,8 +1951,9 @@
|
|||
"core.settings.showdownloadoptions": "local_moodlemobileapp",
|
||||
"core.settings.siteinfo": "local_moodlemobileapp",
|
||||
"core.settings.sites": "moodle",
|
||||
"core.settings.sitesettings": "moodle",
|
||||
"core.settings.spaceusage": "local_moodlemobileapp",
|
||||
"core.settings.spaceusagehelp": "local_moodlemobileapp",
|
||||
"core.settings.synchelp": "local_moodlemobileapp",
|
||||
"core.settings.synchronization": "local_moodlemobileapp",
|
||||
"core.settings.synchronizenow": "local_moodlemobileapp",
|
||||
"core.settings.syncsettings": "local_moodlemobileapp",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<ion-header>
|
||||
<ion-navbar core-back-button>
|
||||
<ion-title>{{ 'addon.messages.messagepreferences' | translate }}</ion-title>
|
||||
<ion-title>{{ 'addon.messages.messages' | translate }}</ion-title>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
|
|
@ -44,7 +44,7 @@ export class AddonMessagesSettingsHandler implements CoreSettingsHandler {
|
|||
getDisplayData(): CoreSettingsHandlerData {
|
||||
return {
|
||||
icon: 'chatbubbles',
|
||||
title: 'addon.messages.messagepreferences',
|
||||
title: 'addon.messages.messages',
|
||||
page: 'AddonMessagesSettingsPage',
|
||||
class: 'addon-messages-settings-handler'
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<ion-header>
|
||||
<ion-navbar core-back-button>
|
||||
<ion-title>{{ 'addon.notifications.notificationpreferences' | translate }}</ion-title>
|
||||
<ion-title>{{ 'addon.notifications.notifications' | translate }}</ion-title>
|
||||
<ion-buttons end>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
|
|
|
@ -49,7 +49,7 @@ export class AddonNotificationsSettingsHandler implements CoreSettingsHandler {
|
|||
getDisplayData(): CoreSettingsHandlerData {
|
||||
return {
|
||||
icon: 'notifications',
|
||||
title: 'addon.notifications.notificationpreferences',
|
||||
title: 'addon.notifications.notifications',
|
||||
page: 'AddonNotificationsSettingsPage',
|
||||
class: 'addon-notifications-settings-handler'
|
||||
};
|
||||
|
|
|
@ -106,6 +106,9 @@ ion-app.app-root {
|
|||
.item h2 {
|
||||
text-overflow: inherit;
|
||||
overflow: inherit;
|
||||
ion-icon, core-icon {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.core-nav-item-selected, .item.core-nav-item-selected {
|
||||
|
|
|
@ -1941,6 +1941,7 @@
|
|||
"core.settings.navigatoruseragent": "Navigator userAgent",
|
||||
"core.settings.networkstatus": "Internet connection status",
|
||||
"core.settings.opensourcelicenses": "Open Source Licences",
|
||||
"core.settings.preferences": "Preferences",
|
||||
"core.settings.privacypolicy": "Privacy policy",
|
||||
"core.settings.publisher": "Publisher",
|
||||
"core.settings.pushid": "Push notifications ID",
|
||||
|
@ -1950,8 +1951,9 @@
|
|||
"core.settings.showdownloadoptions": "Show download options",
|
||||
"core.settings.siteinfo": "Site info",
|
||||
"core.settings.sites": "Sites",
|
||||
"core.settings.sitesettings": "Site settings",
|
||||
"core.settings.spaceusage": "Space usage",
|
||||
"core.settings.spaceusagehelp": "Deleting the stored information of the site will remove all the site offline data. This information allows you to use the app when offline. ",
|
||||
"core.settings.synchelp": "Synchronising a site will send pending changes and all offline activity stored in the device and will synchronise some data like messages and notifications.",
|
||||
"core.settings.synchronization": "Synchronisation",
|
||||
"core.settings.synchronizenow": "Synchronise now",
|
||||
"core.settings.syncsettings": "Synchronisation settings",
|
||||
|
@ -2079,4 +2081,4 @@
|
|||
"core.yes": "Yes",
|
||||
"core.youreoffline": "You are offline",
|
||||
"core.youreonline": "You are back online"
|
||||
}
|
||||
}
|
|
@ -39,17 +39,20 @@
|
|||
<ion-icon name="help-buoy" item-start aria-hidden="true"></ion-icon>
|
||||
<h2>{{ 'core.mainmenu.help' | translate }}</h2>
|
||||
</a>
|
||||
<a ion-item (click)="openSiteSettings()" title="{{ 'core.settings.sitesettings' | translate }}">
|
||||
<core-icon name="fa-cog" item-start></core-icon>
|
||||
<h2>{{ 'core.settings.sitesettings' | translate }}</h2>
|
||||
<a ion-item (click)="openSitePreferences()" title="{{ 'core.settings.preferences' | translate }}">
|
||||
<core-icon name="fa-wrench" item-start></core-icon>
|
||||
<h2>{{ 'core.settings.preferences' | translate }}</h2>
|
||||
</a>
|
||||
<a ion-item (click)="logout()" title="{{ logoutLabel | translate }}">
|
||||
<ion-icon name="log-out" item-start aria-hidden="true"></ion-icon>
|
||||
<h2>{{ logoutLabel | translate }}</h2>
|
||||
</a>
|
||||
<ion-item-divider></ion-item-divider>
|
||||
|
||||
<a ion-item (click)="openAppSettings()" title="{{ 'core.settings.appsettings' | translate }}">
|
||||
<core-icon name="fa-cogs" item-start></core-icon>
|
||||
<h2>{{ 'core.settings.appsettings' | translate }}</h2>
|
||||
</a>
|
||||
<a ion-item (click)="logout()" title="{{ logoutLabel | translate }}">
|
||||
<ion-icon name="log-out" item-start aria-hidden="true"></ion-icon>
|
||||
<h2>{{ logoutLabel | translate }}</h2>
|
||||
</a>
|
||||
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
|
|
|
@ -151,8 +151,8 @@ export class CoreMainMenuMorePage implements OnDestroy {
|
|||
/**
|
||||
* Open site settings page.
|
||||
*/
|
||||
openSiteSettings(): void {
|
||||
this.navCtrl.push('CoreSiteSettingsPage');
|
||||
openSitePreferences(): void {
|
||||
this.navCtrl.push('CoreSitePreferencesPage');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,11 +57,13 @@
|
|||
"entriesincache": "{{$a}} entries in cache",
|
||||
"screen": "Screen information",
|
||||
"settings": "Settings",
|
||||
"sitesettings": "Site settings",
|
||||
"preferences": "Preferences",
|
||||
"showdownloadoptions": "Show download options",
|
||||
"siteinfo": "Site info",
|
||||
"sites": "Sites",
|
||||
"spaceusage": "Space usage",
|
||||
"spaceusagehelp": "Deleting the stored information of the site will remove all the site offline data. This information allows you to use the app when offline. ",
|
||||
"synchelp": "Synchronising a site will send pending changes and all offline activity stored in the device and will synchronise some data like messages and notifications.",
|
||||
"synchronization": "Synchronisation",
|
||||
"synchronizenow": "Synchronise now",
|
||||
"syncsettings": "Synchronisation settings",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<ion-header>
|
||||
<ion-navbar core-back-button>
|
||||
<ion-title>{{ 'core.settings.sitesettings' | translate}}</ion-title>
|
||||
<ion-title>{{ 'core.settings.preferences' | translate}}</ion-title>
|
||||
<ion-buttons end>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
|
@ -18,23 +18,6 @@
|
|||
<ion-note class="core-note-block">{{ siteUrl }}</ion-note>
|
||||
</ion-item>
|
||||
<ion-item-divider></ion-item-divider>
|
||||
<ion-item text-wrap *ngIf="spaceUsage">
|
||||
<ion-icon name="stats" item-start></ion-icon>
|
||||
<h2 text-wrap>{{ 'core.settings.spaceusage' | translate }}</h2>
|
||||
<p *ngIf="spaceUsage.spaceUsage != null">{{ spaceUsage.spaceUsage | coreBytesToSize }}</p>
|
||||
<p *ngIf="spaceUsage.cacheEntries != null">{{ 'core.settings.entriesincache' | translate: { $a: spaceUsage.cacheEntries } }}</p>
|
||||
<button ion-button icon-only clear color="danger" item-end (click)="deleteSiteStorage()" [hidden]="!spaceUsage.spaceUsage > '0' && !spaceUsage.cacheEntries > '0'" [attr.aria-label]="'core.settings.deletesitefilestitle' | translate">
|
||||
<ion-icon name="trash"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
<ion-item text-wrap>
|
||||
<ion-icon name="sync" item-start></ion-icon>
|
||||
<h2>{{ 'core.settings.synchronization' | translate }}</h2>
|
||||
<button ion-button icon-only clear item-end *ngIf="!isSynchronizing()" (click)="synchronize()" [title]="siteName" [attr.aria-label]="'core.settings.synchronizenow' | translate">
|
||||
<ion-icon name="sync"></ion-icon>
|
||||
</button>
|
||||
<ion-spinner item-end *ngIf="isSynchronizing()"></ion-spinner>
|
||||
</ion-item>
|
||||
<a ion-item *ngIf="isIOS" (click)="openHandler('CoreSharedFilesListPage', {manage: true, siteId: siteId, hideSitePicker: true})" [title]="'core.sharedfiles.sharedfiles' | translate" [class.core-split-item-selected]="'CoreSharedFilesListPage' == selectedPage" detail-push>
|
||||
<ion-icon name="folder" item-start></ion-icon>
|
||||
<h2>{{ 'core.sharedfiles.sharedfiles' | translate }}</h2>
|
||||
|
@ -45,6 +28,24 @@
|
|||
<core-icon [name]="handler.icon" item-start *ngIf="handler.icon"></core-icon>
|
||||
<h2>{{ handler.title | translate}}</h2>
|
||||
</a>
|
||||
|
||||
<ion-card class="with-borders">
|
||||
<ion-item text-wrap *ngIf="spaceUsage">
|
||||
<h2 text-wrap>{{ 'core.settings.spaceusage' | translate }} <ion-icon name="information-circle" color="info" [attr.aria-label]="'core.info' | translate" (click)="showSpaceInfo()"></ion-icon></h2>
|
||||
<p *ngIf="spaceUsage.spaceUsage != null">{{ spaceUsage.spaceUsage | coreBytesToSize }}</p>
|
||||
<p *ngIf="spaceUsage.cacheEntries != null">{{ 'core.settings.entriesincache' | translate: { $a: spaceUsage.cacheEntries } }}</p>
|
||||
<button ion-button icon-only clear color="danger" item-end (click)="deleteSiteStorage()" [hidden]="!spaceUsage.spaceUsage > '0' && !spaceUsage.cacheEntries > '0'" [attr.aria-label]="'core.settings.deletesitefilestitle' | translate">
|
||||
<ion-icon name="trash"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
<ion-item text-wrap>
|
||||
<h2>{{ 'core.settings.synchronizenow' | translate }} <ion-icon name="information-circle" color="info" [attr.aria-label]="'core.info' | translate" (click)="showSyncInfo()"></ion-icon></h2>
|
||||
<button ion-button icon-only clear item-end *ngIf="!isSynchronizing()" (click)="synchronize()" [title]="siteName" [attr.aria-label]="'core.settings.synchronizenow' | translate">
|
||||
<ion-icon name="sync"></ion-icon>
|
||||
</button>
|
||||
<ion-spinner item-end *ngIf="isSynchronizing()"></ion-spinner>
|
||||
</ion-item>
|
||||
</ion-card>
|
||||
</ion-list>
|
||||
</core-loading>
|
||||
</ion-content>
|
||||
|
|
|
@ -15,21 +15,21 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CoreSiteSettingsPage } from './site';
|
||||
import { CoreSitePreferencesPage } from './site';
|
||||
import { CoreComponentsModule } from '@components/components.module';
|
||||
import { CoreDirectivesModule } from '@directives/directives.module';
|
||||
import { CorePipesModule } from '@pipes/pipes.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreSiteSettingsPage
|
||||
CoreSitePreferencesPage
|
||||
],
|
||||
imports: [
|
||||
CoreComponentsModule,
|
||||
CoreDirectivesModule,
|
||||
CorePipesModule,
|
||||
IonicPageModule.forChild(CoreSiteSettingsPage),
|
||||
IonicPageModule.forChild(CoreSitePreferencesPage),
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
})
|
||||
export class CoreSiteSettingsPageModule {}
|
||||
export class CoreSitePreferencesPageModule {}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { IonicPage, NavParams, Platform } from 'ionic-angular';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreSettingsDelegate, CoreSettingsHandlerData } from '../../providers/delegate';
|
||||
import { CoreEventsProvider } from '@providers/events';
|
||||
import { CoreSitesProvider, CoreSiteBasicInfo } from '@providers/sites';
|
||||
|
@ -25,12 +26,12 @@ import { CoreSettingsHelper, CoreSiteSpaceUsage } from '../../providers/helper';
|
|||
/**
|
||||
* Page that displays the list of site settings pages.
|
||||
*/
|
||||
@IonicPage({segment: 'core-settings-site'})
|
||||
@IonicPage({segment: 'core-site-preferences'})
|
||||
@Component({
|
||||
selector: 'page-core-settings-site',
|
||||
selector: 'page-core-site-preferences',
|
||||
templateUrl: 'site.html',
|
||||
})
|
||||
export class CoreSiteSettingsPage {
|
||||
export class CoreSitePreferencesPage {
|
||||
@ViewChild(CoreSplitViewComponent) splitviewCtrl: CoreSplitViewComponent;
|
||||
|
||||
handlers: CoreSettingsHandlerData[];
|
||||
|
@ -55,6 +56,7 @@ export class CoreSiteSettingsPage {
|
|||
protected domUtils: CoreDomUtilsProvider,
|
||||
protected eventsProvider: CoreEventsProvider,
|
||||
protected sharedFilesProvider: CoreSharedFilesProvider,
|
||||
protected translate: TranslateService,
|
||||
platorm: Platform,
|
||||
navParams: NavParams) {
|
||||
|
||||
|
@ -75,11 +77,17 @@ export class CoreSiteSettingsPage {
|
|||
ionViewDidLoad(): void {
|
||||
this.fetchData().finally(() => {
|
||||
this.loaded = true;
|
||||
});
|
||||
|
||||
if (this.selectedPage) {
|
||||
this.openHandler(this.selectedPage);
|
||||
}
|
||||
if (this.selectedPage) {
|
||||
this.openHandler(this.selectedPage);
|
||||
} else if (this.splitviewCtrl.isOn()) {
|
||||
if (this.isIOS) {
|
||||
this.openHandler('CoreSharedFilesListPage', {manage: true, siteId: this.siteId, hideSitePicker: true});
|
||||
} else if (this.handlers.length > 0) {
|
||||
this.openHandler(this.handlers[0].page, this.handlers[0].params);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,6 +173,22 @@ export class CoreSiteSettingsPage {
|
|||
this.splitviewCtrl.push(page, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show information about space usage actions.
|
||||
*/
|
||||
showSpaceInfo(): void {
|
||||
this.domUtils.showAlert(this.translate.instant('core.help'),
|
||||
this.translate.instant('core.settings.spaceusagehelp'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show information about sync actions.
|
||||
*/
|
||||
showSyncInfo(): void {
|
||||
this.domUtils.showAlert(this.translate.instant('core.help'),
|
||||
this.translate.instant('core.settings.synchelp'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Page destroyed.
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
<ion-header>
|
||||
<ion-navbar core-back-button>
|
||||
<ion-title>{{ 'core.settings.spaceusage' | translate }}</ion-title>
|
||||
<ion-buttons end>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
<core-navbar-buttons>
|
||||
<button ion-button icon-only (click)="showInfo()" [attr.aria-label]="'core.info' | translate">
|
||||
<ion-icon name="information-circle"></ion-icon>
|
||||
</button>
|
||||
</core-navbar-buttons>
|
||||
<ion-content>
|
||||
<ion-refresher [enabled]="loaded" (ionRefresh)="refreshData($event)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
import { Component, } from '@angular/core';
|
||||
import { IonicPage } from 'ionic-angular';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreSitesProvider, CoreSiteBasicInfo } from '@providers/sites';
|
||||
import { CoreDomUtilsProvider } from '@providers/utils/dom';
|
||||
import { CoreSettingsHelper, CoreSiteSpaceUsage } from '../../providers/helper';
|
||||
|
||||
/**
|
||||
|
@ -36,7 +38,9 @@ export class CoreSettingsSpaceUsagePage {
|
|||
};
|
||||
|
||||
constructor(protected sitesProvider: CoreSitesProvider,
|
||||
protected settingsHelper: CoreSettingsHelper) {
|
||||
protected settingsHelper: CoreSettingsHelper,
|
||||
protected domUtils: CoreDomUtilsProvider,
|
||||
protected translate: TranslateService) {
|
||||
this.currentSiteId = this.sitesProvider.getCurrentSiteId();
|
||||
}
|
||||
|
||||
|
@ -104,6 +108,14 @@ export class CoreSettingsSpaceUsagePage {
|
|||
// Ignore cancelled confirmation modal.
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Show information about space usage actions.
|
||||
*/
|
||||
showInfo(): void {
|
||||
this.domUtils.showAlert(this.translate.instant('core.help'),
|
||||
this.translate.instant('core.settings.spaceusagehelp'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
<ion-header>
|
||||
<ion-navbar core-back-button>
|
||||
<ion-title>{{ 'core.settings.synchronization' | translate }}</ion-title>
|
||||
<ion-buttons end>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
<core-navbar-buttons>
|
||||
<button ion-button icon-only (click)="showInfo()" [attr.aria-label]="'core.info' | translate">
|
||||
<ion-icon name="information-circle"></ion-icon>
|
||||
</button>
|
||||
</core-navbar-buttons>
|
||||
<ion-content>
|
||||
<core-loading [hideUntil]="sitesLoaded">
|
||||
<ion-item-divider>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { IonicPage } from 'ionic-angular';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreConstants } from '@core/constants';
|
||||
import { CoreEventsProvider } from '@providers/events';
|
||||
import { CoreSitesProvider, CoreSiteBasicInfo } from '@providers/sites';
|
||||
|
@ -42,7 +43,8 @@ export class CoreSettingsSynchronizationPage implements OnDestroy {
|
|||
protected eventsProvider: CoreEventsProvider,
|
||||
protected sitesProvider: CoreSitesProvider,
|
||||
protected domUtils: CoreDomUtilsProvider,
|
||||
protected settingsHelper: CoreSettingsHelper) {
|
||||
protected settingsHelper: CoreSettingsHelper,
|
||||
protected translate: TranslateService) {
|
||||
|
||||
this.currentSiteId = this.sitesProvider.getCurrentSiteId();
|
||||
|
||||
|
@ -106,6 +108,14 @@ export class CoreSettingsSynchronizationPage implements OnDestroy {
|
|||
return !!this.settingsHelper.getSiteSyncPromise(siteId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show information about sync actions.
|
||||
*/
|
||||
showInfo(): void {
|
||||
this.domUtils.showAlert(this.translate.instant('core.help'),
|
||||
this.translate.instant('core.settings.synchelp'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Page destroyed.
|
||||
*/
|
||||
|
|
|
@ -28,7 +28,6 @@ import { CoreDomUtilsProvider } from '@providers/utils/dom';
|
|||
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||
import { CoreConfigConstants } from '../../../configconstants';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreSite } from '@classes/site';
|
||||
|
||||
/**
|
||||
* Object with space usage and cache entries that can be erased.
|
||||
|
@ -107,7 +106,7 @@ export class CoreSettingsHelper {
|
|||
}).then((site) => {
|
||||
|
||||
// Clear cache tables.
|
||||
const cleanSchemas = this.sitesProvider.getSiteTableSchemasToClear();
|
||||
const cleanSchemas = this.sitesProvider.getSiteTableSchemasToClear(site);
|
||||
const promises = cleanSchemas.map((name) => {
|
||||
return site.getDb().deleteRecords(name);
|
||||
});
|
||||
|
@ -182,7 +181,7 @@ export class CoreSettingsHelper {
|
|||
* @return If there are rows to delete or not.
|
||||
*/
|
||||
protected async calcSiteClearRows(site: CoreSite): Promise<number> {
|
||||
const clearTables = this.sitesProvider.getSiteTableSchemasToClear();
|
||||
const clearTables = this.sitesProvider.getSiteTableSchemasToClear(site);
|
||||
|
||||
let totalEntries = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue