nodebb-plugin-poll 3.2.5 → 3.2.6
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/eslint.config.mjs +10 -0
- package/languages/zh_CN/poll.json +8 -2
- package/package.json +3 -4
- package/public/js/poll/main.js +0 -1
- package/public/js/poll/serializer.js +2 -2
- package/.eslintrc +0 -3
- package/public/js/.eslintrc +0 -3
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"default_title": "默认投票标题",
|
|
9
9
|
"max_votes": "每个用户最多选几项",
|
|
10
10
|
"disallow_vote_update": "不允许用户更改投票",
|
|
11
|
+
"allow_anon_voting": "允许匿名投票",
|
|
11
12
|
"info_choices": "如果数字大于1,那么就是多选投票",
|
|
12
13
|
"settings": "设置",
|
|
13
14
|
"save": "保存",
|
|
@@ -29,10 +30,12 @@
|
|
|
29
30
|
|
|
30
31
|
"error.not_main": "只能在帖子主体中添加投票",
|
|
31
32
|
"error.privilege.create": "你不被允许创建投票",
|
|
33
|
+
"error.anon-voting-not-allowed": "不允许匿名投票",
|
|
32
34
|
|
|
33
35
|
"warning.redactor": "你正在使用编辑器。<strong>请不要</strong>手动编辑投票模块。 可以重新使用投票创建工具。",
|
|
34
36
|
|
|
35
37
|
"vote": "投票",
|
|
38
|
+
"vote_anonymously": "匿名投票",
|
|
36
39
|
"update_vote": "更改投票",
|
|
37
40
|
"remove_vote": "删除投票",
|
|
38
41
|
"to_voting": "去投票",
|
|
@@ -43,5 +46,8 @@
|
|
|
43
46
|
"vote_is_final": "投票已结束,无法更改",
|
|
44
47
|
|
|
45
48
|
"vote_count": "名用户投了此票",
|
|
46
|
-
"votes": "票"
|
|
47
|
-
|
|
49
|
+
"votes": "票",
|
|
50
|
+
"x-votes": "%1 票",
|
|
51
|
+
"total-votes-x": "总票数: %1",
|
|
52
|
+
"admin.create-poll": "创建投票"
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-poll",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "NodeBB Poll Plugin",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"compatibility": "^4.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"eslint": "
|
|
33
|
-
"eslint-config-nodebb": "
|
|
34
|
-
"eslint-plugin-import": "2.29.1"
|
|
32
|
+
"eslint": "9.28.0",
|
|
33
|
+
"eslint-config-nodebb": "1.1.7"
|
|
35
34
|
}
|
|
36
35
|
}
|
package/public/js/poll/main.js
CHANGED
|
@@ -133,7 +133,7 @@ module.exports = function (utils) {
|
|
|
133
133
|
|
|
134
134
|
const stripped = utils.stripHTMLTags(raw).replace(/\\/g, '\');
|
|
135
135
|
let match;
|
|
136
|
-
while ((match = settingsRegex.exec(stripped)) !== null) {
|
|
136
|
+
while ((match = settingsRegex.exec(stripped)) !== null) {
|
|
137
137
|
var key = match.groups.key.trim();
|
|
138
138
|
var value = match.groups.value.trim();
|
|
139
139
|
|
|
@@ -150,7 +150,7 @@ module.exports = function (utils) {
|
|
|
150
150
|
function deserializeSettings(settings, config) {
|
|
151
151
|
var deserialized = '';
|
|
152
152
|
|
|
153
|
-
for (var k
|
|
153
|
+
for (var k of Object.keys(settings)) {
|
|
154
154
|
if (settings.hasOwnProperty(k) && config.defaults.hasOwnProperty(k)) {
|
|
155
155
|
var key = utils.stripHTMLTags(k).trim();
|
|
156
156
|
var value = utils.stripHTMLTags(settings[k]).trim();
|
package/.eslintrc
DELETED
package/public/js/.eslintrc
DELETED