Microsoft translator changing phrase where there are html spans - microsoft-translator

Plain english sentence is:
While in 5th direct and ready for the downshift to 4th overdrive, push
the range preselection lever down.
Converts to French correctly as:
Alors que dans le 5ème direct et prêt pour le downshift à la 4ème
overdrive, pousser le levier de présélection de gamme vers le bas.
However, when including html (&textType=html), the phrase doesn't have the same meaning:
While in 5th direct and ready for the downshift to <span data-id="xyz123">4th overdrive</span>, push the range preselection lever down.
Translates to:
Alors que dans le 5ème direct et prêt pour le downshift à 4e
overdrive, pousser la gamme levier de présélection duvet.

The tags are considered an additional token in the sentence. Similar effect as punctuation, both having an effect on the translation.

Related

Remove space inside cell (padding)

I already use border-spacing, border-collapse, padding to reduce the space, but it doesn't reduce the space as much as I wanted to. Can we reduce more than this?
before added border spacing :
after added border spacing etc:
no se como tengas colocadas las etiquetas, pero si los elementos que estan dentro de la celda estan contenidas dentro de un div podrias añadirle a la clase propiedad tipo asi :
div class="row-12" dado que al igual que el column el ancho max es de 12

When a image is right aligned, text of below paragraphs is not wrapping around Image in html page. But wraps inside the Text area of CKeditor [duplicate]

This question already has answers here:
How to wrap text inside to different paragraphs around image inside the first paragraph (<p> tag). (Content is inputted using CKeditor Plugin)
(5 answers)
Closed 4 years ago.
I am using CKeditor to input RichText.
Inside the text area of CKEditor, the text is perfectly wrapped over the image.
But the text is not wraping on the html page.
This is how it looks in CKeditor
But my html looks like this.
What may be I am missing here. ?
Here is the actual code snippet
<p>Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups under
<img alt="" src="/media/uploads/2018/09/27/sufs5o_fWCbPPM.jpg" style="float:right; height:1080px; width:420px">
Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. .
</p>
<p>s settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.</p>
<img align="right" hspace="3px" vspace="3px" alt="" src="/media/uploads/2018/09/27/sufs5o_fWCbPPM.jpg" style="height:1080px; width:420px">
Try this on
.floatright {
float: right;
clear: right;
position: relative;
margin: 0 0 0.5em 0.5em;
}
<div style="text-align:justify;margin:6px">
<img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Mandala1_detail.jpg/150px-Mandala1_detail.jpg" width="150" height="173"
class="floatright"
>
<p>
El arte budista tiene su origen en el subcontinente indio (actuales India, Bangladés, Nepal y Pakistán) en los siglos posteriores a la vida de Siddhartha Gautama, el Buda histórico, entre los siglos vi y v a. C. Más tarde, gracias al contacto con otras culturas, logró evolucionar y difundirse por el resto de Asia y el mundo.
Una primera etapa, llamada preicónica, se sitúa antes del siglo i d. C. y se caracteriza por no recurrir a representaciones directas de Siddhartha Gautama como el Buda Śākyamuni o de los budas míticos que se suponen existieron en eras pasadas. La etapa siguiente, icónica, tiene por el contrario a la imagen humana del Buda y los budas del pasado, del futuro y de otros universos como símbolo central de sus obras de arte.
Desde entonces, el arte budista se diversificó y evolucionó para adaptarse a las nuevas regiones en las que comenzaba a sumar adeptos. Se expandió hacia el este y el norte a través de Asia Central, para formar lo que luego fue clasificado como arte budista del norte —en contraposición al arte budista del sur, que surgiría en el sudeste de Asia. En India, el arte budista floreció e incluso llegó a influir en el desarrollo del arte hindú, hasta que el budismo casi desapareció alrededor del siglo x, con la expansión del hinduismo y el islam.
</p>
<p>
El arte budista tiene su origen en el subcontinente indio (actuales India, Bangladés, Nepal y Pakistán) en los siglos posteriores a la vida de Siddhartha Gautama, el Buda histórico, entre los siglos vi y v a. C. Más tarde, gracias al contacto con otras culturas, logró evolucionar y difundirse por el resto de Asia y el mundo.
Una primera etapa, llamada preicónica, se sitúa antes del siglo i d. C. y se caracteriza por no recurrir a representaciones directas de Siddhartha Gautama como el Buda Śākyamuni o de los budas míticos que se suponen existieron en eras pasadas. La etapa siguiente, icónica, tiene por el contrario a la imagen humana del Buda y los budas del pasado, del futuro y de otros universos como símbolo central de sus obras de arte.
Desde entonces, el arte budista se diversificó y evolucionó para adaptarse a las nuevas regiones en las que comenzaba a sumar adeptos. Se expandió hacia el este y el norte a través de Asia Central, para formar lo que luego fue clasificado como arte budista del norte —en contraposición al arte budista del sur, que surgiría en el sudeste de Asia. En India, el arte budista floreció e incluso llegó a influir en el desarrollo del arte hindú, hasta que el budismo casi desapareció alrededor del siglo x, con la expansión del hinduismo y el islam.
</p>
</div>

