Firebase Translate Text extension to translate more than one field - firebase

I just started to use Firebase Translate Extension to hopefully translate all the content on my app to several languages. However in the demo I saw and docs, I didn't see anything on how you can add more than one field? I'm assuming you can translate more than one.
Anyone have experience with the Translate Text extension. Also, would like to know your overall experience with it so far. I believe the extension has only been out a few months. Cheers

If you want more than one field translated, you can install the extension multiple times. Each installation can point to the same collection, but with a different input field and output field name.

Related

Translating a description and a button inside a plugin

I have a plugin that have a text and a button. The website have four languages and I need to translate the button text and also the description.
For translation, Polylang is being used.
Inside the plugin I can't access the Polylang config.
How should I do that?
Thanks!
After some research I found a solution.
I needed to prepare my plugin to receive the translation and in the end, actually was pretty simple.
This article cover everything that I needed, using PODEdit to create the PO and MO files for each language that I'm using.
https://premium.wpmudev.org/blog/how-to-translate-a-wordpress-plugin/
Since I was a layman in the subject, took longer to understand and figure out how to search about it.

How to make manual corrections to Google Translated Content?

The following Google Webmaster Central Blog entry suggests that you can manually correct translations by Google translate for your own website, which go live immediately and are also shown to your visitors: https://webmasters.googleblog.com/2012/05/now-you-can-polish-up-googles.html
Unfortunately this feature seems to be not online anymore. Does anyone know a similar solution to achieve these results?
We want to translate a WordPress WooCommerce website with a lot of products from English to Chinese and therefore have to decide if we want to translate everything manually or use automatic translation via Google translate. Since the automatic Google translation is much quicker we prefer that way but we want to correct the many incorrect translated terms.
In case there is no way to make manual corrections to the Google Translations we also thought about downloading the translated version and re-importing it into WooCommerce again to make the edits there.
The feature looks like it's available at http://translate.google.com/manager/website/

How to make MultiValueField with Composite Fields and i18n enabled work properly?

Have anyone tried to have a form with MultiValueField in Magnolia having Composite fields with i18n enabled and is working properly?
Currently, I'm encountering some weird behaviour when adding items to English then switching to other language and adding items again then switch back to English with items all gone. In one JIRA post it said it was already fixed but I still encounter this issue. Also encountered issues in sorting which apparently not supported by the DelegatingMultiValueTransformer.
If so, can you please show me the configuration you use to make this work properly? If needed customisation, can you give me ideas on how to do it?
Would really appreciate any help on this.
Btw, I'm using the latest release 5.4.6 now.
Maybe you don't want to put two questions in one request in the future ;)
Re language issue:
did you check that you have i18n enabled also on the subfields, since you are using deletage transformer? AFAIK with delegate you need to have them enabled on all fields in the hierarchy.
Re transformer & ordering:
IMO the only way out is to write custom transformer. Look at source code of MultiValueTransformer and in the part of the code where it goes just two levels down when checking child values, you need to go deeper.
You would also need to define different structure storage for your values there since one used by the MultiValueTransformer would not suffice for multiple levels.
Perhaps you can extend one of the more specialized MultiValue*Transformer or perhaps you try MultiValueJSONTransformer if storing all values in json array is enough for you (you would still need to extend it and to repopulate values back into dialog when opening dialog for editing).
HTH,
Jan

how to add BOLD feature for the user in meteor autoform field?

am using autoform in my project. One of my field is textarea "6 rows" for description. is it possible to add BOLD feature for the users to highlight the important points in the description?
and is it possible to give the users the ability to add images as well?
The best idea here is to use packages. So, for the images it depends on what you mean: upload or put links.
Case 1 - Upload
If you want only the links it is easy and you can match them with a regex. But otherwise, I suggest Dropbox API. I used it for one of my apps, so I am sure it works and it is not difficult to implement. First, add CollectionFS and then the dropbox package. Then create a developer account at dropbox and follow the documentation of the package. Just an example
Case 2 - Save Base64
I really do not suggest the second way although it is easier (just so much pressure on the database).
Concerning the user input
Again the simplest way is a package. There are some of them which give you the opportunity for a relation of the collection with the autoform. I do not know if here an integration with Dropbox is possible but if you go this way consider the Base64 possibility. But it again related to parsing the image with a regex.

Adding hyperlinks to the Description field

I am a user, not a programmer, whose forthcoming new website on Plone 4 requires adding hyperlinks inside the Description field of pages and folders. This is needed to point specific words to our website Dictionary as we had been doing on EZ Publish for the last 10 years.
Our developer says this can't be done in Plone. I'm looking to help them find how to do this (they don't seem to use English-language forums).
Is there an existing add-on or existing code for this? If not, is it possible to code this in? How? If not, will it become standard in Plone 5?
<a href="http://python.org>Python</a> will not work, as the description-field is ment and used as a meta-information of an item, holding plain-text only, and doesn't allow the usage of html-elements, nor embedded Javascript. That's probably why T. K. Nguyen recommends to provide an additional rich-text-field.
But you can use reStrucuredText instead. Tell your developer to exchange the description-snippet in concerned templates to:
<div tal:define="Std modules/Products.PythonScripts/standard;
restructured_text nocall: Std/restructured_text;"
tal:content="structure python: restructured_text(context.Description())">
</div>
It will transform any word starting with 'http:' or 'https:' to a link, furthermore will also recognize mail-addresses like 'someone#plone.org' and transform them to mail-links (on click opens the user's default mail-client, if available, with the address pre-populated in the 'To'-field).
If you want to have named links, use the reStrucutredText-syntax for the input, like this:
`Check out Python`_, you'll love it.
`Write a mail`_ to someone.
.. _Python: http://www.python.org
.. _Write a mail: someone#example.org
The tricky part is to figure out, which templates are affected, but it's doable of my experience (did it with preserving line-breaks in listing-views, not reStructuredText).
Alternatively use a JS-workaround, as proposed by T. K. Nguyen. Be aware though, that it may break accessibility to some users.
It is possible to customize the description fields to be rich text (HTML) instead of plain text, but it requires a developer.
You can also use JavaScript to look at a description field and replace (for example) any string that starts with "http" with a hyperlink pointing to that URL. Your developer would have to look for examples of such JavaScript code and then would have to know how to register it on your site and then invoke it.
This describes how to do something similar, for PloneFormGen field help text (which is also plain text):
https://designinterventionsystems.com/blog/how-to-make-urls-clickable-in-ploneformgen-field-help-text
It might be easier to have your developer create a new rich-text description field and have all your content types include that new field. That, however, would require that you update the view templates for those modified content types. This is much easier with Dexterity, which ships with Plone 5 and is available for use with Plone 4.x.
imho it's a really bad idea to convert the description field to any richttext (html, rst, md) field. You need to change a hole bunch of templates to avoid html code rendered everywhere.
Example:
search
collections
content
portlets
Addons
The description is also often used as title attribute on links, in those cases you need to convert it to plain/text. And there are several more issues, where you could ran into.
As #T. Kim Nguyen wrote: Consider add a new textfield and show it, where necessary, probably implemented as a Viewlet in the below title slot.
Looking at your current site, it seems like you want this to provide a teaser for each article, which may contain links. If that is the case, then you can find other ways to do this without making the description html.
For instance, if you used collective.cover for your portal/collection pages then a Rich Text Tile would allow you to cut down the the object text to an appropriate size, but still edit it with a Rich Text editor, and keep/insert hyperlinks.

Resources