From 762b048806c02d995aff0c023b14cf92c3b2cff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 25 Oct 2018 14:57:13 +0200 Subject: [PATCH 1/2] MOBILE-2686 recentlyaccesseditems: Add Recent Accessed items block --- scripts/langindex.json | 2 + .../components/components.module.ts | 45 ++++++++++ .../addon-block-recentlyaccesseditems.html | 15 ++++ .../recentlyaccesseditems.ts | 90 +++++++++++++++++++ .../block/recentlyaccesseditems/lang/en.json | 4 + .../providers/block-handler.ts | 50 +++++++++++ .../providers/recentlyaccesseditems.ts | 71 +++++++++++++++ .../recentlyaccesseditems.module.ts | 42 +++++++++ src/app/app.module.ts | 2 + src/assets/lang/en.json | 4 +- 10 files changed, 324 insertions(+), 1 deletion(-) create mode 100644 src/addon/block/recentlyaccesseditems/components/components.module.ts create mode 100644 src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html create mode 100644 src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts create mode 100644 src/addon/block/recentlyaccesseditems/lang/en.json create mode 100644 src/addon/block/recentlyaccesseditems/providers/block-handler.ts create mode 100644 src/addon/block/recentlyaccesseditems/providers/recentlyaccesseditems.ts create mode 100644 src/addon/block/recentlyaccesseditems/recentlyaccesseditems.module.ts diff --git a/scripts/langindex.json b/scripts/langindex.json index e8a39aa49..a20b51ddd 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -24,6 +24,8 @@ "addon.block_myoverview.title": "block_myoverview", "addon.block_recentlyaccessedcourses.nocourses": "block_recentlyaccessedcourses", "addon.block_recentlyaccessedcourses.pluginname": "block_recentlyaccessedcourses", + "addon.block_recentlyaccesseditems.noitems": "block_recentlyaccesseditems", + "addon.block_recentlyaccesseditems.pluginname": "block_recentlyaccesseditems", "addon.block_sitemainmenu.pluginname": "block_site_main_menu", "addon.block_timeline.duedate": "block_timeline", "addon.block_timeline.next30days": "block_timeline", diff --git a/src/addon/block/recentlyaccesseditems/components/components.module.ts b/src/addon/block/recentlyaccesseditems/components/components.module.ts new file mode 100644 index 000000000..1ce6d5557 --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/components/components.module.ts @@ -0,0 +1,45 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { IonicModule } from 'ionic-angular'; +import { TranslateModule } from '@ngx-translate/core'; +import { AddonBlockRecentlyAccessedItemsComponent } from './recentlyaccesseditems/recentlyaccesseditems'; +import { CoreComponentsModule } from '@components/components.module'; +import { CoreDirectivesModule } from '@directives/directives.module'; +import { CoreCourseComponentsModule } from '@core/course/components/components.module'; + +@NgModule({ + declarations: [ + AddonBlockRecentlyAccessedItemsComponent + ], + imports: [ + CommonModule, + IonicModule, + TranslateModule.forChild(), + CoreComponentsModule, + CoreDirectivesModule, + CoreCourseComponentsModule + ], + providers: [ + ], + exports: [ + AddonBlockRecentlyAccessedItemsComponent + ], + entryComponents: [ + AddonBlockRecentlyAccessedItemsComponent + ] +}) +export class AddonBlockRecentlyAccessedItemsComponentsModule {} diff --git a/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html new file mode 100644 index 000000000..5b514dc86 --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html @@ -0,0 +1,15 @@ + +

{{ 'addon.block_recentlyaccesseditems.pluginname' | translate }}

+
+ + + + +

+