Extra indentation for <strong> and <a>tags?

Hello Stack Overflow community,
I have coded a list:
<h2 class="top-heading-big" style="text-align: center;">Déroulement de la Prestation</h2>
<ul style="line-height: 160%;">
<li class="presta"><a target="_blank" class="retour" href=/pages/contact title="Envoyer un email à Pascal pour recevoir un Audit" style="text-decoration: underline; color:#1990C6;">Prise de contact</a> avec votre besoin succintement décrit</li><br>
<li class="presta">Audit Vidéo de 10 min, Gratuit et Sans Engagement </li><br>
<li class="presta">Ajustement & Établissement du Devis</li><br>
<li class="presta">Réception du Paiement</li><br>
<li class="presta">Prestation livrée dans les meilleurs délais</li><br>
<li class="presta">Compte-Rendu en vidéo de 10 min, et réception du feedback client avec témoignage</li><br>
<li class="presta"><strong>Consulting Personnalisé Offert</strong> pour aller plus loin</li><br>
</ul>
<br>
It looks like the indentation is not regular among the different lines of my list.
In particular, the first and last lines have an extra indentation.
So I immediately thought, this is because of the and tags that appear right at the beginning of each lines.
I had none idea of this, could you confirm?
And if this a well-known fact, what would be the best solution to have an aquel indentation for each line?
I know I could put a new class for the first and last element, and then play with CSS to adapt this extra indentation, but I'm pretty sure there is something better.
PS: I'm using Google Chrome last version
Any help would be greatly appreciated on this matter :)
Sincerely, Pascal
URL: https://www.pascaldegut.com/pages/prestation-webdesign?variant=16668787376246
Just give it a try: remove the whitespaces in the first and last li content right at the beginning, please.
I've looked at your generated HTML Code of the given URL above. It's not the exact semantic. It's obviously not a valid html semantic. Change your code from:
<ul style="line-height: 160%;">
<li class="presta">
<a target="_blank" class="retour" href="/pages/contact" title="Envoyer un email à Pascal pour recevoir un Audit" style="text-decoration: underline; color:#1990C6;">Prise de contact</a> avec votre besoin succintement décrit</li>
<br>
<li class="presta">Audit Vidéo de 10 min, Gratuit et Sans Engagement </li>
<br>
<li class="presta">Ajustement & Établissement du Devis</li>
<br>
<li class="presta">Réception du Paiement</li>
<br>
<li class="presta">Prestation livrée dans les meilleurs délais</li>
<br>
<li class="presta">Compte-Rendu en vidéo de 10 min, et réception du feedback client avec témoignage</li>
<br>
<li class="presta">
<strong>Consulting Personnalisé Offert</strong> pour aller plus loin</li>
<br>
</ul>
to:
<ul style="line-height: 160%;">
<li class="presta"><a target="_blank" class="retour" href="/pages/contact" title="Envoyer un email à Pascal pour recevoir un Audit" style="text-decoration: underline; color:#1990C6;">Prise de contact</a> avec votre besoin succintement décrit</li>
<li class="presta">Audit Vidéo de 10 min, Gratuit et Sans Engagement </li>
<li class="presta">Ajustement & Établissement du Devis</li>
<li class="presta">Réception du Paiement</li>
<li class="presta">Prestation livrée dans les meilleurs délais</li>
<li class="presta">Compte-Rendu en vidéo de 10 min, et réception du feedback client avec témoignage</li>
<li class="presta"><strong>Consulting Personnalisé Offert</strong> pour aller plus loin</li>
</ul>
I've also removed the <br>s between the <li> elements. For the spacing purpose you have to define a margin to the <li> elements. To create a valid mark up you have to remove <br> as direct childs of <ul>. If you really need this sort of break you can use it like that: <li>some content<br></li>
Anyway, I recommend a margin-bottom for this behaviour.

