I want to use the localization feature of OpenSocial. But I want to set the used language manually. I only found prefs.getLang() to read the current language. Is there a possibility to set it also?
<Module>
<ModulePrefs>
<Require feature="opensocial-0.9"/>
<Require feature="embedded-experiences"/>
<Require feature="dynamic-height"/>
<Require feature="setprefs"/>
<Locale lang="de" messages=".../locale/de_ALL.xml"/>
<Locale lang="en" messages=".../locale/en_ALL.xml"/>
</ModulePrefs>
<UserPref ...
Thanks.
It seems that the opensocial-container should choose the right locale by itself. Found no possibility to do it manually.
Related
I am in the process of setting up a blog with GitHub Pages and jekyll on linux. I am using the included "minima" theme, which includes a "Subscribe vie RSS" link at the bottom of the page. When I click this link, I get a message saying:
This XML file does not appear to have any style information associated with it. The document tree is shown below. and a whole lot of xml below it. I am not quite sure how an RSS feed works, but I am pretty sure that it's not supposed to work like this. My xml file is as follows:
<feed>
<generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator>
<link href="https://gaetgu.github.io/feed.xml" rel="self" type="application/atom+xml"/>
<link href="https://gaetgu.github.io/" rel="alternate" type="text/html"/>
<updated>2020-02-03T16:52:33+00:00</updated>
<id>https://gaetgu.github.io/feed.xml</id>
<title type="html">Gaetgu</title>
<subtitle>Copyright© 2020 Gabriel Gutiérrez</subtitle>
<entry>
<title type="html">site launched</title>
<link href="https://gaetgu.github.io/blog/site-launched" rel="alternate" type="text/html" title="site launched"/>
<published>2020-01-28T00:00:00+00:00</published>
<updated>2020-01-28T00:00:00+00:00</updated>
<id>https://gaetgu.github.io/blog/site-launched</id>
<content type="html" xml:base="https://gaetgu.github.io/blog/site-launched">
<h2 id="hello-world-this-is-the-first-post-of-the-gaetgu-ae-website">Hello, World! This is the first post of the Gaetgu AE website!!!</h2> <p>This blog will contain AE content etc.</p>
</content>
<author>
<name>Gaetgu</name>
</author>
<summary type="html">
Hello, World! This is the first post of the Gaetgu AE website!!!
</summary>
</entry>
<entry>
<title type="html">TVC on Model Rockets</title>
<link href="https://gaetgu.github.io/blog/model-rockets" rel="alternate" type="text/html" title="TVC on Model Rockets"/>
<published>2020-01-28T00:00:00+00:00</published>
<updated>2020-01-28T00:00:00+00:00</updated>
<id>https://gaetgu.github.io/blog/model-rockets</id>
<content type="html" xml:base="https://gaetgu.github.io/blog/model-rockets">
<h3 id="thrust-vectoring-control">Thrust Vectoring Control</h3> <p>TVC is an acronymn for <strong>T</strong>hrust <strong>V</strong>ectoring <strong>C</strong>ontrol. TVC works by gimballing the motor in the base of a model rocket, changing the angle of thrust and therefore changing the velocity.</p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/7/7a/En_Gimbaled_thrust_diagram.svg" alt="TVC Diagram" /></p> <p>This is done actively, changing the course of the rocket and stabilizing it from outside factors such as wind. This concept is what allows SpaceX to land their rockets.</p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/6/6e/Gimbaled_thrust_animation.gif" alt="TVC Animation" /></p> <p>Up until fairly recently, the idea of equipping a model rocket with TVC seemed an out-of-reach concept. Once the 3d printer was made affordable and small, people were suddenly able to create their own parts, without having to have access to a machine shop or spend insane amounts of money to get it custom-built and shipped to your location. The PLA used to print parts is also lighter than acrylic and metal, while still being fairly strong, allowing its use in flight vehicles. As for as I know, there is currently only one company, BPS, who is selling a kit to create your own TVC system, though you could create your own gimbal with a personal 3d printer. The main downside to trying to DUY instead of buying a kit is that you also have to create your own flight computer.</p> <h3 id="building-a-tvc-equipped-rocket-through-kit">Building a TVC-equipped Rocket (through kit)</h3> <p>The kit sold by BPS currently costs $349, and is out of stock until sometime spring 2020. The motor gimbal and avionics mount fit inside a 74mm airframe. The airframes can be bought here. You must use a MicroSD card to program the main avionics, which can be bought here. And you must buy either a rechargeable LiPo battery or a 9-volt, the LiPos can be found here. And finally, you must buy motor tubes to fit the motor into the housing, you can buy two of these. A beginner rocket, the Electron, can be built along with BPS’s YouTube™ series, as seen below.</p> <p><img src="https://i.ytimg.com/vi/1BQkMYj6Kps/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCZ49T8hDn5S7x3LKA17FYI2S4r3g" alt="Build TVC Series" /></p>
</content>
<author>
<name>Gaetgu</name>
</author>
<summary type="html">Thrust Vectoring Control</summary>
</entry>
</feed>
I am using the jekyll-feed plugin. This content is actually not found in my github repo, so I assume it's auto-generated and hidden by the plugin. The repo can be found here and the website affiliated with it here Any help is appreciated. Thanks!
Although it looks a bit off, it is working correctly.
You'd add the link to that file in your RSS reader, then that XML file is periodically read to build a feed.
I have a osgi config settings for config\com.day.cq.widget.impl.HtmlLibraryManagerImpl.xml
as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
htmllibmanager.minify="{Boolean}true"
htmllibmanager.debug="{Boolean}false"
htmllibmanager.gzip="{Boolean}false"
htmllibmanager.timing="{Boolean}false"
/>
however, I want some files not be minifyed. How can I do that ?
Since AEM 6.1 the com.day.cq.widget.HtmlLibraryManager interface and its implementation (com.day.cq.widget.impl.HtmlLibraryManagerImpl) have been deprecated.
Instead, you should take a look at new HtmlLibraryManager interface.
The com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl implementation has interesting OSGi property "htmllibmanager.excluded.path.list" that might just be what you need.
I had read the solution to this problem in adobe forums, given by
Sham HC
According to him, OOB not possible & you might need to implement own HTMLLibraryManager. File daycare requesting feature pack.
If you have taken look at the below link you can take advantage of selector and at dispatcher OR linkrewriter remove .min for your request.
New in AEM
Use a manual include to be able to choose if minified or not. Nothing to change in your clientLibs. Using "htmllibmanager.excluded.path.list" doesn't work for me and I can read in documentation that cq:ClientLibraryFolder can not be exclude because it's hardly specified that's a clientLib.
To make something like this (css):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.css # categories='yourClientLib}" data-sly-unwrap/>
Use:
<link rel="stylesheet" type="text/css" href="/etc/designs/yourClientLib.css"/>
And to make this (js):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.js # categories='yourClientLib'}" data-sly-unwrap/>
Use:
<script src="/etc/designs/yourClientLib.js"></script>
So if you don't want minification your files will end with ".js" and if you want minification your files will end with ".min.js". Realy easy.
I'm new to mobile development. I'm using Phonegap/Cordova to create a cross-platform app. My code works well on Android but when I'm porting it to iPhone it's showing an error:
[143:2003] ERROR whitelist rejection: url="abc"
Now can I overcome this problem?
Notice: This answer only applies for PhoneGap version 1.x and below. From version 2.x onwards, whitelist configuration is done via cordova.xml.
You have to add allowed URLs into PhoneGap.plist's (or Cordova.plist) ExternalHosts array.
For example, if you want to allow access to this URL http://www.myhost.com/path/file, then add www.myhost.com as a new entry to ExternalHosts array.
If you want to allow access to content on all the subdomain of Google (e.g. maps.google.com, mails.google.com), you can add *.google.com as a new entry to ExternalHosts array.
I am not sure why you get "abc" in the link, though. Do you have "abc" as a link to anything? Is it URI fragment?
In PhoneGap 3.0, you need to edit config.xml in Project folder (note: not the www/config.xml)
<access origin="*" />
In PhoneGap 3.0, you need to edit www/config.xml, and add/edit <access> tags. For example, if you want to allow everything, change the tag to:
<access origin="*" />
You can add this following code in Cordova.plist file:
<key>ExternalHosts</key>
<array>
<string>*.facebook.com</string>
</array>
With *.facebook.com as the domain name, you can use two different sub-domains.
You will have to Domain Whitelist so you can access outside domains such as http://google.com.
In iOS (Cordova > 3.0.0), the whitelisting rules are found in AppName/config.xml and declared with the element <access origin="..." />
You can also use wildcards to declare domains. For example, to allow access to all subdomains and TLDs (.com, .net, etc) of Google, use *.google.*
Reference: Domain Whitelist Guide
Even I got the same issue... I fixed it in the below way..In cordova.plist--> under ExternalHosts array menu, add an item as * or .. So it allows all the external links... if u have to mention one by one mention it as .facebook.,*.google.* etc.
This is because phonegap won't take external urls .For phonegap older versions below 2.x we need to set url in cordova.plist like this.
ex:*.google.co.in(u can put your url after *. this) and OpenAllWhitelistURLsInWebView---to ---YES.
I made some template changes to Magento's New Order transactional email template in the backend. The textual changes at the top of the email (in the "thanks for your order..." section) worked fine. But when I change the templates for the order details, they are not appearing in my email.
I have created two files within my template which I thought would override the email:
app/design/frontend/default/mythemehere/template/email/order/items.phtml
app/design/frontend/default/mythemehere/template/email/order/items/order/default.phtml
These are referenced in my sales.xml file in app/design/frontend/default/mythemehere/layout
<sales_email_order_items>
<block type="sales/order_email_items" name="items" template="email/order/items.phtml">
<action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
<block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
<action method="setLabelProperties"><value>colspan="2" align="right" style="padding:3px 9px"</value></action>
<action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>
<block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml">
<action method="setIsPlaneMode"><value>1</value></action>
</block>
</block>
</block>
<block type="core/text_list" name="additional.product.info" />
</sales_email_order_items>
However, when I place my order, I get the base template in the email.
If I commit the Cardinal Sin in Magento of overriding base template files (app/design/frontend/base/default/template/email/order ...), lo and behold, I see my changes! Seems Magento is very keen to use its base template.
I have overridden other templates in the sales section (eg: sales/order/view.phtml, sales/order/print.phtml), and various posts on Magento's forums indicate I'm doing the right thing in concept. But alas! It's just not working for me.
To use your custom theme file for order email "app/design/frontend/default/mythemehere/template/email/order/items.phtml"
In the admin go to System->configuration->design
Select your website from the top left
Now in the themes template uncheck the checkbok and add the theme name.
I had the same problem. I discovered that the emails will use the /app/design/frontend/default/default templates before the 'base' templates. So if you copy the base templates into the default/default folder your files will not be overwritten on update.
However it is still not ideal as this is still outside your theme folder, however it is better than using 'base' files. I still haven't found a true solution.
This kind of situation happens because if we mention wrong values under System>Configuration>General -> Design section
We can have following two scenarios.
1) Default package with custom design
2) Custom package
If we do not fill correct values under Current Package Name field then issue mentioned in the question will occur.
It happened with me when I was using a custom package but had given value as
default under Current Package Name field.
We should configure the theme properly so that Magento can follow theme fallback properly.
Overwriting templates in base/default and default/default is strongly discouraged, because updating Magento will overwrite those directories.
What worked for me (with emails) is to put the modified files under app/design/frontend/your_design_package/default/templates/.
I'm currently working on a portlet for the Liferay portal. I'm using the liferay-ui:iconconstructions in my JSP code which support already the localization in many different languages. However I now found one entry which doesn't seem to be localized:
<liferay-ui:icon image="add_article" message="add-article" label="true" url="${addUrl}" />
All the others work, but the "add_article" doesn't. Can somebody help me? I know there should be somewhere "Language.properties" files for the different languages and there should be an entry action.ADD_ARTICLE=<the localized text>. Can someone give me a hint how I could solve this?
\EDIT:
I just found the according Language.properties files in the portal-impl.jar. The entry action.ADD_ARTICLE is there and correctly localized and still, it doesn't appear localized on the UI??
Thanks
Strings can be localized in ext/ext-impl/src/content/Language-ext_your locale.properties.
I had the same issue here, this workaround worked for me:
<% String message = LanguageUtil.get(pageContext, "action.ADD_ARTICLE"); %>
<liferay-ui:icon image="add_article" message="<%= message %>" label="true" url="${addUrl}" />
Remember to import:
<% #page import="com.liferay.portal.kernel.language.LanguageUtil" %>
Hope it helps!
You can also use a hook to personalize the localized strings.