Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport lost tinymce translations #930

Merged
merged 3 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions mockup/patterns/tinymce/js/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ define([

editor.addButton('unlink', {
icon: 'unlink',
tooltip: 'Remove link(s)',
tooltip: 'Remove link',
cmd: 'unlink',
stateSelector: 'a[href]'
});
Expand Down Expand Up @@ -466,13 +466,23 @@ define([
upload: this.options.upload,
text: this.options.text,
insertHeading: this.options.text.insertHeading,
insertImageHelp: this.options.text.insertImageHelp,
uploadText: this.options.text.upload,
insertLinkHelp: this.options.text.insertLinkHelp,
internal: this.options.text.internal,
external: this.options.text.external,
anchor: this.options.text.anchor,
anchorLabel: this.options.text.anchorLabel,
target: this.options.text.target,
linkTypes: this.options.linkTypes,
externalText: this.options.text.external,
emailText: this.options.text.email,
subjectText: this.options.text.subject,
targetList: this.options.targetList,
titleText: this.options.text.title,
externalImageText: this.options.text.externalImage,
internalImageText: this.options.text.internalImage,
externalImage: this.options.text.externalImage,
externalImageText: this.options.text.externalImageText,
altText: this.options.text.alt,
imageAlignText: this.options.text.imageAlign,
scaleText: this.options.text.scale,
Expand Down
19 changes: 14 additions & 5 deletions mockup/patterns/tinymce/pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,23 @@ define([
insertHeading: _t('Insert link'),
title: _t('Title'),
internal: _t('Internal'),
external: _t('External URL (can be relative within this site or absolute if it starts with http:// or https://)'),
external: _t('External'),
externalText: _t('External URL (can be relative within this site or absolute if it starts with http:// or https://)'),
email: _t('Email Address'),
anchor: _t('Anchor'),
anchorLabel: _t('Select an anchor'),
target: _t('Target'),
subject: _t('Email Subject (optional)'),
image: _t('Image'),
imageAlign: _t('Align'),
scale: _t('Size'),
alt: _t('Alternative Text'),
externalImage: _t('External Image URL (can be relative within this site or absolute if it starts with http:// or https://)')
insertImageHelp: _t('Specify an image. It can be on this site already (Internal Image), an image you upload (Upload), or from an external site (External Image).'),
internalImage: _t('Internal Image'),
externalImage: _t('External Image'),
externalImageText: _t('External Image URL (can be relative within this site or absolute if it starts with http:// or https://)'),
upload: _t('Upload'),
insertLinkHelp: _t('Specify the object to link to. It can be on this site already (Internal), an object you upload (Upload), from an external site (External), an email address (Email), or an anchor on this page (Anchor).'),
},
// URL generation options
loadingBaseUrl: '../../../bower_components/tinymce-builded/js/tinymce/',
Expand All @@ -165,9 +173,10 @@ define([
{title: 'Large', value: 'large'}
],
imageClasses: {
'image-inline': 'Inline',
'image-right': 'Right',
'image-left': 'Left'
'image-inline': _t('Inline'),
'image-right': _t('Right'),
'image-left': _t('Left'),
'image-responsive': _t('Responsive')
},
targetList: [
{text: _t('Open in this window / frame'), value: ''},
Expand Down
8 changes: 4 additions & 4 deletions mockup/patterns/tinymce/templates/image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<div class="linkModal">
<h1><%- insertHeading %></h1>
<% if(_.contains(linkTypes, 'uploadImage')){ %>
<p class="info">Specify an image. It can be on this site already ("Internal Image"), an image you upload ("Upload"), or from an external site ("External Image").</p>
<p class="info"><%- insertImageHelp %></p>
<% } %>

<div class="linkTypes pat-autotoc autotabs"
data-pat-autotoc="section:fieldset;levels:legend;IDPrefix:tinymce-autotoc-">

<% if(_.contains(linkTypes, 'image')){ %>
<fieldset class="linkType image" data-linkType="image">
<legend id="tinylink-image">Internal Image</legend>
<legend id="tinylink-image"><%- internalImageText %></legend>
<div class="form-inline">
<div class="form-group main">
<input type="text" name="image" />
Expand All @@ -32,14 +32,14 @@

<% if(_.contains(linkTypes, 'uploadImage')){ %>
<fieldset class="linkType uploadImage" data-linkType="uploadImage">
<legend id="tinylink-uploadImage">Upload</legend>
<legend id="tinylink-uploadImage"><%- uploadText %></legend>
<div class="uploadify-me"></div>
</fieldset>
<% } %>

<% if(_.contains(linkTypes, 'externalImage')){ %>
<fieldset class="linkType externalImage" data-linkType="externalImage">
<legend id="tinylink-externalImage">External Image</legend>
<legend id="tinylink-externalImage"><%- externalImage %></legend>
<div>
<div class="form-group main">
<label><%- externalImageText %></label>
Expand Down
16 changes: 8 additions & 8 deletions mockup/patterns/tinymce/templates/link.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<div class="linkModal">
<h1><%- insertHeading %></h1>
<% if(upload){ %>
<p class="info">Specify the object to link to. It can be on this site already ("Internal"), an object you upload ("Upload"), from an external site ("External"), an email address ("Email"), or an anchor on this page ("Anchor").</p>
<p class="info"><%- insertLinkHelp %></p>
<% } %>

<div class="linkTypes pat-autotoc autotabs"
data-pat-autotoc="section:fieldset;levels:legend;IDPrefix:tinymce-autotoc-">

<fieldset class="linkType internal" data-linkType="internal">
<legend id="tinylink-internal">Internal</legend>
<legend id="tinylink-internal"><%- internal %></legend>
<div>
<div class="form-group main">
<!-- this gives the name to the "linkType" -->
Expand All @@ -20,21 +20,21 @@

<% if(upload){ %>
<fieldset class="linkType upload" data-linkType="upload">
<legend id="tinylink-upload">Upload</legend>
<legend id="tinylink-upload"><%- uploadText %></legend>
<div class="uploadify-me"></div>
</fieldset>
<% } %>

<fieldset class="linkType external" data-linkType="external">
<legend id="tinylink-external">External</legend>
<legend id="tinylink-external"><%- external %></legend>
<div class="form-group main">
<label for="external"><%- externalText %></label>
<input type="text" name="external" />
</div>
</fieldset>

<fieldset class="linkType email" data-linkType="email">
<legend id="tinylink-email">Email</legend>
<legend id="tinylink-email"><%- emailText %></legend>
<div class="form-inline">
<div class="form-group main">
<label><%- emailText %></label>
Expand All @@ -48,10 +48,10 @@
</fieldset>

<fieldset class="linkType anchor" data-linkType="anchor">
<legend id="tinylink-anchor">Anchor</legend>
<legend id="tinylink-anchor"><%- anchor %></legend>
<div>
<div class="form-group main">
<label>Select an anchor</label>
<label><%- anchorLabel %></label>
<div class="input-wrapper">
<select name="anchor" class="pat-select2" data-pat-select2="width:500px" />
</div>
Expand All @@ -63,7 +63,7 @@

<div class="common-controls">
<div class="form-group">
<label>Target</label>
<label><%- target %></label>
<select name="target">
<% _.each(targetList, function(target){ %>
<option value="<%- target.value %>"><%- target.text %></option>
Expand Down
5 changes: 5 additions & 0 deletions news/910.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tinymce pattern: Add missing translations by...
- copying generateModalHtml function from master branch,
- adding some backported xml changes from 71ddf6f387
- adding 2 further translations (not yet in master)
[djowett-ftw]