TinyMCE English Internationalization (i18n) in v5 - internationalization

When upgrading TinyMCE I could notice that in the latest version (which is 5.2.0) for i18n the en.js is missing, which was not the case in version 4 (see DOWNLOAD - no way add this otherwise). According to docs v5#localization#language (US) English is by default but there's no English in the language pack for v5, does it means that we don't need to include this in the tinymce/langs (for self-hosting)? Couldn't find anything about this in the changelog.

The editor's default is US English so there is no language pack needed for US English. If you wish to change any of the default strings for US English you can certainly create a file and change the values as you like. If you don't want to change the default you don't need the string in your file. For example you could create your own en_US.js file with just a few strings:
tinymce.addI18n('en_US',{
"Formats": "Custom Formats Text",
"Font Sizes": "Custom Font Size Text",
"Clear formatting": "Custom Clear Formatting Text",
"Keep Formatting": "Custom Keep",
"Remove Formatting": "Custom Remove"
});

Related

Rinohtype frontend for Sphinx: How to manipulate the PDF subtitle, which is 'Release' by default

I'm generating PDFs via the rinohtype extension of Sphinx (i.e. not via the LaTex extension!).
For the two bundled rinohtype templates 'book' and 'article', where the latter is the one I use, the subtitle of the title page always starts with 'Release' by default (and a release version string if one is provided in conf.py via release = '1.0' - this is commented out in my case).
I want to:
1a) either get rid of the complete subtitle, i.e. also 'Release' isn't printed on the PDF title page, or
1b) want to change 'Release' to some other String, 'Rev.' in my case;
2) also have the modification of 1a) and/or 1b) applied to the page headers after "front matter", where 'Release' is also the default string.
What I found so far is:
Here it is described for LaTex, how to hide 'Release' (the subtitle) on the front page. However, this doesnt work for rinohtype. No real surprise, but I gave it a try because rinohtype also interprets some latex settings...
How do I get rid of the "Release 1" in the Page Header of the Sphinx Latex Output?
I also digged into rinohtype stylesheets and I found a way to hide elements of the title page. The linked stylesheet example shows how to hide the date entry on the title page. However, I'm not sure if this is actually the easiest solution (i.e. changing/extending the stylesheet) and this does also not hide the 'Release' String in the following page headers - see my Question 2) above.
https://github.com/brechtm/rinohtype/blob/40a63c4e5ad7550f62b6860f1812cb67cafb9dc7/tests_regression/sphinx_minimal.rts
rinohtype currently does not support changing "Release" into something else at the moment. This might be added in the near future however; see issue #157. This should also affect the page headers/footers.
You can hide the Release subtitle by means of a style sheet, like you discovered. It is also possible to remove it from the page header by supplying a custom template configuration. You'll need to override the header text for the contents and back matter page templates:
[contents_right_page]
header_text = '\t\t{DOCUMENT_TITLE}'
[contents_left_page]
header_text = '{DOCUMENT_TITLE}'
[back_matter_right_page]
header_text = '\t\t{DOCUMENT_TITLE}'
[back_matter_left_page]
header_text = '{DOCUMENT_TITLE}'

AEM How to prevent localization happening otb?

I have a scenario wherein i18n becomes overhead to content authors. The authors want dialog labels to be in English only for all locales. But certain headings/labels on dialog gets localized as they are available in otb dictionaries. Example label 'Advanced' from page properties dialog gets translated for non-english sites.
Is there a way I can prevent internalization happening?
If you refer to AEM's documentation for i18n, you can see its driven by the locale/language set in slingRequest. you can override this by explicitly fixing the i18n but if you do that none of your translations will work -
Locale pageLang = new Locale("en");
ResourceBundle resourceBundle = slingRequest.getResourceBundle(pageLang);
I18n i18n = new I18n(resourceBundle);
An other alternative (a little extra effort) in you need to do this only for dialog boxes is -
Create your own dictionary for translations, refer here
Use unique name-spacing for your keys eg - myapp.mycomponent_abc.label
Use above keys in your component dialog to ensure that your version of translation is picked. If for all languages you want english only dialogs, all your have to do is duplicate your english dictionary and change the language key in it to relevant language while keeping translations still in english.

TYPO3 Content Element "Image only" missing

I just installed a new 7.6.10 TYPO3 CMS and I am missing the content element "Images only". If I click on "+ Content" I only have Header Only, Text & Media, Bullet List, Table, File Links available. I have nothing configured at TS / TCE Setup (removeItems etc.). In addition, I noticed that this content type (Images) is not available to select for user groups as well.
At another system I installed some month ago (and already updated to 7.6.10) this content element is available.
Do you have an information about the appreance of this element?
Probably, in your old system you're using css_styled_content extension, and in a newly installed fluid_styled_content is active by default, which replaces the former one.
And according to TYPO3 7.5 changelog:
EXT:fluid_styled_content simplifies the available CTypes which results
in types text, image and textpic being dropped in favor of type
textmedia. The relation field is changed from image to
media_references.
So, disabling fluid_styled_content and enabling css_styled_content should help you. Although I wouldn't recommend to do so for a fresh installation, because CEs, based on Fluid are far more flexible, than those, based on TypoScript.
you could do Everything with the element "Text with Images" what you could do whit the other simpler Typoes "text" or "images Only". therefore the TYPO3 Developers decided to Unify the funktion into One Content Element. to make the Backend Simpler.
as TYPO3 now offers support for more Media types (e.g. video) they reneamed "Text with images" to "Text whith Media".
if you just Need images only you could still use the "Text with Media" element. and just don't enter any text.

