Make quote partial prefix/suffix translatable
This commit is contained in:
parent
7b2328ccba
commit
12ee20cde4
@ -2020,6 +2020,10 @@ function fictioneer_get_js_translations() {
|
||||
'oauthAccountAlreadyLinked' => __( 'Account already linked to another profile.', 'fictioneer' ),
|
||||
'oauthNew' => __( 'Your account has been successfully linked. <strong>Hint:</strong> You can change your display name in your profile and link additional accounts.', 'fictioneer' ),
|
||||
'oauthAccountLinked' => __( 'Account has been successfully linked.', 'fictioneer' )
|
||||
),
|
||||
'partial' => array(
|
||||
'quoteFragmentPrefix' => _x( '[…] ', 'Prefix for partial quotes', 'fictioneer' ),
|
||||
'quoteFragmentSuffix' => _x( ' […]', 'Suffix for partial quotes', 'fictioneer' )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
2
js/chapter.min.js
vendored
2
js/chapter.min.js
vendored
File diff suppressed because one or more lines are too long
6
js/complete.min.js
vendored
6
js/complete.min.js
vendored
File diff suppressed because one or more lines are too long
@ -139,8 +139,8 @@ function fcn_getQuote(e) {
|
||||
const anchor = `[anchor]${e.target.closest('p[data-paragraph-id]').id}[/anchor]`;
|
||||
|
||||
let quote = e.target.closest('p[data-paragraph-id]').querySelector('.paragraph-inner').innerText;
|
||||
let pre = '[…] ';
|
||||
let suf = ' […]';
|
||||
let pre = fictioneer_tl.partial.quoteFragmentPrefix;
|
||||
let suf = fictioneer_tl.partial.quoteFragmentSuffix;
|
||||
|
||||
// Build from text selection and add ellipsis if necessary
|
||||
if (quote.length > 16 && selection.replace(/\s/g, '').length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user