Duplicate display Issue in an AngularJS drop-down list

look this image to see the problem
I develop a simple application (to start) in AngularJS and I have a worry because my drop down list that allows to choose the list of movies by style, displays the styles present several times in my JSON file. I have tried several solutions but nothing works and I block on it for a while, there is only that (and can be added by after) to finish my application and fill my JSON file.
JSON FILE :
[
{
"picture" : "la-malediction",
"title" : "LA MALEDICTION",
"year" : "1976",
"time" : "1h41",
"director" : "Richard Donner",
"synopsis" : "Robert Thorn est ambassadeur des États-Unis à Londres. Plusieurs décès tragiques et étranges ont lieu dans son entourage. Keith Jennings, un photographe et le père Brennan finissent par convaincre Thorn que Damien, son fils de cinq ans, un orphelin aux origines obscures qu'il a adopté à sa naissance à l'insu de sa femme qui venait de faire une fausse couche, n'est autre que l'Antéchrist.",
"style" : "Horreur",
"scenario" : "David Seltzer",
"production" : "20th Century Fox",
"music" : "Jerry Goldsmith",
"score" : "7.5/10",
"actors" : "Gregory Peck, Lee Remick, David Warner, Billie Whitelaw, Patrick Throughton, Harvey Stephens, Sheila Reynor, Martin Benson, Leo McKern, Tommy Duggan, Anthony Nicholls, Nicholas Campbell"
},
{
"picture" : "volte-face",
"title" : "Volte/Face",
"year" : "1997",
"time" : "2h18",
"director" : "John Woo",
"synopsis" : "1991 : le terroriste Castor Troy tente d'abattre son ennemi juré Sean Archer, agent du FBI. Au moment du tir, il rate Archer, mais abat accidentellement son fils. Six ans plus tard, Castor est repéré à Los Angeles. À la suite d'un violent affrontement à l'aéroport, Castor est plongé dans le coma par Archer. Ce dernier apprend que Troy a placé une bombe chimique en ville. Il prend le visage de Troy, grâce à une opération chirurgicale, afin d'infiltrer un pénitencier secret où est détenu Pollux, le frère de Castor, pour connaitre l'emplacement de la bombe. Entre-temps, Troy sort du coma et se fait lui-même greffer le masque d'Archer, puis tue tous ceux qui sont au courant de l'opération, volant ainsi le travail, la vie et la femme d'Archer. Livré à lui-même, privé de son identité, ce dernier décide de s'évader...",
"style" : "Thriller",
"scenario" : "Mike Werb, Michael Colleary",
"production" : "Paramount Picture",
"music" : "John Powell",
"score" : "9/10",
"actors" : "Joh Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Dominique Swain, Gina Gershon, Nick Cassavetes"
},
{
"picture" : "la-fureur-du-dragon",
"title" : "La fureur du dragon",
"year" : "1997",
"time" : "2h18",
"director" : "John Woo",
"synopsis" : "1991 : le terroriste Castor Troy tente d'abattre son ennemi juré Sean Archer, agent du FBI. Au moment du tir, il rate Archer, mais abat accidentellement son fils. Six ans plus tard, Castor est repéré à Los Angeles. À la suite d'un violent affrontement à l'aéroport, Castor est plongé dans le coma par Archer. Ce dernier apprend que Troy a placé une bombe chimique en ville. Il prend le visage de Troy, grâce à une opération chirurgicale, afin d'infiltrer un pénitencier secret où est détenu Pollux, le frère de Castor, pour connaitre l'emplacement de la bombe. Entre-temps, Troy sort du coma et se fait lui-même greffer le masque d'Archer, puis tue tous ceux qui sont au courant de l'opération, volant ainsi le travail, la vie et la femme d'Archer. Livré à lui-même, privé de son identité, ce dernier décide de s'évader...",
"style" : "Kung-fu",
"scenario" : "Mike Werb, Michael Colleary",
"production" : "Paramount Picture",
"music" : "John Powell",
"score" : "9/10",
"actors" : "John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Dominique Swain, Gina Gershon, Nick Cassavetes"
},
{
"picture" : "la-fureur-du-dragon",
"title" : "La fureur du dragon",
"year" : "1997",
"time" : "2h18",
"director" : "John Woo",
"synopsis" : "1991 : le terroriste Castor Troy tente d'abattre son ennemi juré Sean Archer, agent du FBI. Au moment du tir, il rate Archer, mais abat accidentellement son fils. Six ans plus tard, Castor est repéré à Los Angeles. À la suite d'un violent affrontement à l'aéroport, Castor est plongé dans le coma par Archer. Ce dernier apprend que Troy a placé une bombe chimique en ville. Il prend le visage de Troy, grâce à une opération chirurgicale, afin d'infiltrer un pénitencier secret où est détenu Pollux, le frère de Castor, pour connaitre l'emplacement de la bombe. Entre-temps, Troy sort du coma et se fait lui-même greffer le masque d'Archer, puis tue tous ceux qui sont au courant de l'opération, volant ainsi le travail, la vie et la femme d'Archer. Livré à lui-même, privé de son identité, ce dernier décide de s'évader...",
"style" : "Kung-fu",
"scenario" : "Mike Werb, Michael Colleary",
"production" : "Paramount Picture",
"music" : "John Powell",
"score" : "9/10",
"actors" : "John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Dominique Swain, Gina Gershon, Nick Cassavetes"
}
]
<div class="jumbotron">
<input type="text" ng-model="query"/>
<br>
<br>
<select ng-model="styles" ng-options="media.style for media in medias track by media.style"></select>
<div class="order">
<p>
<label><input type="radio" ng-model="direction" /> Croissant</label>
</p>
<p>
<label><input type="radio" ng-model="direction" value="reverse" /> Décroissant</label>
</p>
</div>
</div>
<article class="media" ng-repeat="media in medias | filter : styles">
<div class="jumbotron">
<div class="media">
<h2 id="title-movie">{{media.title}}</h2>
<div class="media-left" >
<img ng-src="images/{{media.picture}}.png" alt="{{media.title}}" />
</div>
<div class="media-body" style="margin-top:15px;">
<p class="description">Style : {{media.style}}</p>
<p class="description">Année : {{media.year}}</p>
<p class="description">Durée : {{media.time}}</p>
<p id="infos"><a class="link-info" href="#/detail/{{medias.indexOf(media)}}">Plus d'info</a></p>
</div>
</div>
</div>
controller ANGULAR JS
Now I got your problem. Well, you can use the Angular UI filter called unique.
I couldn't find the original code, but I found this fork.
So, you just need to add the filter:
var mediaControllers = angular.module('mediaControllers', []);
/**
* Filters out all duplicate items from an array by checking the specified key
* #param [key] {string} the name of the attribute of each object to compare for uniqueness
if the key is empty, the entire object will be compared
if the key === false then no filtering will be performed
* #return {array}
*/
mediaControllers.filter('unique', function () {
return function (items, filterOn) {
if (filterOn === false) {
return items;
}
if ((filterOn || angular.isUndefined(filterOn)) && angular.isArray(items)) {
var hashCheck = {}, newItems = [];
var extractValueToCompare = function (item) {
if (angular.isObject(item) && angular.isString(filterOn)) {
return item[filterOn];
} else {
return item;
}
};
angular.forEach(items, function (item) {
var valueToCheck, isDuplicate = false;
for (var i = 0; i < newItems.length; i++) {
if (angular.equals(extractValueToCompare(newItems[i]), extractValueToCompare(item))) {
isDuplicate = true;
break;
}
}
if (!isDuplicate) {
newItems.push(item);
}
});
items = newItems;
}
return items;
};
});
And then, you put the filter on your ng-options:
<select ng-model="styles" ng-options="media.style for media in medias | unique: 'style'"></select>
I tested it and it's working. I hope it solves your problem.
UPDATE:
You should also update the filter to match the selected item style instead the selected object.
<article class="media" ng-repeat="media in medias | filter : styles.style">