+
+
+ + + +
diff --git a/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts new file mode 100644 index 000000000..e1c9bf372 --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.ts @@ -0,0 +1,90 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Component, OnInit, Injector, Optional } from '@angular/core'; +import { NavController } from 'ionic-angular'; +import { CoreSitesProvider } from '@providers/sites'; +import { CoreBlockBaseComponent } from '@core/block/classes/base-block-component'; +import { AddonBlockRecentlyAccessedItemsProvider } from '../../providers/recentlyaccesseditems'; +import { CoreTextUtilsProvider } from '@providers/utils/text'; +import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper'; + +/** + * Component to render a recently accessed items block. + */ +@Component({ + selector: 'addon-block-recentlyaccesseditems', + templateUrl: 'addon-block-recentlyaccesseditems.html' +}) +export class AddonBlockRecentlyAccessedItemsComponent extends CoreBlockBaseComponent implements OnInit { + items = []; + + protected fetchContentDefaultError = 'Error getting recently accessed items data.'; + + constructor(injector: Injector, @Optional() private navCtrl: NavController, + private sitesProvider: CoreSitesProvider, private textUtils: CoreTextUtilsProvider, + private recentItemsProvider: AddonBlockRecentlyAccessedItemsProvider, + private contentLinksHelper: CoreContentLinksHelperProvider) { + + super(injector, 'AddonBlockRecentlyAccessedItemsComponent'); + } + + /** + * Component being initialized. + */ + ngOnInit(): void { + super.ngOnInit(); + } + + /** + * Perform the invalidate content function. + * + * @return {Promise} Resolved when done. + */ + protected invalidateContent(): Promise { + return this.recentItemsProvider.invalidateRecentItems(); + } + + /** + * Fetch the data to render the block. + * + * @return {Promise} Promise resolved when done. + */ + protected fetchContent(): Promise { + return this.recentItemsProvider.getRecentItems().then((items) => { + this.items = items; + }); + } + + /** + * Event clicked. + * + * @param {Event} e Click event. + * @param {any} item Activity item info. + */ + action(e: Event, item: any): void { + e.preventDefault(); + e.stopPropagation(); + + const url = this.textUtils.decodeHTMLEntities(item.viewurl); + const modal = this.domUtils.showModalLoading(); + this.contentLinksHelper.handleLink(url, undefined, this.navCtrl).then((treated) => { + if (!treated) { + return this.sitesProvider.getCurrentSite().openInBrowserWithAutoLoginIfSameSite(url); + } + }).finally(() => { + modal.dismiss(); + }); + } +} diff --git a/src/addon/block/recentlyaccesseditems/lang/en.json b/src/addon/block/recentlyaccesseditems/lang/en.json new file mode 100644 index 000000000..47311d281 --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/lang/en.json @@ -0,0 +1,4 @@ +{ + "noitems": "No recent items", + "pluginname": "Recently accessed items" +} diff --git a/src/addon/block/recentlyaccesseditems/providers/block-handler.ts b/src/addon/block/recentlyaccesseditems/providers/block-handler.ts new file mode 100644 index 000000000..2963017e8 --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/providers/block-handler.ts @@ -0,0 +1,50 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable, Injector } from '@angular/core'; +import { CoreBlockHandlerData } from '@core/block/providers/delegate'; +import { AddonBlockRecentlyAccessedItemsComponent } from '../components/recentlyaccesseditems/recentlyaccesseditems'; +import { CoreBlockBaseHandler } from '@core/block/classes/base-block-handler'; + +/** + * Block handler. + */ +@Injectable() +export class AddonBlockRecentlyAccessedItemsHandler extends CoreBlockBaseHandler { + name = 'AddonBlockRecentlyAccessedItems'; + blockName = 'recentlyaccesseditems'; + + constructor() { + super(); + } + + /** + * Returns the data needed to render the block. + * + * @param {Injector} injector Injector. + * @param {any} block The block to render. + * @param {string} contextLevel The context where the block will be used. + * @param {number} instanceId The instance ID associated with the context level. + * @return {CoreBlockHandlerData|Promise} Data or promise resolved with the data. + */ + getDisplayData?(injector: Injector, block: any, contextLevel: string, instanceId: number) + : CoreBlockHandlerData | Promise { + + return { + title: 'addon.block_recentlyaccesseditems.pluginname', + class: 'addon-block-recentlyaccesseditems', + component: AddonBlockRecentlyAccessedItemsComponent + }; + } +} diff --git a/src/addon/block/recentlyaccesseditems/providers/recentlyaccesseditems.ts b/src/addon/block/recentlyaccesseditems/providers/recentlyaccesseditems.ts new file mode 100644 index 000000000..e20e41b1f --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/providers/recentlyaccesseditems.ts @@ -0,0 +1,71 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { CoreSitesProvider } from '@providers/sites'; +import { CoreCourseProvider } from '@core/course/providers/course'; + +/** + * Service that provides some features regarding recently accessed items. + */ +@Injectable() +export class AddonBlockRecentlyAccessedItemsProvider { + protected ROOT_CACHE_KEY = 'AddonBlockRecentlyAccessedItems:'; + + constructor(private sitesProvider: CoreSitesProvider, private courseProvider: CoreCourseProvider) { } + + /** + * Get cache key for get last accessed items value WS call. + * + * @return {string} Cache key. + */ + protected getRecentItemsCacheKey(): string { + return this.ROOT_CACHE_KEY + ':recentitems'; + } + + /** + * Get last accessed items. + * + * @param {string} [siteId] Site ID. If not defined, use current site. + * @return {Promise} Promise resolved when the info is retrieved. + */ + getRecentItems(siteId?: string): Promise { + + return this.sitesProvider.getSite(siteId).then((site) => { + const preSets = { + cacheKey: this.getRecentItemsCacheKey() + }; + + return site.read('block_recentlyaccesseditems_get_recent_items', undefined, preSets).then((items) => { + return items.map((item) => { + item.iconUrl = this.courseProvider.getModuleIconSrc(item.modname); + + return item; + }); + }); + }); + } + + /** + * Invalidates get last accessed items WS call. + * + * @param {string} [siteId] Site ID to invalidate. If not defined, use current site. + * @return {Promise} Promise resolved when the data is invalidated. + */ + invalidateRecentItems(siteId?: string): Promise { + return this.sitesProvider.getSite(siteId).then((site) => { + return site.invalidateWsCacheForKey(this.getRecentItemsCacheKey()); + }); + } +} diff --git a/src/addon/block/recentlyaccesseditems/recentlyaccesseditems.module.ts b/src/addon/block/recentlyaccesseditems/recentlyaccesseditems.module.ts new file mode 100644 index 000000000..5df77fe5f --- /dev/null +++ b/src/addon/block/recentlyaccesseditems/recentlyaccesseditems.module.ts @@ -0,0 +1,42 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { NgModule } from '@angular/core'; +import { IonicModule } from 'ionic-angular'; +import { TranslateModule } from '@ngx-translate/core'; +import { AddonBlockRecentlyAccessedItemsComponentsModule } from './components/components.module'; +import { CoreBlockDelegate } from '@core/block/providers/delegate'; +import { AddonBlockRecentlyAccessedItemsHandler } from './providers/block-handler'; +import { AddonBlockRecentlyAccessedItemsProvider } from './providers/recentlyaccesseditems'; + +@NgModule({ + declarations: [ + ], + imports: [ + IonicModule, + AddonBlockRecentlyAccessedItemsComponentsModule, + TranslateModule.forChild() + ], + exports: [ + ], + providers: [ + AddonBlockRecentlyAccessedItemsHandler, + AddonBlockRecentlyAccessedItemsProvider + ] +}) +export class AddonBlockRecentlyAccessedItemsModule { + constructor(blockDelegate: CoreBlockDelegate, blockHandler: AddonBlockRecentlyAccessedItemsHandler) { + blockDelegate.registerHandler(blockHandler); + } +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d54c8dfe3..ca4cd023b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -89,6 +89,7 @@ import { AddonBlockMyOverviewModule } from '@addon/block/myoverview/myoverview.m import { AddonBlockSiteMainMenuModule } from '@addon/block/sitemainmenu/sitemainmenu.module'; import { AddonBlockTimelineModule } from '@addon/block/timeline/timeline.module'; import { AddonBlockRecentlyAccessedCoursesModule } from '@addon/block/recentlyaccessedcourses/recentlyaccessedcourses.module'; +import { AddonBlockRecentlyAccessedItemsModule } from '@addon/block/recentlyaccesseditems/recentlyaccesseditems.module'; import { AddonModAssignModule } from '@addon/mod/assign/assign.module'; import { AddonModBookModule } from '@addon/mod/book/book.module'; import { AddonModChatModule } from '@addon/mod/chat/chat.module'; @@ -204,6 +205,7 @@ export const CORE_PROVIDERS: any[] = [ AddonBlockSiteMainMenuModule, AddonBlockTimelineModule, AddonBlockRecentlyAccessedCoursesModule, + AddonBlockRecentlyAccessedItemsModule, AddonModAssignModule, AddonModBookModule, AddonModChatModule, diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index ba1ffd309..7de748385 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -24,6 +24,8 @@ "addon.block_myoverview.title": "Title", "addon.block_recentlyaccessedcourses.nocourses": "No recent courses", "addon.block_recentlyaccessedcourses.pluginname": "Recently accessed courses", + "addon.block_recentlyaccesseditems.noitems": "No recent items", + "addon.block_recentlyaccesseditems.pluginname": "Recently accessed items", "addon.block_sitemainmenu.pluginname": "Main menu", "addon.block_timeline.duedate": "Due date", "addon.block_timeline.next30days": "Next 30 days", @@ -1647,4 +1649,4 @@ "core.year": "year", "core.years": "years", "core.yes": "Yes" -} \ No newline at end of file +} From ab6daba09d78fdc64c8e5378fc9d922308e3fa16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 26 Oct 2018 12:34:37 +0200 Subject: [PATCH 2/2] MOBILE-2686 lang: Fix some strings --- scripts/langindex.json | 42 ++++++++++++------------- src/addon/block/myoverview/lang/en.json | 4 +-- src/addon/coursecompletion/lang/en.json | 4 +-- src/assets/lang/en.json | 14 ++++----- src/core/login/lang/en.json | 12 +++---- src/core/mainmenu/lang/en.json | 2 -- src/core/settings/lang/en.json | 2 +- src/lang/en.json | 16 +++++----- 8 files changed, 45 insertions(+), 51 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index a20b51ddd..a10ce8493 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -104,24 +104,24 @@ "addon.competency.xcompetenciesproficientoutofyincourse": "tool_lp", "addon.coursecompletion.complete": "local_moodlemobileapp", "addon.coursecompletion.completecourse": "block_selfcompletion", - "addon.coursecompletion.completed": "local_moodlemobileapp", - "addon.coursecompletion.completiondate": "local_moodlemobileapp", + "addon.coursecompletion.completed": "completion", + "addon.coursecompletion.completiondate": "report_completion", "addon.coursecompletion.completionmenuitem": "completion", "addon.coursecompletion.couldnotloadreport": "local_moodlemobileapp", - "addon.coursecompletion.coursecompletion": "local_moodlemobileapp", - "addon.coursecompletion.criteria": "local_moodlemobileapp", - "addon.coursecompletion.criteriagroup": "local_moodlemobileapp", - "addon.coursecompletion.criteriarequiredall": "local_moodlemobileapp", - "addon.coursecompletion.criteriarequiredany": "local_moodlemobileapp", - "addon.coursecompletion.inprogress": "local_moodlemobileapp", - "addon.coursecompletion.manualselfcompletion": "local_moodlemobileapp", - "addon.coursecompletion.notyetstarted": "local_moodlemobileapp", - "addon.coursecompletion.pending": "local_moodlemobileapp", + "addon.coursecompletion.coursecompletion": "completion", + "addon.coursecompletion.criteria": "completion", + "addon.coursecompletion.criteriagroup": "completion", + "addon.coursecompletion.criteriarequiredall": "completion", + "addon.coursecompletion.criteriarequiredany": "completion", + "addon.coursecompletion.inprogress": "completion", + "addon.coursecompletion.manualselfcompletion": "completion", + "addon.coursecompletion.notyetstarted": "completion", + "addon.coursecompletion.pending": "completion", "addon.coursecompletion.required": "local_moodlemobileapp", - "addon.coursecompletion.requiredcriteria": "local_moodlemobileapp", - "addon.coursecompletion.requirement": "local_moodlemobileapp", + "addon.coursecompletion.requiredcriteria": "completion", + "addon.coursecompletion.requirement": "block_completionstatus", "addon.coursecompletion.status": "local_moodlemobileapp", - "addon.coursecompletion.viewcoursereport": "local_moodlemobileapp", + "addon.coursecompletion.viewcoursereport": "completion", "addon.files.couldnotloadfiles": "local_moodlemobileapp", "addon.files.emptyfilelist": "local_moodlemobileapp", "addon.files.erroruploadnotworking": "local_moodlemobileapp", @@ -1325,7 +1325,7 @@ "core.login.createaccount": "moodle", "core.login.createuserandpass": "moodle", "core.login.credentialsdescription": "local_moodlemobileapp", - "core.login.emailconfirmsent": "local_moodlemobileapp", + "core.login.emailconfirmsent": "moodle", "core.login.emailnotmatch": "local_moodlemobileapp", "core.login.enterthewordsabove": "auth", "core.login.erroraccesscontrolalloworigin": "local_moodlemobileapp", @@ -1338,7 +1338,7 @@ "core.login.helpmelogin": "local_moodlemobileapp", "core.login.instructions": "auth", "core.login.invalidaccount": "local_moodlemobileapp", - "core.login.invaliddate": "local_moodlemobileapp", + "core.login.invaliddate": "calendar/errorinvaliddate", "core.login.invalidemail": "moodle", "core.login.invalidmoodleversion": "local_moodlemobileapp", "core.login.invalidsite": "local_moodlemobileapp", @@ -1404,8 +1404,6 @@ "core.mainmenu.changesite": "local_moodlemobileapp", "core.mainmenu.help": "moodle", "core.mainmenu.logout": "moodle", - "core.mainmenu.mycourses": "moodle", - "core.mainmenu.togglemenu": "local_moodlemobileapp", "core.mainmenu.website": "local_moodlemobileapp", "core.maxsizeandattachments": "moodle", "core.min": "moodle", @@ -1611,14 +1609,14 @@ "core.user.description": "moodle", "core.user.details": "report_security", "core.user.detailsnotavailable": "local_moodlemobileapp", - "core.user.editingteacher": "local_moodlemobileapp", + "core.user.editingteacher": "moodle/defaultcourseteacher", "core.user.email": "moodle", "core.user.emailagain": "moodle", "core.user.errorloaduser": "local_moodlemobileapp", "core.user.firstname": "moodle", "core.user.interests": "moodle", "core.user.lastname": "moodle", - "core.user.manager": "local_moodlemobileapp", + "core.user.manager": "role", "core.user.newpicture": "moodle", "core.user.noparticipants": "error", "core.user.participants": "moodle", @@ -1626,8 +1624,8 @@ "core.user.phone2": "moodle", "core.user.roles": "moodle", "core.user.sendemail": "local_moodlemobileapp", - "core.user.student": "local_moodlemobileapp", - "core.user.teacher": "local_moodlemobileapp", + "core.user.student": "moodle/defaultcoursestudent", + "core.user.teacher": "moodle/noneditingteacher", "core.user.webpage": "moodle", "core.userdeleted": "moodle", "core.userdetails": "moodle", diff --git a/src/addon/block/myoverview/lang/en.json b/src/addon/block/myoverview/lang/en.json index 7b670bf03..e914935f0 100644 --- a/src/addon/block/myoverview/lang/en.json +++ b/src/addon/block/myoverview/lang/en.json @@ -8,6 +8,6 @@ "morecourses": "More courses", "nocourses": "No courses", "past": "Past", - "pluginname": "Course Overview", + "pluginname": "Course overview", "title": "Title" -} +} \ No newline at end of file diff --git a/src/addon/coursecompletion/lang/en.json b/src/addon/coursecompletion/lang/en.json index 1dd76f339..7607702c6 100644 --- a/src/addon/coursecompletion/lang/en.json +++ b/src/addon/coursecompletion/lang/en.json @@ -8,8 +8,8 @@ "coursecompletion": "Course completion", "criteria": "Criteria", "criteriagroup": "Criteria group", - "criteriarequiredall": "All criteria below are required.", - "criteriarequiredany": "Any criteria below are required.", + "criteriarequiredall": "All criteria below are required", + "criteriarequiredany": "Any criteria below are required", "inprogress": "In progress", "manualselfcompletion": "Manual self completion", "notyetstarted": "Not yet started", diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 7de748385..23e3c6a45 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -20,7 +20,7 @@ "addon.block_myoverview.morecourses": "More courses", "addon.block_myoverview.nocourses": "No courses", "addon.block_myoverview.past": "Past", - "addon.block_myoverview.pluginname": "Course Overview", + "addon.block_myoverview.pluginname": "Course overview", "addon.block_myoverview.title": "Title", "addon.block_recentlyaccessedcourses.nocourses": "No recent courses", "addon.block_recentlyaccessedcourses.pluginname": "Recently accessed courses", @@ -111,8 +111,8 @@ "addon.coursecompletion.coursecompletion": "Course completion", "addon.coursecompletion.criteria": "Criteria", "addon.coursecompletion.criteriagroup": "Criteria group", - "addon.coursecompletion.criteriarequiredall": "All criteria below are required.", - "addon.coursecompletion.criteriarequiredany": "Any criteria below are required.", + "addon.coursecompletion.criteriarequiredall": "All criteria below are required", + "addon.coursecompletion.criteriarequiredany": "Any criteria below are required", "addon.coursecompletion.inprogress": "In progress", "addon.coursecompletion.manualselfcompletion": "Manual self completion", "addon.coursecompletion.notyetstarted": "Not yet started", @@ -1101,7 +1101,7 @@ "core.areyousure": "Are you sure?", "core.back": "Back", "core.cancel": "Cancel", - "core.cannotconnect": "Cannot connect: verify that you have typed correctly the URL.", + "core.cannotconnect": "Cannot connect: Verify that you have correctly typed the URL.", "core.cannotdownloadfiles": "File downloading is disabled. Please contact your site administrator.", "core.captureaudio": "Record audio", "core.capturedimage": "Taken picture.", @@ -1324,7 +1324,7 @@ "core.login.createaccount": "Create my new account", "core.login.createuserandpass": "Choose your username and password", "core.login.credentialsdescription": "Please provide your username and password to log in.", - "core.login.emailconfirmsent": "

