Grails 2.3.8 Internationalization coded strings - grails

I don't understand why some strings in my messages.properties files won't show in my gsp. More exactly, the show in term of the key name in the file not the value.
For example, this string in my messages.properties:
gtunes.store.subtitle=Your online music store and storage service!
is showing up on the gsp where I have this line of code:
<h1><g:message code='gtunes.store.subtitle'/></h1>
simply as:
gtunes.store.subtitle
My code is here.

I downloaded your app and the reason for the error is because there's no message with this key configured in messages.properties.
If you try to render a message for a key that doesn't exist, the key is displayed instead.

Related

How to save the code and the formatting properties of ace editor to the database in Rails

The value in the editor is formatted only on the client side but when the value is sent to the database it is saved without the formatting.
How to save both the code and the formatting properties so that they both can be retrieved during display of the code snippet
Are you using raw action? If not, then read it.
I was using another editor (probably codemirror) and I saved the text in it to database in <pre> </pre> tag and then it would save as a string of html but later render properly too. Go through documentation of ace-editor. It must have a similar solution.
pre tag gives me this here:
Gems for ace-editor:
gem 'jquery-ace-rails'
gem 'ace-rails-ap'

substitute space character in lua

I am creating a template in Wikipedia to link articles to an external website which is a book archive called fadedpage.com. I am generating a url to link to a specific author page. Part of the url is the author's name which contains one or more spaces. For example, the url for the author "Ian Fleming" is: http://fadedpage.com/csearch.php?author=Fleming, Ian. My template call structure is {{FadedPage|id=Fleming, Ian|name=Ian Fleming|author=yes}}.
For my template I am replicating an existing template which uses a script coded in lua to parse the template arguments. I have been able to generate all of the url except for the space character between the last and first name.
I could code the template call as: {{FadedPage|id=Fleming,%20Ian|name=Ian Fleming|author=yes}} which works OK but I would rather have the call format as it looks on the fadedpage website, ie. with the embedded space. So I need a way in lua to find the space character within the string and substitute it for the string "%20". So far I haven't figured out how to do it. Any help would be appreciated.

ZF2 Email with german umlauts in from name

I get the exception "Invalid header value detected", if I use german umlauts like 'äöü' in the from name of an email.
$message->setFrom('noreply#mydomain.de', 'äöü')
Does anyone know hot to fix this?
One possible solution could be to convert the mail address to the correct writing (includes converted umlaut).
You can use icon php function for this action.

hash tags in urls and hyperlinks

I created a hyperlink to a file. the file name contains hashtags as a means to separate information.
<div style="height:100%;width:100%">.</div>
translated to...
http://localhost/dir/upload/1427853638#0#file#A101.pdf
Is this a "legal" name in a URL? Im getting a "file not found" error
The requested URL /dir/upload/1427853638 was not found on this server.
So, clearly the # has another meaning in the URL (I understand now, its a location hash property). Is there a way to get this to work, or do i need to use another character besides the # in the file names?
Since # is a special character in the URL semantic (it's used to provide an internal anchor in a HTML page), it should be URL-encoded into %23.
Your URL should be: http://localhost/dir/upload/1427853638%230%23file%23A101.pdf.
NB: you can find an online URL encoder here: http://meyerweb.com/eric/tools/dencoder/

For variables names for text components ending with a dot(.) , itextpdf appends .widget to them

For variable names that i am declaring using pdf expro, having dot(.) character at the end, the itext is appending "Widget" to them. IF my variable name on pdf template for a textbox is "Payment transaction no." then itextpdf makes it as "Payment Transaction No.Widget"
Why does this happen ? and suggestions about handling it, because as a part of data validation i need to pick up pdf field names and validate them with those saved in form configuration settings in the database.
Is there any other such kind of wierd possibility that might occur ? Please provide those cases.

Resources