Ckeditor's Link Dialog incomplete?

In an Xpage running on Domino 9.0.1 I'm using a rich text control with some custom toolbar configuration using the control's "attr" property as it is described here: https://frostillic.us/f.nsf/posts/quick-and-dirty-ckeditor-toolbar-setup-for-xpages
I added the link toolbar template using
<xp:this.attrs>
<xp:attr name="toolbar">
<xp:this.value><![CDATA[[["Link", "Unlink", "Anchor"]]]]></xp:this.value>
</xp:attr>
</xp:this.attrs>
All three buttons are displayed fine, esp. I'm able to define an anchor link target.
But trying to reference the anchor target I find that the Link dialog is somewhat incomplete as I can't define my link to use a relative target on the same page. I tried entering a reference in the dialog's URL field as #myAnchorId, but that results in a link looking like this:
....
Here's an image of the dialog that pops up from my Xpage when I hit the "URL link" button:
And this is what the dialog looks like that I can test from the CKEditor Samples page:
I'm aware that the samples page uses CKEditor V 4, so the dialog is somewhat different, but even V 3.6 should be able to reference anchor links using the dialog.
I already looked up on the installed ckeditor's version; \DominoData\domino\html\ckeditor\version.txt says:
cke_version=3.6.6.2
cke_revision=20130606-1534
Question is: what's missing here? Do I have to somehow modify the dialog?
Oh my, finally got it to work; #IBM: this feature truly could use some proper documentation! I'll mark this answer as a community wiki.
Indeed a different dialog is used here, which btw appears to apply to all the dialogs in use with Domino's CKEditor implementation. The trick in my case is to use one of the custom toolbar items instead of the standard one; up to now I found three of those customized items:
use MenuLink instead of the standard Link item; this item
consists of two sub items ('URL Link' and 'Anchor Link'), each calling its own dialog version; the resulting toolbar definition then looks like this: ['MenuLink', 'Unlink', 'Anchor']
use MenuPaste instead of the standard Paste item; again, this
item consists of two sub items ('Paste' and 'Paste as text'), again
each calling its own dialog version
use LotusSpellChecker to add IBM's own spell checking feature, where CKE's standard spell checker isn't working
I found hints to those three custom items inside my local \DominoData\domino\html\ckeditor\config.js. Don't know if those are all custom items available to day.
EDIT:
IBM's Domino Designer Xpages User Guide mentions another means of customizing the toolbar; the section unfortunately is incorrect in describing the options for the toolbarType attribute: be aware that all named types must start with capital letters, e.g. Basic, Slim, Medium, Large, Full, while the also mentioned Lite type isn't working at all; mistyping or using a non-existing value results in the editor not being displayed at all.
The link dialog that you're using is not the default one, so you should check how to modify it or replace it with the default one.

text direction in CK Editor

How can I set text direction [rtl] on load editor?
According to the docs, this should do it:
CKEDITOR.config.contentsLangDirection in the CKSource manual
Example taken from there:
config.contentsLangDirection = 'rtl';
Another way to do it is directly from your view file, the benefit of using replace() method is that you can use different direction and style for each of your view.
CKEDITOR.replace( 'article_area', {
contentsLangDirection: 'rtl'
} );
By using replace() you can also do other filtering stuff like allowing/disallowing tags and removing buttons from the editor. for a detailed description visit:
http://ckeditor.com/ckeditor_4.1rc/samples/datafiltering.html
If you use CKEditor version 5, the config block is like:
language: {
ui: 'en',
content: 'ar'
}
Where in this example, the editor itself will remain in english (both headings and orientation) and the content will be edited in arabic (therefore right to left).
I chose this example to illustrate that it's possible to use different languages for these two purposes (say if you build a CMS with the text editor and admins want to add arabic or hebrew translations for different site content but interact with the editor itself in english). But you could also set ui: 'ar' in order to mirror the editor itself as well (note that to do this I think you have to bundle in the languages in one of several ways, see the links below for reference).
The support for bidirectional text seems to be good (aka type something in Arabic and then type in english and it automatically switches to left-to-right only while you type in english).
References:
https://ckeditor.com/blog/CKEditor-5-v12.4.0-with-image-resizing-to-do-lists-RTL-language-support-and-more/
and the linked
https://ckeditor.com/docs/ckeditor5/latest/features/ui-language.html#righttoleft-rtl-languages-support
CKEDITOR.replace('editor1', {
language: 'es',
removeButtons: 'PasteFromWord'
});
just change the ContentsLangDirection="Rtl" inside the CkEditor like below
<CKEditor:CKEditorControl ID="CKEdMainPageDescriptionWebsiteMobileappAr" BasePath="ckeditor/" runat="server" Width="100%" Toolbar="Basic" ContentsLangDirection="Rtl"
ToolbarBasic="|Bold|Italic|Underline|Strike|-|NumberedList|BulletedList|Outdent|Indent|-|JustifyLeft|JustifyCenter|JustifyRight|JustifyBlock|
|Styles|-|Format|-|Font|-|FontSize|
/
|Link|Unlink|-|TextColor|-|Undo|Redo|Cut|Copy|Paste|PasteText|PasteFromWord|"> </CKEditor:CKEditorControl>
As of version 5, the direction can be set by changing language settings. You can see more details here.

Resources