Does someone know how I have to configure CKEditor to use german quotes like:„ ... “
Cause by default it is using quotes like: " ... "
Someone got an idea what I have to change to achieve that?
Use autocorrect plugin (http://ckeditor.com/addon/autocorrect)
config.autocorrect_doubleQuotes = "„“";
Related
For example, if I write:
Notepad++ is *great*, I like Notepad++
it treats ++something++ as an escape construct which ignores the * bold and produces:
<p>Notepad is *great*, I like Notepad</p>
instead of the desired:
<p>Notepad++ is <strong>great</strong>, I like Notepad++</p>
Upstream discussion: https://github.com/asciidoctor/asciidoctor/issues/1864
Tested on Asciidoctor 2.0.10.
A few options that do what I want:
Notepadpass:[++] is *great*, I like Notepadpass:[++]
Notepad{blank}pass:[++] is *great*, I like Notepad{blank}pass:[++]
Notepad{plus}{plus} is *great*, I like Notepad{plus}{plus}
I'm not 100% sure if the Notepadpass:[++] is meant to work of just an accident. I think I'm just going with {plus}{plus}.
Where {plus} is documented at: https://asciidoctor.org/docs/user-manual/#charref-attributes
For the specific case of C++ there is also {cpp}.
Another option is to use a backslash to escape the first ++:
Notepad\++ is *great*, I like Notepad++
This works in a similar way on other formatting as well.
I am using Spring Batch 2.1.9 and have a requirement to write a file name with some text and the run date delimited by a # sign. Unfortunately I can't find a way to display a # sign without breaking the expression. I have tried the following formats, all to no avail:
File##{jobParameters[rundate]}
File#{'#' + jobParameters[rundate]}
File${'#'}#{jobParameters[rundate]}
File#{'#'}#{jobParameters[rundate]}
Anytime that extra pound sign is included, the rest of the expression fails to display anything. Is there an obscure way to escape a pound sign?
Have you tried to use String.format("%s#%s",file,rundate) as SPEL?
I am trying to use wget with a url that includes a "#" sign. No matter what I do to escape the character, it doesn't work. I've used \, ', and ". But none of them work. Does any one have any suggestions?
Thank you!
Send it as %23 if you really mean for it to have a hash. If you're trying to send a fragment, don't bother since the server won't care about it regardless.
maybe put uri around'' ? I believe it works
Are you quoting the url? It shouldn't be a problem if you are.
My guess is you're doing something like:
wget http://foo.com/#!/blah
Instead of:
wget "http://foo.com/#!/blah"
# is the shell script comment character.
I am trying to translate some strings from a Magento 1.5.x install and it works fine when there is a double quote, but I cannot properly escape single quotes.
"Hello, <strong>\'.Mage::getSingleton(\'customer/session\')->getCustomer()->getName().\'!</strong>","Hello, <strong>\'.Mage::getSingleton(\'customer/session\')->getCustomer()->getName().\'!</strong>","Olá, <strong>\'.Mage::getSingleton(\'customer/session\')->getCustomer()->getName().\'!</strong>"
"<button class=""form-button"" onclick=""setLocation(\'%s\')"" type=""button""><span>Login or Register</span></button>","<button class=""form-button"" onclick=""setLocation(\'%s\')"" type=""button""><span>Login ou Cadastro</span></button>"
I've tried the original string as is, and escaped with a backslash. I've tried the translated string escaped with a backslash and double single quotes.
I tried searching the magento forum, but the only two people that posted about this problem got no replies.
When you escape a single-quote with a backslash in the .phtml file, you need to remove the backslash from the translation string in the .csv file.
Example:
<?php echo $this->__('Click here to print a copy of your order confirmation.', $this->getPrintUrl())
Should be in .csv file:
"Click here to print a copy of your order confirmation.", "Click here to print a copy of your order confirmation."
without the backslashes, otherwise the string won't get translated. As usual double-quotes in the .csv have to be escaped with another double-quotes.
Some .csv translation files in Magento 1.7.0.2 still have these backslashes before single-quotes, which is a minor bug that needs to be fixed.
Try this
Other option is that you can put error message in double quotes as
__("Please specify the product's option(s).");
and in translation file you make it by simple this
Colum ONE | Colum Two
Please specify the product's option(s). | TRANSLATION OF that FILE
remove \ from Translation file and from code make it DOUBLE QUOTES in stead of single quote.
It turns out that the way the strings were being output in PHP were not compatible with Magento's translation engine. The fix comprised changes in the PHP file, not in the syntax of the translation files. The PHP files now read:
echo $this->__('Hello') . ', <strong>'.Mage::getSingleton('customer/session')->getCustomer()->getName().'!</strong>';
echo ('<button class="form-button" onclick="setLocation(\'' . $this->getUrl('customer/account/login') . '\')" type="button"><span>') . $this->__('Login or Register') . '</span></button>';
as opposed to having everything inside one echo $this->__('String to be translated . phpcode. String to be translated . phpcode . etc . etc')
You should never put html in a translated string. Magento uses vsprintf (http://php.net/manual/en/function.vsprintf.php) so it's easy to add a variable to a translation like this:
echo '<strong>'.$this->__('Hello %s!',Mage::getSingleton('customer/session')->getCustomer()->getName()).'</strong>';
In this way you can then translate easily in a csv: "Hello %s","Hola %s"
I am trying to parse a text file that has the weird quotes like
“ and ” into "normal quotes like "
I tried this:
text.gsub!("“",'"')
text.gsub!("”",'"')
but when it's done, they are still there and show up as
\x93 and \x94
so I tried adding that too with no luck:
text.gsub!('\\x93', '"')
text.gsub!('\\x94', '"')
The problem is, when I try to show those weird quotes on a webpage, it makes that weird diamond with a question mark symbol: �
It seems to work:
text = "“foo”"
=> "\342\200\234foo\342\200\235"
irb(main):002:0> text.gsub!("“",'"')
=> "\"foo\342\200\235"
irb(main):003:0> text.gsub!("”",'"')
=> "\"foo\""
You need to use a hex editor to figure out all the character codes involved.
Re: the second question of why the weird quotes show on a web page as the � symbol:
Your problem is that your web page is not in UTF-8 mode. To get it there, see
http://www.w3.org/International/O-HTTP-charset
If you can't change your web server, add a meta line in the head section of your web pages: http://www.utf-8.com/
Larry
Your first gsubs should work. The reason the second set of gsubs don't work is that you're using single quotes and double backslash. Try the other way around:
text.gsub!("\x93", '"')
text.gsub!("\x94", '"')
You can also do this in one line:
text.gsub!("\x93", '"').gsub!("\x94", '"')
# or
text.gsub!(/(\x93|\x94)/, '"')
Are you sure the encoding of the string is correct?