Keeping HTML markup out of the resource bundle

Hello, I'm using ResourceBundles along with XSLT, and an issue that I'm trying to resolve is whether I should or could keep HTML markup outside of the resources. Some of the messages that my app displays have special markup, for example.
Good morning, <b>{0}</b>!
In Polish (just to illustrate a point) I might want to use:
<b>{0}</b>, dzien dobry!
I don't see any way to keep the HTML out of the resource -- and I want to keep the entire sentence in the resource file because the words may be in different order in different languages.
What is the usual approach to this? Is markup in resource files a "bad thing"? I searched the net but failed to find anything about this... Thank you,
tom.

If the translators use a translation memory tool with a parser that protects markup based on file type, then it is a very bad thing to have html in a java resource bundle, yes. Because the parser will protect the java code, but not the html, increasing the likelyhood that the html markup will be mangled during translation.
You are of course right that you need to keep the entire sentence in the resource file to enable correct translation.

Similar Messages

  • How to link the resource bundle in JSF implemented in  eclipse?

    Kindly help me out

    This is how I called the resource bundle in JSF
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <f:view>
    <f:loadBundle basename="constantsUIProp" var="prop"/>
    <h:form>
    <h:inputText maxlength="#{prop.AREA_CODE_MAX}"></h:inputText>
    </h:form>
    </f:view>
    </body>
    </html>
    when i tend to build, it shows an error like+ Resource bundle cannot be found on the classpath+
    I have saved the resource bundle in WebContent/Web-Inf/classes/constantsUIProp

  • [svn:fx-trunk] 12663: Adding the resource bundle and fat-swc targets for osmf and textlayout.

    Revision: 12663
    Revision: 12663
    Author:   [email protected]
    Date:     2009-12-08 12:22:31 -0800 (Tue, 08 Dec 2009)
    Log Message:
    Adding the resource bundle and fat-swc targets for osmf and textlayout.  Also for osmf adding the doc target.  This new format that I added to the two project build files will be what we will use going forward for all projects.  I have all the other projects modified and plan on checking them in soon.  The format change will make adding new locales easier as well as adding the fat-swc target when needed.
    QE notes: no
    Doc notes: no
    Bugs: no
    Reviewer: gaurav
    Tests run: checkintests
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/trunk/frameworks/build.xml
        flex/sdk/trunk/frameworks/projects/osmf/build.xml
        flex/sdk/trunk/frameworks/projects/textLayout/build.xml
    Added Paths:
        flex/sdk/trunk/frameworks/projects/osmf/bundles/
        flex/sdk/trunk/frameworks/projects/osmf/bundles/en_US/
        flex/sdk/trunk/frameworks/projects/osmf/bundles/en_US/osmf.properties
        flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/textLayout.properties
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/osmf/src/OSMFDocClasses.as
        flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/empty.properties

    Thats good news.

  • [svn:fx-trunk] 10599: -fix spark doc target so the docs are put into the resource bundle swc.

    Revision: 10599
    Author:   [email protected]
    Date:     2009-09-25 13:07:56 -0700 (Fri, 25 Sep 2009)
    Log Message:
    -fix spark doc target so the docs are put into the resource bundle swc.
    -added building of all spark localized _rb.swcs
    QE notes: localization team should look at the spark swcs
    Doc notes:
    Bugs: sdk-23256
    Reviewer:
    Tests run: yes
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/sdk-23256
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/build.xml

    Thats good news.

  • HT1689 I keep getting booted out of the itunes store on my brand new iPod touch.  What can I do to fix the problem?

    I just got my son a new iPod touch and he is trying to use the itunes store but it keeps booting him out and back to the main screen with all of his apps on it.  I've tried it myself several times and it does it to me as well.  I have an iPhone and have never had this issue.  Does anyone know what the issue is?  He is not thinking this is the greatest Christmas present at this point.

    Hi Sam From ME,
    Thanks for using Apple Support Communities.  I would suggest restarting your iPhone and seeing if the issue continues, and if it does, try resetting your iPhone as well:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    Cheers,
    - Ari

  • Where does the resources bundle files need to be

    Hi All,
    Does any of you knows where all the custom resources bundle files that will be used on BCC need to be?
    I have something like this:
    BCC module /src/com/mycompany/resources/WebAppResources.properties
    But when I try to use it
    This happens
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "title" with value "${activity.description}": An error occurred while getting property "description" from an instance of class atg.bizui.activity.GenericActivity (java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key manageLoyaltyProgram.description)
    I am trying to use it on a activity that will be used in the ActivityManager:
    This is what I have
    <resource-bundle>com.mycompany.resources.WebAppResources</resource-bundle>
    Do you know if I am missing somehting or putting the files on a wrong location?
    Regards,
    Obed

    Hi Shaik,
    The title of for the source is added http://i.imgur.com/a6WVxsW.png but when I click on it it throws this exception:
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${activity.displayName}": An error occurred while getting property "displayName" from an instance of class atg.bizui.activity.GenericActivity (java.util.MissingResourceException: Can't find resource for bundle j
    ava.util.PropertyResourceBundle, key emanageLoyaltyProgram.displayName)
    meaning that the properties file is on the classpath, but my genericActivities.xml file is not able to read the properties file.
    Any suggestion?
    Regards,
    Obed

  • How to load the resource bundle message on confirmation popup

    hi every one
    i am using java script confirmation message on my delete button.
    this is my sample for that one
    <h:commandButton action="#{createCurrency.removeCurrency}"
             onclick="if (!confirm('Are you sure to delete this value?')) return false" value="#{messages.Delete}"/>    i need to load the "Are you sure to delete this value?" from resource bundle.
    is there any way to load above message from resource bundle.
    thiagu.m

    If you're using JSF 1.2, you can add the bundle config in your faces-config.xml file like this:
    <resource-bundle>
       <base-name>mypackage.i18n.MessageResources</base-name> // i18n is shorthand for internationalization
       <var>msg</var>
    </resource-bundle>     
    <locale-config>           
       <default-locale>en</default-locale>  // or whatever locale you preferred 
       <supported-locale>...</supported-locale> // other locale defined here if you need them
    </locale-config>Then create a property file called "MessageResources_en.properties. In this file, you can define something like:
    {code}
    MSG_CONFIRM=Do you wish to delete this value?
    // add other messages here. Syntax is: key=value
    {code}
    Then reference the bundle's message in your form as per normal:
    {code}
    !confirm(#{msg.MSG_CONFIRM}))
    {code}
    I haven't tried the above codes but it should help you get started.
    Edited by: icepax on 13/11/2009 19:44

  • I just  downloaded the ios7 and now it won't let me update any of my apps it keeps takeing me out of the apple store than all the apps that need to be updated are not on the list anymore

    I Just downloaded the ios7 on my iPod 5 and it will not let me update my apps every time I try they are gone and it exiting out of the apple store also my battery has been dieing a lot faster lately too

    @tx4kings
    While on your iPhone
    log out of iTunes
    restart your device
    connect to a strong wifi
    log back into iTunes
    update

  • Why do I keep getting kicked out of the app store after updating my ipod touch 4th generation to ios6

    Please help! After updating my itouch to ios6 whenever I try to go to a certain selection in the app store, it will either say cannot connect to itunes or it kicks me out of the store completely.
    I have a 32gb 4th generation ipod touch.

    If you really wanted to, you can find out how to restore your device to a previous version here:
    https://discussions.apple.com/message/19639988#19639988
    ~Lt. Leviathan

  • Trying to keep certain songs out of the shuffle list

    I listen to radio plays which I download to the pod.
    Unfortunately, they are listed as songs and not audio books. Therefore, when I am trying to listen to music, there is no diferentiation and the radio plays get thrown into the shuffle.
    Now, I have an individual play list for each radio play (I.e. sherlock holmes, phillip marlow, johnny dollar etc...).
    I am wondering if there is any way to "Lock out" certain playlists from the shuffle, w/o keeping me from being able to access the radio plays when I want to listen to them.
    Alternatively, I will place all my songs into one play list and merely cycle through them that way.
    Any help would be greatly appreciated!

    You're a life saver!
    Thanks a lot! That is exactly what I needed.

  • Ipad stolen, please keep an eye out for the serial number

    Hi everyone
    My ipad got stolen from the office where I work during lunch time today, along with macbook pro and some cash.
    I would like to list the details of my ipad here in case anyone comes across it in the future.
    ipad 64Gb wifi + 3G
    Antiglar screen cover
    Hard Candy ipad street skin cover
    Don’t think I’ll buy another ipad this year, might get an iphone or the new itouch instead.
    Be careful out there with your stuff guys
    < Edited by Host >

    88_King wrote:
    Hi everyone
    My ipad got stolen from the office where I work during lunch time today, along with macbook pro and some cash.
    I would like to list the details of my ipad here in case anyone comes across it in the future.
    ipad 64Gb wifi + 3G
    Antiglar screen cover
    Hard Candy ipad street skin cover
    Serial number: GB022V1WETV
    Don’t think I’ll buy another ipad this year, might get an iphone or the new itouch instead.
    Be careful out there with your stuff guys
    Sorry to hear that, having things stolen is terrible.
    If you haven't done so you may want to talk to Apple support as serial numbers will presumably be identified when a device connects to iTunes, so they may have a way to track these things beyond MobileMe.

  • Best Practice: Keeping business logic out of the servlet

    In servlet programming, is it considered best practice keep business logic in the helper classes and only have session-related logic in the servlet?

    Yes, it is best to keep your business logic separate from your servlet class, to prevent coupling between your servlet and business logic. Consider using EJB's or the DAO pattern for your business logic.

  • I keep getting black outs on the screen, typing is extremly slow to show up and firefox is moving very slow

    moving extreamly slow screen blacking out never used to have this problem. when I click on something it blacks out like if I click file the drop box is black

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    You can check for problems caused by recent Flash updates and try these:
    *disable a possible RealPlayer Browser Record Plugin extension for Firefox and update the RealPlayer if installed
    *disable protected mode in Flash 11.3 and later
    *disable hardware acceleration in the Flash plugin
    *http://kb.mozillazine.org/Flash#Troubleshooting

  • Osx keeps logs me out all the time!

    I just bought the new MBP retina with lion on it the other day, and it is continuously logging me out! doesnt matter what im doing, could be watching a movie, browsing on facebook, or even when im just navigating around finder, it will just go to the log in screen and sometimes closes the applications i have open.
    i have no idea why it is doing it, it has never done it with my 2009 macbook i still own, which also has lion on it. Hopefully when i update to mountain lion it will be fixed.
    any help would be great, this is most frustrating!

    Go to
     > System Preferences... > Mission Control
    Click the 'hot corners' button in the bottom left. Are any of them set to 'Put display to Sleep' or 'Start ScreenSaver'?
    If not, also check
     > System Preferences... > Security & Privacy
    Click the padlock (bottom left), enter your Admin password, then click the activated 'Advanced...' button (bottom right). Is 'Log out after ... minutes of inactivity' set? If so, disable it.

  • My iTunes keeps logging me out of the Store as I open and close it.

    Before, whenever I closed iTunes, and opened it the next day, I would still be logged into iTunes. But since I redownloaded iTunes, everytime I open and close iTunes, I have to log in to get Album Art and stuff. It's just a minor hinderance, but it's still very annoying. If anybody could help, that'd be appreciated.

    Restore the device as new.

Maybe you are looking for

  • Can anyone help me with compressions for web streaming? So lost!

    Hi there I am so confused ! I have the task of getting HD footage from my camcorder ready for quality web-streaming on a website. The clips need to be in mp4 format using the H264 codec. As we are dealing with HD footage, I want the viewer to be very

  • Error while trying to open Transport Object in portal

    Hi, I want to move some pcd objects from my DEV server to PROD server. I created a transport object in the pcd but when I try to open it for editing, I get the following exception: Date : 06/18/2008 Time : 20:01:49:094 Message : Exception ID:05:01_18

  • Storing XML schema in database

    Hi everybody..I have question here related to the storing of the XML schema in the database. When an XML Schema is created like this. dbms_xdb.createResource('home/DEV/xml_schema_test.xsd'), then is the XSD created and stored in one of the database t

  • Is there any way to assign keywords to clips in the new iMovie?

    You can search for keywords that were assigned to clips in the old iMovie 11, but I can't find how to assign keywords to clips in this new version.  Other than this, I'm finding all the old features and am loving the new layout and speed of imports w

  • Simple transformation program debugging

    hi ,    can any boby guide me how can we debug a simple transformation program which is used for xml to abap conversion .