2525
2626/* eslint-disable no-invalid-this */
2727define ( function ( require , exports , module ) {
28+ const StringUtils = require ( "utils/StringUtils" ) ;
2829 const Metrics = require ( "utils/Metrics" ) ;
2930
3031 const Global = require ( "./global" ) ;
@@ -48,12 +49,12 @@ define(function (require, exports, module) {
4849 const $snippetAbbr = $ ( "<div>" )
4950 . text ( snippetItem . abbreviation )
5051 . attr ( "id" , "snippet-abbr" )
51- . attr ( "title" , Strings . CUSTOM_SNIPPETS_EDIT_ABBR_TOOLTIP . replace ( "{0}" , snippetItem . abbreviation ) ) ;
52+ . attr ( "title" , StringUtils . format ( Strings . CUSTOM_SNIPPETS_EDIT_ABBR_TOOLTIP , snippetItem . abbreviation ) ) ;
5253
5354 const $snippetTemplate = $ ( "<div>" )
5455 . text ( snippetItem . templateText )
5556 . attr ( "id" , "snippet-template" )
56- . attr ( "title" , Strings . CUSTOM_SNIPPETS_EDIT_TEMPLATE_TOOLTIP . replace ( "{0}" , snippetItem . templateText ) ) ;
57+ . attr ( "title" , StringUtils . format ( Strings . CUSTOM_SNIPPETS_EDIT_TEMPLATE_TOOLTIP , snippetItem . templateText ) ) ;
5758
5859 const $snippetDescription = $ ( "<div>" )
5960 . text (
@@ -65,14 +66,14 @@ define(function (require, exports, module) {
6566 . attr (
6667 "title" ,
6768 snippetItem . description && snippetItem . description . trim ( ) !== ""
68- ? Strings . CUSTOM_SNIPPETS_EDIT_DESC_TOOLTIP . replace ( "{0}" , snippetItem . description )
69+ ? StringUtils . format ( Strings . CUSTOM_SNIPPETS_EDIT_DESC_TOOLTIP , snippetItem . description )
6970 : Strings . CUSTOM_SNIPPETS_ADD_DESC_TOOLTIP
7071 ) ;
7172
7273 const $snippetFiles = $ ( "<div>" )
7374 . text ( snippetItem . fileExtension || "all" )
7475 . attr ( "id" , "snippet-files" )
75- . attr ( "title" , Strings . CUSTOM_SNIPPETS_EDIT_FILE_EXT_TOOLTIP . replace ( "{0}" , snippetItem . fileExtension || "all" ) ) ;
76+ . attr ( "title" , StringUtils . format ( Strings . CUSTOM_SNIPPETS_EDIT_FILE_EXT_TOOLTIP , snippetItem . fileExtension || "all" ) ) ;
7677
7778 const $deleteSnippet = $ ( "<div>" )
7879 . html ( `<i class="fas fa-trash"></i>` )
@@ -105,7 +106,7 @@ define(function (require, exports, module) {
105106 const filterText = $filterInput . val ( ) . trim ( ) ;
106107
107108 if ( filterText ) {
108- $emptyMessage . text ( Strings . CUSTOM_SNIPPETS_NO_MATCHES . replace ( "{0}" , filterText ) ) ;
109+ $emptyMessage . text ( StringUtils . format ( Strings . CUSTOM_SNIPPETS_NO_MATCHES , filterText ) ) ;
109110 } else {
110111 $emptyMessage . html ( Strings . CUSTOM_SNIPPETS_LEARN_MORE ) ;
111112 }
0 commit comments