An email should have been sent to your address at {{$a}}

It contains easy instructions to complete your registration.

If you continue to have difficulty, contact the site administrator.

", + "core.login.emailconfirmsent": "

An email should have been sent to your address at {{$a}}

\n

It contains easy instructions to complete your registration.

\n

If you continue to have difficulty, contact the site administrator.

", "core.login.emailnotmatch": "Emails do not match", "core.login.enterthewordsabove": "Enter the words above", "core.login.erroraccesscontrolalloworigin": "The cross-origin call you're trying to perform has been rejected. Please check https://docs.moodle.org/dev/Moodle_Mobile_development_using_Chrome_or_Chromium", @@ -1404,8 +1404,6 @@ "core.mainmenu.changesite": "Change site", "core.mainmenu.help": "Help", "core.mainmenu.logout": "Log out", - "core.mainmenu.mycourses": "My courses", - "core.mainmenu.togglemenu": "Toggle menu", "core.mainmenu.website": "Website", "core.maxsizeandattachments": "Maximum size for new files: {{$a.size}}, maximum attachments: {{$a.attachments}}", "core.min": "min", @@ -1530,7 +1528,7 @@ "core.settings.disableall": "Disable notifications", "core.settings.disabled": "Disabled", "core.settings.displayformat": "Display format", - "core.settings.enabledownloadsection": "Show download options", + "core.settings.enabledownloadsection": "Enable download sections", "core.settings.enablerichtexteditor": "Enable text editor", "core.settings.enablerichtexteditordescription": "If enabled, a text editor will be available when entering content.", "core.settings.enablesyncwifi": "Allow sync only when on Wi-Fi", diff --git a/src/core/login/lang/en.json b/src/core/login/lang/en.json index a459f61b9..561b7d81e 100644 --- a/src/core/login/lang/en.json +++ b/src/core/login/lang/en.json @@ -3,15 +3,15 @@ "authenticating": "Authenticating", "cancel": "Cancel", "checksiteversion": "Check that your site uses Moodle 2.4 or later.", - "createaccount": "Create my new account", - "createuserandpass": "Choose your username and password", - "credentialsdescription": "Please provide your username and password to log in.", "confirmdeletesite": "Are you sure you want to delete the site {{sitename}}?", "connect": "Connect!", "connecttomoodle": "Connect to Moodle", "contactyouradministrator": "Contact your site administrator for further help.", "contactyouradministratorissue": "Please ask your site administrator to check the following issue: {{$a}}", - "emailconfirmsent": "

