little fix
| @@ -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", |
| @@ -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> | ||
| @@ -13,6 +13,7 @@ import { SlashCommand } from '../../slash-commands/SlashCommand.js'; | |||
| 13 | import { ARGUMENT_TYPE, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js'; | 13 | import { ARGUMENT_TYPE, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js'; |
| 14 | import { DragAndDropHandler } from '../../dragdrop.js'; | 14 | import { DragAndDropHandler } from '../../dragdrop.js'; |
| 15 | import { commonEnumProviders } from '../../slash-commands/SlashCommandCommonEnumsProvider.js'; | 15 | import { commonEnumProviders } from '../../slash-commands/SlashCommandCommonEnumsProvider.js'; |
| 16 | import { translate } from '../../i18n.js'; | ||
| 16 | 17 | ||
| 17 | const extensionName = 'gallery'; | 18 | const extensionName = 'gallery'; |
| 18 | const extensionFolderPath = `scripts/extensions/${extensionName}/`; | 19 | const 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 | })); |
| 411 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'list-gallery', | 412 | SlashCommandParser.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 | })); |
| 431 | 432 | ||
| 432 | async function listGalleryCommand(args) { | 433 | async function listGalleryCommand(args) { |