Skip to content

Commit 3a3bca7

Browse files
authored
Merge pull request #231 from sh-csg/move-hardcoded-strings
Move hardcoded strings
2 parents 685ac37 + e2b4a7d commit 3a3bca7

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

lang/en/moodleoverflow.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
$string['noguestpost'] = 'Sorry, guests are not allowed to post.';
251251
$string['noguesttracking'] = 'Sorry, guests are not allowed to set tracking options.';
252252
$string['noonecansubscribenow'] = 'Subscriptions are now disallowed';
253+
$string['nootherforums'] = 'Unfortunately, there is no other Moodleoverflow where you can move it.';
253254
$string['nopermissiontosubscribe'] = 'You do not have the permission to view subscribers';
254255
$string['nopostmoodleoverflow'] = 'Sorry, you are not allowed to post to this forum.';
255256
$string['noratemoodleoverflow'] = 'Sorry, you are not allowed to vote in this forum.';
@@ -421,6 +422,8 @@
421422
$string['unsubscribelink'] = 'Unsubscribe from this forum: {$a}';
422423
$string['updategrades'] = 'Update grades';
423424
$string['upvotenotchangeable'] = 'Cannot upvote';
425+
$string['userstats'] = 'User statistics';
426+
$string['userstatscourse'] = 'User statistics of course: {$a}';
424427
$string['userstatscourseactivity'] = 'Activity (coursewide)';
425428
$string['userstatscoursereputation'] = 'Reputation (coursewide)';
426429
$string['userstatsdownvotes'] = 'Received downvotes';
@@ -432,6 +435,7 @@
432435
$string['votescalesolved'] = 'Reputation: Solution';
433436
$string['votescaleupvote'] = 'Reputation: Upvote';
434437
$string['votescalevote'] = 'Reputation: Vote.';
438+
$string['wheremovetopic'] = 'Where do you want to move the topic "{$a}"?';
435439
$string['wronginteraction'] = 'Something went wrong executing the interaction.';
436440
$string['wrongparametercount'] = 'Exactly one parameter should be declared in the url. Please specify the one action you want to perform.';
437441
$string['your_post_was_rejected'] = 'Your post was rejected.';

templates/forum_list.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616
}}
1717
{{!
18-
@template mod_moodleoverflow/discussion_list
18+
@template mod_moodleoverflow/forum_list
1919
20-
Moodleoverflow discussion_list template.
21-
The purpose of this template is to render a list of discussions for the view.php.
20+
Moodleoverflow forum_list template.
21+
The purpose of this template is to render a list of forums for the view.php.
2222
2323
Example context (json):
2424
{
@@ -29,7 +29,7 @@
2929
<thead>
3030
<th class ="header topic" scope="col">
3131
{{#currentdiscussion}}
32-
Where do you want to move the topic "{{currentdiscussion}}" ?
32+
{{#str}} wheremovetopic, mod_moodleoverflow, {{currentdiscussion}} {{/str}}
3333
{{/currentdiscussion}}
3434
</th>
3535
</thead>
@@ -52,7 +52,7 @@
5252
{{/hasforums}}
5353
{{^hasforums}}
5454
<div class="alert alert-info">
55-
Unfortunately, there is no other Moodleoverflow where you can move it.
55+
{{#str}} nootherforums, mod_moodleoverflow {{/str}}
5656
</div>
5757
{{/hasforums}}
5858
<br>

userstats.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
// Print the page header.
5959
$PAGE->set_url('/mod/moodleoverflow/userstats.php', ['id' => $cm->id,
6060
'courseid' => $course->id, 'mid' => $moodleoverflow->id, ]);
61-
$PAGE->set_title(format_string('User statistics'));
62-
$PAGE->set_heading(format_string('User statistics of course: ' . $course->fullname));
61+
$PAGE->set_title(get_string('userstats', 'moodleoverflow'));
62+
$PAGE->set_heading(get_string('userstatscourse', 'moodleoverflow', $course->fullname));
6363

6464
// Output starts here.
6565
echo $OUTPUT->header();

0 commit comments

Comments
 (0)