Loop incrementation for url

I want to insert dynamic url from my title, it works but it displays 6*6 'cause of 2 differents loops... I don't know how to do differently...
I tried to use global variable but it's the same... (I have 6 Recipes)
Thanks !
Code XML :
<recette id="r1">
<titre>Cake au chocolat</titre>
<cat>dessert</cat>
<type/>
<nombre>6</nombre>
<listeingredients>
<ingredient q="150" u="g">chocolat pâtissier</ingredient>
<ingredient q="3" u="pièce">oeufs</ingredient>
<ingredient q="100" u="g">sucre en poudre</ingredient>
<ingredient q="60" u="g">farine</ingredient>
<ingredient q="1" u="cuillère à café">levure</ingredient>
<ingredient q="80" u="g">beurre</ingredient>
<ingredient q="50" u="g">poudre d'amandes</ingredient>
</listeingredients>
<cuisson>
<temps type="preparation">15</temps>
<temps type="cuisson">30</temps>
<temperature u="C">180</temperature>
</cuisson>
</recette>
<recette id="r2">
<titre>Brownies aux noix de pécan</titre>
<cat>dessert</cat>
<type/>
<nombre>6</nombre>
<listeingredients>
<ingredient q="200" u="g">chocolat à cuire</ingredient>
<cuisson>
<temps type="preparation">10</temps>
<temps type="cuisson">25</temps>
<temperature u="C">180</temperature>
</cuisson>
<instruction>
<etape>Faire fondre le chocolat avec le beurre, soit au bain-marie à feu doux, soit au micro-ondes sur programme 'décongélation'.</etape>
<etape>Quand c'est bien fondu, mélanger et ajouter le sucre, les oeufs un par un, la farine, puis les noix de pécan hachées grossièrement.</etape>
<etape>Bien mélanger et verser dans un moule carré de 20 cm (ou rectangulaire pas trop grand), chemisé de papier sulfurisé.</etape>
<etape>Mettre au four préchauffé à 180°C pendant 25 min.</etape>
<etape>Laisser refroidir et couper en carrés.</etape>
</instruction>
</recette>
</listerecettes>
Code xq :
{
for $titre in db:open("recettes")//recette//titre, $j in (6,2,1,5,4,3)
order by $titre
return
<a href="http://127.0.0.1:8984/rest/recettes?query=//recette[#id='r{$j}']">
<ul>
<li>
{
$titre
}
</li>
</ul>
</a>
}
</body>
</html>
After your comment I still don't really know what you want to achieve with $j as it is not useful at all and can simply be removed. So I guess you maybe want something else and not just a simple list ordered by thte title - If so, please clearify what you want to achieve. Otherwise, simply removing the $j and using the id attribute will work fine.
for $recette in db:open("recettes")//recette
let $titre := $recette/titre
order by $titre
return
<a href="http://127.0.0.1:8984/rest/recettes?query=//recette[#id='{$recette/#id}']">
<ul>
<li>
{
$titre
}
</li>
</ul>
</a>
Thank you but I had just found an other way ! :
for $titre in db:open("recettes")//recette//titre
order by $titre
return
<a href="http://127.0.0.1:8984/rest/recettes?query=//recette[#id='{$titre/..//#id}']">
<ul>
<li>
{
$titre
}
</li>
</ul>
</a>
I tested your code and it's correct but you've forget "$titre" after order by !