diff --git a/app/assets/javascripts/app/lib/app_post/i18n.coffee b/app/assets/javascripts/app/lib/app_post/i18n.coffee index 6183be418..a754c0ade 100644 --- a/app/assets/javascripts/app/lib/app_post/i18n.coffee +++ b/app/assets/javascripts/app/lib/app_post/i18n.coffee @@ -186,7 +186,8 @@ class _i18nSingleton extends Spine.Module # apply inline markup translated - .replace(/\*(.+?)\*/gm, '$1') + .replace(/\|\|(.+?)\|\|/gm, '$1') + .replace(/\|(.+?)\|/gm, '$1') .replace(/_(.+?)_/gm, '$1') .replace(/§(.+?)§/gm, '$1') diff --git a/public/assets/tests/core.js b/public/assets/tests/core.js index a42c514a6..110f66947 100644 --- a/public/assets/tests/core.js +++ b/public/assets/tests/core.js @@ -274,9 +274,12 @@ test( "i18n", function() { translated = App.i18n.translateContent('%s %s test', 123, 'xxx'); equal( translated, '123 xxx test', 'de-de - %s %s' ); - translated = App.i18n.translateContent('*%s* %s test', 123, 'xxx'); + translated = App.i18n.translateContent('|%s| %s test', 123, 'xxx'); equal( translated, '123 xxx test', 'de-de - *%s* %s' ); + translated = App.i18n.translateContent('||%s|| %s test', 123, 'xxx'); + equal( translated, '123 xxx test', 'de-de - *%s* %s' ); + translated = App.i18n.translateContent('_%s_ %s test', 123, 'xxx'); equal( translated, '123 xxx test', 'de-de - _%s_ %s' ); @@ -311,9 +314,12 @@ test( "i18n", function() { translated = App.i18n.translateContent('%s %s test', 123, 'xxx'); equal( translated, '123 xxx test', 'en-us - %s %s' ); - translated = App.i18n.translateContent('*%s* %s test', 123, 'xxx'); + translated = App.i18n.translateContent('|%s| %s test', 123, 'xxx'); equal( translated, '123 xxx test', 'en-us - *%s* %s' ); + translated = App.i18n.translateContent('||%s|| %s test', 123, 'xxx'); + equal( translated, '123 xxx test', 'en-us - *%s* %s' ); + translated = App.i18n.translateContent('_%s_ %s test', 123, 'xxx'); equal( translated, '123 xxx test', 'en-us - _%s_ %s' );