From 1c2efdc419a5bc5f7e9f600e9013bebc7c596799 Mon Sep 17 00:00:00 2001 From: anisa kusumadewi Date: Mon, 5 Dec 2022 09:56:13 +0100 Subject: [PATCH] remove duplicate entries in lang string --- lang/en/pdfannotator.php | 29 ++++++++++++++++++++++++++--- locallib.php | 4 ++-- shared/index.js | 2 +- version.php | 4 ++-- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/lang/en/pdfannotator.php b/lang/en/pdfannotator.php index e41ce7d..f8d65b5 100644 --- a/lang/en/pdfannotator.php +++ b/lang/en/pdfannotator.php @@ -52,9 +52,11 @@ $string['average_answers'] = 'Average answers'; $string['average_help'] = 'Only users who wrote at least one comment are included in the calculation of the average (arithmetic mean)'; $string['average_questions'] = 'Average questions'; + $string['by'] = 'by'; $string['by_other_users'] = 'by other users'; $string['bynameondate'] = 'by {$a->name} - {$a->date}'; + $string['cancelButton'] = 'Cancel'; $string['chart_title'] = 'Questions and answers in the annotators in this course'; $string['clicktoopen2'] = 'Click {$a} link to view the file.'; @@ -68,6 +70,7 @@ $string['count'] = 'count'; $string['createAnnotation'] = 'Create Annotation'; $string['currentPage'] = 'current page number'; + $string['day'] = 'day'; $string['days'] = 'days'; $string['decision:overlappingAnnotation'] = 'You clicked an area, in which is more than one annotation. Decide which one you wanted to click.'; @@ -87,6 +90,7 @@ $string['dnduploadpdfannotator'] = 'Create file for PDF Annotation'; $string['document'] = 'Document'; $string['drawing'] = 'Draw in the document with the pen.'; + $string['edit'] = 'Edit'; $string['editAnnotation'] = 'The annotation will be moved.
This might change the context of the question.'; $string['editAnnotationTitle'] = 'Are you sure?'; @@ -110,9 +114,8 @@ $string['error:getAnnotations'] = 'An error has occurred while getting all annotations.'; $string['error:getComments'] = 'An error has occurred while getting the comments.'; $string['error:getimageheight'] = 'An error has occurred while getting image height of {$a}.'; -$string['error:getimageheight'] = 'An error has occurred while getting image width of {$a}.'; +$string['error:getimagewidth'] = 'An error has occurred while getting image width of {$a}.'; $string['error:getQuestions'] = 'An error has occurred while getting the questions for this page.'; -$string['error:printComments'] = 'Error with data from server.'; $string['error:hideComment'] = "An error has occurred while trying to hide the comment from participants' view."; $string['error:markasread'] = 'The item could not be marked as read.'; $string['error:markasunread'] = 'The item could not be marked as unread.'; @@ -122,17 +125,19 @@ $string['error:openingPDF'] = 'An error occurred while opening the PDF file.'; $string['error:openprintview'] = 'An error has occurred while trying to open the pdf in Acrobat Reader.'; $string['error:printcomments'] = 'An error has occurred while trying to open the comments in a pdf.'; +$string['error:printcommentsdata'] = 'Error with data from server.'; $string['error:printlatex'] = 'An error has occurred while trying to add a LaTeX formula to the pdf.'; $string['error:redisplayComment'] = 'An error has occurred while redisplaying the comment.'; $string['error:renderPage'] = 'An error has occurred while rendering the page.'; $string['error:reportComment'] = 'An error has occurred while saving the report.'; $string['error:subscribe'] = 'An error has occurred while subscribing to the question.'; $string['error:unsubscribe'] = 'An error has occurred while unsubscribing to the question.'; -$string['error:unsupportedextention'] = 'The extension of submitted data is not supported. Please select other extension.'; +$string['error:unsupportedextension'] = 'The extension of submitted data is not supported. Please select other extension.'; $string['error:redihideCommentsplayComment'] = 'An error occurred while re-inserting the comment for attendees.'; $string['error:voteComment'] = 'An error has occurred while saving the vote.'; $string['error'] = 'Error!'; $string['eventreport_added'] = 'A comment was reported'; + $string['filenotfound'] = 'File not found, sorry.'; $string['forward'] = 'Forward'; $string['forwardedquestionhtml'] = '{$a->sender} forwarded the following question to you:

@@ -151,6 +156,7 @@ The question is available at: {$a->urltoquestion}'; $string['fullscreen'] = 'Fullscreen'; $string['fullscreenBack'] = 'Exit Fullscreen'; + $string['global_setting_anonymous'] = 'Allow anonymous posting?'; $string['global_setting_anonymous_desc'] = 'With this option you allow your user to post comments anonymously. This option activates anonymous posting globally'; $string['global_setting_attobuttons'] = 'Atto editor toolbar config'; @@ -178,19 +184,23 @@ $string['global_setting_useprint_document_desc'] = 'Allow participants to save and print the pdf document'; $string['global_setting_usevotes'] = 'Allow liking of comments?'; $string['global_setting_usevotes_desc'] = 'With this option users can like / vote for posts other than their own.'; + $string['hiddenComment'] = 'hidden comment'; $string['hiddenforparticipants'] = 'Hidden from students'; $string['hideAnnotations'] = 'Hide Annotations'; $string['highlight'] = 'Highlight text and add a comment.'; $string['hour'] = 'hour'; $string['hours'] = 'hours'; + $string['in_course'] = 'in this course'; $string['in_document'] = 'in this document'; $string['infonocomments'] = "This document contains no comments at present."; $string['iscorrecthelpicon'] = 'Correct'; $string['iscorrecthelpicon_help'] = 'When a teacher or manager has marked an answer as correct, a green check mark appears next to it.'; $string['itemsperpage'] = 'Items per page'; + $string['justnow'] = 'just now'; + $string['lastanswered'] = 'Last Answer'; $string['lastedited'] = 'last edited'; $string['legacyfiles'] = 'Migration of old course file'; @@ -206,6 +216,7 @@ $string['likeQuestion'] = 'interesting question'; $string['likeQuestionForbidden'] = 'already marked as helpful'; $string['loading'] = 'Loading!'; + $string['markasread'] = 'Mark as read'; $string['markasunread'] = 'Mark as unread'; $string['markCorrect'] = 'Mark as correct'; @@ -240,6 +251,7 @@ $string['mypublicquestions'] = 'My public questions'; $string['myquestion'] = 'Question'; $string['myquestions'] = 'My questions'; + $string['newanswerhtml'] = 'Your subscribed question "{$a->question}" was answered by {$a->answeruser} with the comment:

"{$a->content}"

