cleanup examples for multi sprites

bd6da695c80ff6f9a065d67f4a376fa6b5a0ec55

Wolfsblvt <wolfsblvt@gmail.com>

3 files changed, +16 -5Ignore whitespace
public/scripts/extensions/expressions/settings.html+14 -3
@@ -75,9 +75,20 @@
7575 <span data-i18n="Remove all image overrides">Remove all image overrides</span>
7676 </div>
7777 </div>
78- <p class="hint"><b data-i18n="Hint:">Hint:</b> <i><span data-i18n="Create new folder in the _space">Create new folder in the </span><b>/characters/</b> <span data-i18n="folder of your user data directory and name it as the name of the character.">folder of your user data directory and name it as the name of the character.</span>
78+ <p class="hint">
79- <span data-i18n="Put images with expressions there. File names should follow the pattern:">Put images with expressions there. File names should follow the pattern: </span><tt data-i18n="expression_label_pattern">[expression_label].[image_format]</tt></i></p>
79+ <b data-i18n="Hint:">Hint:</b>
80- <span>In case of multiple files per expression, file names can contain a suffix, either separated by a dot or a dash. Examples: </span><tt>joy.png</tt>, <tt>joy-1.png</tt>, <tt>joy.expressive.png</tt>, <tt>美しい-17.png</tt>
80+ <i>
81+ <span data-i18n="Create new folder in the _space">Create new folder in the </span><b>/characters/</b> <span data-i18n="folder of your user data directory and name it as the name of the character.">folder of your user data directory and name it as the name of the character.</span>
82+ <span data-i18n="Put images with expressions there. File names should follow the pattern:">Put images with expressions there. File names should follow the pattern: </span><tt data-i18n="expression_label_pattern">[expression_label].[image_format]</tt>
83+ </i>
84+ </p>
85+ <p>
86+ <i>
87+ <span>In case of multiple files per expression, file names can contain a suffix, either separated by a dot or a
88+ dash.
89+ Examples: </span><tt>joy.png</tt>, <tt>joy-1.png</tt>, <tt>joy.expressive.png</tt>
90+ </i>
91+ </p>
8192 <h3 id="image_list_header">
8293 <strong data-i18n="Sprite set:">Sprite set:</strong>&nbsp;<span id="image_list_header_name"></span>
8394 </h3>
public/scripts/extensions/expressions/templates/upload-expression.html+1 -1
@@ -5,7 +5,7 @@
55<div data-i18n="upload_expression_naming_2">
66 For multiple expressions, the name must follow the expression name and a valid suffix. Allowed separators are '-' or dot '.'.
77</div>
88<span class="m-b-1" data-i18n="Examples:">Examples:</span> <tt>{{expression}}.png</tt>, <tt>{{expression}}-1.png</tt>, <tt>{{expression}}.expressive.png</tt>, <tt>美しい-17.png</tt>
99{{#if clickedFileName}}
1010<div class="m-t-1" data-i18n="upload_expression_replace">Click 'Replace' to replace the existing expression:</div>
1111<tt>{{clickedFileName}}</tt>
src/endpoints/sprites.js+1 -1
@@ -128,7 +128,7 @@ router.get('/get', jsonParser, function (request, response) {
128128
129129 const fileName = path.parse(pathToSprite).name.toLowerCase();
130130 // Extract the label from the filename via regex, which can be suffixed with a sub-name, either connected with a dash or a dot.
131131 // Examples: joy.png, joy-1.png, joy.expressive.png, 美しい-17.png
132132 const label = fileName.match(/^(.+?)(?:[-\\.].*?)?$/)?.[1] ?? fileName;
133133
134134 return {