nodebb-plugin-composer-default 10.2.23 → 10.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/library.js CHANGED
@@ -85,7 +85,7 @@ plugin.getFormattingOptions = async function () {
85
85
  },
86
86
  {
87
87
  name: 'zen',
88
- title: '[[modules:composer.zen_mode]]',
88
+ title: '[[modules:composer.zen-mode]]',
89
89
  className: 'fa fa-arrows-alt',
90
90
  visibility: defaultVisibility,
91
91
  },
@@ -94,7 +94,7 @@ plugin.getFormattingOptions = async function () {
94
94
  if (parseInt(meta.config.allowTopicsThumbnail, 10) === 1) {
95
95
  payload.options.push({
96
96
  name: 'thumbs',
97
- title: '[[topic:composer.thumb_title]]',
97
+ title: '[[topic:composer.thumb-title]]',
98
98
  className: 'fa fa-address-card-o',
99
99
  badge: true,
100
100
  visibility: {
@@ -239,7 +239,7 @@ async function generateBody(req, postData) {
239
239
  // Quoted reply
240
240
  if (req.query.toPid && parseInt(req.query.quoted, 10) === 1 && postData) {
241
241
  const username = await user.getUserField(postData.uid, 'username');
242
- const translated = await translator.translate(`[[modules:composer.user_said, ${username}]]`);
242
+ const translated = await translator.translate(`[[modules:composer.user-said, ${username}]]`);
243
243
  return `${translated}\n` +
244
244
  `> ${postData ? `${postData.content.replace(/\n/g, '\n> ')}\n\n` : ''}`;
245
245
  } else if (req.query.body || req.query.content) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.2.23",
3
+ "version": "10.2.25",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -40,7 +40,7 @@ define('composer/categoryList', [
40
40
 
41
41
  // this is the mobile category selector
42
42
  postContainer.find('.category-name')
43
- .translateText(selector.selectedCategory ? selector.selectedCategory.name : '[[modules:composer.select_category]]')
43
+ .translateText(selector.selectedCategory ? selector.selectedCategory.name : '[[modules:composer.select-category]]')
44
44
  .on('click', function () {
45
45
  categorySelector.modal({
46
46
  privilege: 'topics:create',
@@ -230,7 +230,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
230
230
 
231
231
  drafts.listAvailable = function () {
232
232
  const available = drafts.getList('available');
233
- return available.map(drafts.get);
233
+ return available.map(drafts.get).filter(Boolean);
234
234
  };
235
235
 
236
236
  drafts.getAvailableCount = function () {
@@ -144,9 +144,9 @@ define('composer', [
144
144
  return composer.load(existingUUID);
145
145
  }
146
146
 
147
- var actionText = '[[topic:composer.new_topic]]';
147
+ var actionText = '[[topic:composer.new-topic]]';
148
148
  if (post.action === 'posts.reply') {
149
- actionText = '[[topic:composer.replying_to]]';
149
+ actionText = '[[topic:composer.replying-to]]';
150
150
  } else if (post.action === 'posts.edit') {
151
151
  actionText = '[[topic:composer.editing-in]]';
152
152
  }
@@ -234,14 +234,14 @@ define('composer', [
234
234
  tid: data.tid,
235
235
  toPid: data.toPid,
236
236
  title: data.title,
237
- body: '[[modules:composer.user_said_in, ' + data.username + ', ' + link + ']]\n' + data.body,
237
+ body: '[[modules:composer.user-said-in, ' + data.username + ', ' + link + ']]\n' + data.body,
238
238
  });
239
239
  } else {
240
240
  composer.newReply({
241
241
  tid: data.tid,
242
242
  toPid: data.toPid,
243
243
  title: data.title,
244
- body: '[[modules:composer.user_said, ' + data.username + ']]\n' + data.body,
244
+ body: '[[modules:composer.user-said, ' + data.username + ']]\n' + data.body,
245
245
  });
246
246
  }
247
247
  return;
@@ -254,9 +254,9 @@ define('composer', [
254
254
  var bodyEl = postContainer.find('textarea');
255
255
  var prevText = bodyEl.val();
256
256
  if (data.title && (data.selectedPid || data.toPid)) {
257
- translator.translate('[[modules:composer.user_said_in, ' + data.username + ', ' + link + ']]\n', config.defaultLang, onTranslated);
257
+ translator.translate('[[modules:composer.user-said-in, ' + data.username + ', ' + link + ']]\n', config.defaultLang, onTranslated);
258
258
  } else {
259
- translator.translate('[[modules:composer.user_said, ' + data.username + ']]\n', config.defaultLang, onTranslated);
259
+ translator.translate('[[modules:composer.user-said, ' + data.username + ']]\n', config.defaultLang, onTranslated);
260
260
  }
261
261
 
262
262
  function onTranslated(translated) {
@@ -12,7 +12,7 @@
12
12
  </div>
13
13
  {{{ end }}}
14
14
  {{{ if !isTopicOrMain }}}
15
- <h4 class="title text-bg-primary">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.replying_to, "{topicTitle}"]]{{{ end }}}</h4>
15
+ <h4 class="title text-bg-primary">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.replying-to, "{topicTitle}"]]{{{ end }}}</h4>
16
16
  {{{ end }}}
17
17
  <div class="display-scheduler p-2 {{{ if !canSchedule }}} hidden{{{ end }}}">
18
18
  <i class="fa fa-clock-o"></i>
@@ -32,7 +32,7 @@
32
32
  <!-- IMPORT partials/composer-tags.tpl -->
33
33
  {{{ end }}}
34
34
 
35
- <div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
35
+ <div class="imagedrop"><div>[[topic:composer.drag-and-drop-images]]</div></div>
36
36
 
37
37
  <div class="resizer position-absolute w-100 bottom-100 pe-3 border-bottom">
38
38
  <div class="trigger text-center">
@@ -54,8 +54,8 @@
54
54
  <div class="draft-icon m-2 hidden-xs hidden-sm"></div>
55
55
  <button class="btn btn-sm btn-link py-2 text-body fw-semibold text-nowrap" data-action="preview">
56
56
  <i class="fa fa-eye"></i>
57
- <span class="d-none d-md-inline show-text">[[modules:composer.show_preview]]</span>
58
- <span class="d-none d-md-inline hide-text">[[modules:composer.hide_preview]]</span>
57
+ <span class="d-none d-md-inline show-text">[[modules:composer.show-preview]]</span>
58
+ <span class="d-none d-md-inline hide-text">[[modules:composer.hide-preview]]</span>
59
59
  </button>
60
60
  {{{ if composer:showHelpTab }}}
61
61
  <button class="btn btn-sm btn-link py-2 text-body fw-semibold text-nowrap" data-action="help">
@@ -3,7 +3,7 @@
3
3
  <div class="btn-group dropup me-2 {{{ if !tagWhitelist.length }}}hidden{{{ end }}}" component="composer/tag/dropdown">
4
4
  <button class="btn btn-sm btn-link text-body dropdown-toggle" data-bs-toggle="dropdown" type="button">
5
5
  <span class="visible-sm-inline visible-md-inline visible-lg-inline"><i class="fa fa-tags"></i></span>
6
- [[tags:select_tags]]
6
+ [[tags:select-tags]]
7
7
  </button>
8
8
 
9
9
  <ul class="dropdown-menu">
@@ -12,6 +12,6 @@
12
12
  <!-- END tagWhitelist -->
13
13
  </ul>
14
14
  </div>
15
- <input class="tags" type="text" class="" placeholder="[[tags:enter_tags_here, {minimumTagLength}, {maximumTagLength}]]" tabindex="5" />
15
+ <input class="tags" type="text" class="" placeholder="[[tags:enter-tags-here, {minimumTagLength}, {maximumTagLength}]]" tabindex="5" />
16
16
  </div>
17
17
  </div>
@@ -7,14 +7,14 @@
7
7
 
8
8
  {{{ if showHandleInput }}}
9
9
  <div data-component="composer/handle">
10
- <input class="handle form-control h-100 border-0 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.handle_placeholder]]" value="{handle}" />
10
+ <input class="handle form-control h-100 border-0 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.handle-placeholder]]" value="{handle}" />
11
11
  </div>
12
12
  {{{ end }}}
13
13
  <div data-component="composer/title" class="position-relative flex-1" style="min-width: 0;">
14
14
  {{{ if isTopicOrMain }}}
15
- <input class="title form-control h-100 rounded-1 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.title_placeholder]]" value="{topicTitle}"/>
15
+ <input class="title form-control h-100 rounded-1 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.title-placeholder]]" value="{topicTitle}"/>
16
16
  {{{ else }}}
17
- <span class="d-none d-md-block title h-100 text-truncate">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.replying_to, "{topicTitle}"]]{{{ end }}}</span>
17
+ <span class="d-none d-md-block title h-100 text-truncate">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.replying-to, "{topicTitle}"]]{{{ end }}}</span>
18
18
  {{{ end }}}
19
19
  <div id="quick-search-container" class="quick-search-container mt-2 dropdown-menu d-block p-2 hidden">
20
20
  <div class="text-center loading-indicator"><i class="fa fa-spinner fa-spin"></i></div>