The answer is here available.'; $string['newanswertext'] = 'Your subscribed question "{$a->question}" was answered by {$a->answeruser} with the comment: @@ -273,6 +285,7 @@ $string['notificationsubject:newquestion'] = 'New question in {$a}'; $string['notificationsubject:newreport'] = 'A comment was reported in {$a}'; $string['nounreadreports'] = 'There are no unread reports in this course at present.'; + $string['on'] = 'on'; $string['onlyDeleteOwnAnnotations'] = ", because it belongs to another user."; $string['onlyDeleteUncommentedPosts'] = ", because the other users comments would be deleted as well."; @@ -282,6 +295,7 @@ $string['ownpoststab'] = 'My posts'; $string['ownpoststabicon'] = 'My posts'; $string['ownpoststabicon_help'] = 'This page displays all comments that you posted in this course.'; + $string['page'] = 'page'; $string['pdfannotator:addinstance'] = 'add instance'; $string['pdfannotator:administrateuserinput'] = 'Administrate comments'; @@ -356,6 +370,7 @@ $string['publicanswers'] = 'Public answers'; $string['public_comments'] = 'Public comments'; $string['publicquestions'] = 'Public questions'; + $string['question'] = 'Question'; $string['questionsimgtitle'] = "Show all questions on this page"; $string['questionSolved'] = 'Questions is closed. However, you can still create new comments.'; @@ -363,6 +378,7 @@ $string['questionstabicon'] = 'Questions'; $string['questionstabicon_help'] = 'This page displays all unsolved questions that were asked in this course. You can also choose to see all or all solved questions in this course.'; $string['questionstitle'] = 'Questions on page'; + $string['read'] = 'Read'; $string['reason'] = 'Explanation'; $string['recievenewquestionnotifications'] = 'Notify about new questions'; @@ -389,6 +405,7 @@ $string['reportstabicon'] = 'Reported comments'; $string['reportstabicon_help'] = 'This page displays comments that were reported as inappropriate in this course. You can choose to see only unread/read* reports or all reports.
* Any manager of this course can mark a report as read.'; $string['reportwassentoff'] = 'The comment has been reported.'; + $string['search'] = 'Search'; $string['searchresults'] = 'Search results'; $string['second'] = 'second'; @@ -451,10 +468,12 @@ $string['successfullyUnsubscribedSingular'] = 'Your subscribtion to the question was cancelled and the only answer removed from this table.'; $string['successfullyUnsubscribedTwo'] = 'Your subscribtion was cancelled. Both answers to the question were removed from this table.'; $string['sumPages'] = 'Number of pages'; + $string['text'] = 'Add a text in the document.'; $string['titleforreportcommentform'] = 'Report comment'; $string['titleforwardform'] = 'Forward question'; $string['toreport'] = 'Report'; + $string['unseenreports'] = 'unread only'; $string['unsolvedquestionstitle'] = 'Unsolved Questions'; $string['unsolvedquestionstitle_help'] = 'All unsolved questions in this course are listed.'; @@ -470,17 +489,21 @@ $string['use_protected_comments'] = "Allow participants to write private comments?"; $string['useprint_document'] = "Give participants access to the PDF?"; $string['usevotes'] = "Allow users to like comments."; + $string['view'] = 'Document'; $string['votes'] = 'Likes'; $string['voteshelpicon'] = 'Likes'; $string['voteshelpicon_help'] = 'This column tells you how many other people take an interest in the question.'; $string['voteshelpicontwo'] = 'Likes'; $string['voteshelpicontwo_help'] = 'This column tells you how often your posts were liked.'; + $string['week'] = 'week'; $string['weeks'] = 'weeks'; + $string['year'] = 'year'; $string['years'] = 'years'; $string['yesButton'] = 'Yes'; + $string['zoom'] = 'zoom'; $string['zoomin'] = 'zoom in'; $string['zoomout'] = 'zoom out'; diff --git a/locallib.php b/locallib.php index 00732d8..8eb0d84 100644 --- a/locallib.php +++ b/locallib.php @@ -64,7 +64,7 @@ function pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page = // Load and execute the javascript files. $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/pdf.js?ver=00002")); $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/textclipper.js")); - $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00037")); + $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00038")); $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/locallib.js?ver=00006")); // Pass parameters from PHP to JavaScript. @@ -202,7 +202,7 @@ function pdfannotator_split_content_image($content, $res, $itemid, $context=null preg_match('/(https...{1,}[.]((gif)|(jpe)g*|(jpg)|(png)|(svg)|(svgz)))/i', $imgstr, $url); preg_match('/(gif)|(jpe)g*|(jpg)|(png)|(svg)|(svgz)/i', $url[0], $format); if (!$format) { - throw new \moodle_exception('error:unsupportedextention', 'pdfannotator'); + throw new \moodle_exception('error:unsupportedextension', 'pdfannotator'); } if (in_array('jpg', $format) || in_array('jpeg', $format) || in_array('jpe', $format) || in_array('JPG', $format) || in_array('JPEG', $format) || in_array('JPE', $format)) { diff --git a/shared/index.js b/shared/index.js index e822f68..537dcdc 100644 --- a/shared/index.js +++ b/shared/index.js @@ -599,7 +599,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to return JSON.parse(data); }).catch(function(err) { notification.addNotification({ - message: M.util.get_string('error:printComments','pdfannotator'), + message: M.util.get_string('error:printcommentsdata','pdfannotator'), type: "error" }); }); diff --git a/version.php b/version.php index 7e6c84f..cc17a42 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_pdfannotator'; -$plugin->version = 2022112900; -$plugin->release = 'PDF Annotator v1.5 release 2'; +$plugin->version = 2022120500; +$plugin->release = 'PDF Annotator v1.5 release 3'; $plugin->requires = 2021051700; $plugin->maturity = MATURITY_STABLE;