An email should have been sent to your address at {{$a}}

It contains easy instructions to complete your registration.

If you continue to have difficulty, contact the site administrator.

", + "createaccount": "Create my new account", + "createuserandpass": "Choose your username and password", + "credentialsdescription": "Please provide your username and password to log in.", + "emailconfirmsent": "

An email should have been sent to your address at {{$a}}

\n

It contains easy instructions to complete your registration.

\n

If you continue to have difficulty, contact the site administrator.

", "emailnotmatch": "Emails do not match", "enterthewordsabove": "Enter the words above", "erroraccesscontrolalloworigin": "The cross-origin call you're trying to perform has been rejected. Please check https://docs.moodle.org/dev/Moodle_Mobile_development_using_Chrome_or_Chromium", @@ -36,11 +36,11 @@ "legacymoodleversion": "You are trying to connect to an unsupported Moodle version. Please, download the Moodle Classic app to access this Moodle site.", "legacymoodleversiondesktop": "You are trying to connect to {{$a}}.

This site is running an outdated unsupported version of Moodle which will not work with this Moodle Desktop App.

If this is your site please contact your local moodle partner to get assistance to update it.

See our contact page to submit a request for assistance.", "localmobileunexpectedresponse": "Moodle Mobile Additional Features check returned an unexpected response. You will be authenticated using the standard mobile service.", + "loggedoutssodescription": "You have to authenticate again. You need to log in to the site in a browser window.", "login": "Log in", "loginbutton": "Log in", "logininsiterequired": "You need to log in to the site in a browser window.", "loginsteps": "For full access to this site, you first need to create an account.", - "loggedoutssodescription": "You have to authenticate again. You need to log in to the site in a browser window.", "missingemail": "Missing email address", "missingfirstname": "Missing given name", "missinglastname": "Missing surname", @@ -56,10 +56,10 @@ "policyagree": "You must agree to this policy to continue using this site. Do you agree?", "policyagreement": "Site policy agreement", "policyagreementclick": "Link to site policy agreement", + "potentialidps": "Log in using your account on:", "problemconnectingerror": "We're having trouble connecting to", "problemconnectingerrorcontinue": "Double check you've entered the address correctly and try again.", "profileinvaliddata": "Invalid value", - "potentialidps": "Log in using your account on:", "recaptchachallengeimage": "reCAPTCHA challenge image", "recaptchaexpired": "Verification expired. Answer the security question again.", "recaptchaincorrect": "The security question answer is incorrect.", diff --git a/src/core/mainmenu/lang/en.json b/src/core/mainmenu/lang/en.json index dfa7b11f4..ae56991c3 100644 --- a/src/core/mainmenu/lang/en.json +++ b/src/core/mainmenu/lang/en.json @@ -3,7 +3,5 @@ "changesite": "Change site", "help": "Help", "logout": "Log out", - "mycourses": "My courses", - "togglemenu": "Toggle menu", "website": "Website" } \ No newline at end of file diff --git a/src/core/settings/lang/en.json b/src/core/settings/lang/en.json index 28d3ce6bc..2b95b657e 100644 --- a/src/core/settings/lang/en.json +++ b/src/core/settings/lang/en.json @@ -20,7 +20,7 @@ "disableall": "Disable notifications", "disabled": "Disabled", "displayformat": "Display format", - "enabledownloadsection": "Show download options", + "enabledownloadsection": "Enable download sections", "enablerichtexteditor": "Enable text editor", "enablerichtexteditordescription": "If enabled, a text editor will be available when entering content.", "enablesyncwifi": "Allow sync only when on Wi-Fi", diff --git a/src/lang/en.json b/src/lang/en.json index 1828ec37b..83b309c24 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1,8 +1,8 @@ { "accounts": "Accounts", "add": "Add", - "all": "All", "agelocationverification": "Age and location verification", + "all": "All", "allparticipants": "All participants", "android": "Android", "answer": "Answer", @@ -10,7 +10,7 @@ "areyousure": "Are you sure?", "back": "Back", "cancel": "Cancel", - "cannotconnect": "Cannot connect: verify that you have typed correctly the URL.", + "cannotconnect": "Cannot connect: Verify that you have correctly typed the URL.", "cannotdownloadfiles": "File downloading is disabled. Please contact your site administrator.", "captureaudio": "Record audio", "capturedimage": "Taken picture.", @@ -42,8 +42,8 @@ "confirmopeninbrowser": "Do you want to open it in a web browser?", "considereddigitalminor": "You are considered to be a digital minor.", "content": "Content", - "continue": "Continue", "contenteditingsynced": "The content you are editing has been synced.", + "continue": "Continue", "copiedtoclipboard": "Text copied to clipboard", "course": "Course", "coursedetails": "Course details", @@ -58,9 +58,9 @@ "deletedoffline": "Deleted offline", "deleting": "Deleting", "description": "Description", - "dffulldate": "dddd, D MMMM YYYY h[:]mm A", "dfdaymonthyear": "MM-DD-YYYY", "dfdayweekmonth": "ddd, D MMM", + "dffulldate": "dddd, D MMMM YYYY h[:]mm A", "dflastweekdate": "ddd", "dfmediumdate": "LLL", "dftimedate": "h[:]mm A", @@ -123,7 +123,6 @@ "maxsizeandattachments": "Maximum size for new files: {{$a.size}}, maximum attachments: {{$a.attachments}}", "min": "min", "mins": "mins", - "moduleintro": "Description", "mod_assign": "Assignment", "mod_assignment": "Assignment 2.2 (Disabled)", "mod_book": "Book", @@ -150,16 +149,17 @@ "mod_url": "URL", "mod_wiki": "Wiki", "mod_workshop": "Workshop", + "moduleintro": "Description", "more": "more", "mygroups": "My groups", "name": "Name", - "nograde": "No grade", "networkerroriframemsg": "This content is not available offline. Please connect to the internet and try again.", "networkerrormsg": "There was a problem connecting to the site. Please check your connection and try again.", "never": "Never", "next": "Next", "no": "No", "nocomments": "No comments", + "nograde": "No grade", "none": "None", "nopasswordchangeforced": "You cannot proceed without changing your password.", "nopermissions": "Sorry, but you do not currently have permissions to do that ({{$a}})", @@ -223,16 +223,16 @@ "time": "Time", "timesup": "Time is up!", "today": "Today", - "twoparagraphs": "{{p1}}

{{p2}}", "tryagain": "Try again", + "twoparagraphs": "{{p1}}

{{p2}}", "uhoh": "Uh oh!", + "unexpectederror": "Unexpected error. Please close and reopen the application then try again.", "unicodenotsupported": "Some emojis are not supported on this site. Such characters will be removed when the message is sent.", "unicodenotsupportedcleanerror": "Empty text was found when cleaning Unicode chars.", "unknown": "Unknown", "unlimited": "Unlimited", "unzipping": "Unzipping", "upgraderunning": "Site is being upgraded, please retry later.", - "unexpectederror": "Unexpected error. Please close and reopen the application then try again.", "userdeleted": "This user account has been deleted", "userdetails": "User details", "usernotfullysetup": "User not fully set-up",