little fix

fe89bc9cdfab2163e57746cebae2840303672bd8

steve02081504 <steve02081504@EDEN.fukwold>

3 files changed, +8 -3Ignore whitespace
public/locales/zh-cn.json+2 -0
@@ -1283,6 +1283,8 @@
1283 "expression_label_pattern": "[表达式标签].[图像格式]",1283 "expression_label_pattern": "[表达式标签].[图像格式]",
1284 "Sprite set:": "表情集:",1284 "Sprite set:": "表情集:",
1285 "Show Gallery": "展示图库",1285 "Show Gallery": "展示图库",
1286 "Shows the gallery.": "显示画廊。",
1287 "List images in the gallery of the current char / group or a specified char / group.": "列出图库中当前角色/组或指定角色/组的图像。",
1286 "ext_sum_title": "总结",1288 "ext_sum_title": "总结",
1287 "ext_sum_with": "总结如下:",1289 "ext_sum_with": "总结如下:",
1288 "ext_sum_main_api": "主要 API",1290 "ext_sum_main_api": "主要 API",
public/scripts/extensions/gallery/GalleryI18nData.html+2 -0
@@ -1,2 +1,4 @@
1<!-- I18n data for tools used to auto generate translations -->1<!-- I18n data for tools used to auto generate translations -->
2<div data-i18n="Show Gallery">Show Gallery</div>2<div data-i18n="Show Gallery">Show Gallery</div>
3<div data-i18n="Shows the gallery.">Shows the gallery.</div>
4<div data-i18n="List images in the gallery of the current char / group or a specified char / group.">List images in the gallery of the current char / group or a specified char / group.</div>
public/scripts/extensions/gallery/index.js+4 -3
@@ -13,6 +13,7 @@ import { SlashCommand } from '../../slash-commands/SlashCommand.js';
13import { ARGUMENT_TYPE, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js';13import { ARGUMENT_TYPE, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js';
14import { DragAndDropHandler } from '../../dragdrop.js';14import { DragAndDropHandler } from '../../dragdrop.js';
15import { commonEnumProviders } from '../../slash-commands/SlashCommandCommonEnumsProvider.js';15import { commonEnumProviders } from '../../slash-commands/SlashCommandCommonEnumsProvider.js';
16import { translate } from '../../i18n.js';
1617
17const extensionName = 'gallery';18const extensionName = 'gallery';
18const extensionFolderPath = `scripts/extensions/${extensionName}/`;19const extensionFolderPath = `scripts/extensions/${extensionName}/`;
@@ -228,7 +229,7 @@ $(document).ready(function () {
228 $('#char-management-dropdown').append(229 $('#char-management-dropdown').append(
229 $('<option>', {230 $('<option>', {
230 id: 'show_char_gallery',231 id: 'show_char_gallery',
231 text: 'Show Gallery',232 text: translate('Show Gallery'),
232 }),233 }),
233 );234 );
234});235});
@@ -406,7 +407,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'show-gallery
406 showCharGallery();407 showCharGallery();
407 return '';408 return '';
408 },409 },
409 helpString: 'Shows the gallery.',410 helpString: translate('Shows the gallery.'),
410}));411}));
411SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'list-gallery',412SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'list-gallery',
412 aliases: ['lg'],413 aliases: ['lg'],
@@ -426,7 +427,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'list-gallery
426 enumProvider: commonEnumProviders.characters('group'),427 enumProvider: commonEnumProviders.characters('group'),
427 }),428 }),
428 ],429 ],
429 helpString: 'List images in the gallery of the current char / group or a specified char / group.',430 helpString: translate('List images in the gallery of the current char / group or a specified char / group.'),
430}));431}));
431432
432async function listGalleryCommand(args) {433async function listGalleryCommand(args) {