This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 122734 - I18N : LBL_Scope_ are used for both UI and faces-config.NavData file, so can not localize
Summary: I18N : LBL_Scope_ are used for both UI and faces-config.NavData file, so can ...
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Joelle Lam
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-11-26 05:20 UTC by Masaki Katakai
Modified: 2009-11-10 06:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2007-11-26 05:20:28 UTC
NetBeans 6.0 RC2:

We can not translate these strings in  
web/jsf/navigation/src/org/netbeans/modules/web/jsf/navigation/Bundle.properties.

  LBL_Scope_FacesConfig=Faces Configuration Only
  LBL_Scope_All_FacesConfig=All Faces Configurations
  LBL_Scope_Project=Project

Because it seems that these strings will be used in ./nbproject/faces-config.NavData
and it should be matched the value of scope and IDE.

For example, "Project" and "Faces Configuration Only" will be localized
once we localize these strings in our .properties files.

<?xml version="1.0" encoding="UTF-8"?>
<Scene Scope="Project" version="2">
    <Scope Scope="Faces Configuration Only">
        <Node id="Page1.jsp" x="150" y="150" zoom="true"/>
        <Node id="Page2.jsp" x="400" y="150" zoom="true"/>
    </Scope>
    <Scope Scope="Project">
        <Node id="Page1.jsp" x="150" y="150" zoom="false"/>
        <Node id="Page2.jsp" x="400" y="150" zoom="true"/>
    </Scope>
</Scene>

It means Visual Web application that created under English locale
can not be opened in localized IDE, and vice versa .  Actually I got
the following error from Japanese community members when he
tried to open faces-config.xml file.

java.lang.NullPointerException

	at org.netbeans.modules.web.jsf.navigation.graph.PageFlowSceneData.setScopeData(PageFlowSceneData.java:203)

	at org.netbeans.modules.web.jsf.navigation.graph.SceneSerializer.deserialize(SceneSerializer.java:240)

	at org.netbeans.modules.web.jsf.navigation.PageFlowView.deserializeNodeLocation(PageFlowView.java:824)

	at org.netbeans.modules.web.jsf.navigation.PageFlowView.<init>(PageFlowView.java:114)
...

Please use English words in these setting files and provide
another ones for UI messages.
Comment 1 Joelle Lam 2007-11-27 03:30:17 UTC
I will definitely fix this tomorrow.
Comment 2 Joelle Lam 2007-11-28 04:39:43 UTC
IDE:-------------------------------------------------
IDE: [11/27/07 8:39 PM] Committing "Page Flow Editor" started
cvs server: scheduling file `XmlScope.java' for addition
cvs server: use 'cvs commit' to add this file permanently
RCS file: /cvs/web/jsf/navigation/src/org/netbeans/modules/web/jsf/navigation/graph/XmlScope.java,v
done
Checking in XmlScope.java;
/cvs/web/jsf/navigation/src/org/netbeans/modules/web/jsf/navigation/graph/XmlScope.java,v  <--  XmlScope.java
initial revision: 1.1
done
Checking in SceneSerializer.java;
/cvs/web/jsf/navigation/src/org/netbeans/modules/web/jsf/navigation/graph/SceneSerializer.java,v  <--  SceneSerializer.java
new revision: 1.19; previous revision: 1.18
done
Checking in PageFlowSceneData.java;
/cvs/web/jsf/navigation/src/org/netbeans/modules/web/jsf/navigation/graph/PageFlowSceneData.java,v  <-- 
PageFlowSceneData.java
new revision: 1.14; previous revision: 1.13
done
Comment 3 Ken Frank 2008-07-11 15:49:21 UTC
reopening since, as I read the issue, it means these 3 key/vals
should not be translated; I see 2 of them not in bundle anymore
but
LBL_Scope_Project=Project
is still there and does not have #NOI18N comment.

ken.frank@sun.com
Comment 4 Joelle Lam 2008-07-29 02:50:52 UTC
Hello Ken,

Actually, I am not sure if I understand, I am seeing all three listed in the Bundle.Properties
(web/jsf/navigation/Bundle.properties):
LBL_Scope_FacesConfig=Faces Configuration Only
LBL_Scope_All_FacesConfig=All Faces Configurations
LBL_Scope_Project=Project

These are used in the drop down toolbar. 

However, for the serialization we use in XMLScope:
    private static final String SCENE_FACES_SCOPE_XML = "Faces Configuration Only";// NOI18NC
    private static final String SCENE_PROJECT_SCOPE_XML = "Project";// NOI18NC
    private static final String SCENE_ALL_FACESCONFIG_XML ="All Faces Configurations";// NOI18NC

So I am not sure if I see the issue that you are referring to?  Please re-open if you are seeing something that I am not.

Thanks!
Joelle

Comment 5 Ken Frank 2008-07-29 03:20:48 UTC
for nb6.5, I dont see the jar in visualweb2/modules of
org-netbeans-modules-web-jsf-navigation but its in enterprise5 and has the 3 key/values mentioned here



however the jar
org-netbeans-modules-visualweb-navigation
is there, and as mentioned, has just the one item
LBL_Scope_Project=Project; the other 2 key/values are not present.

-does it mean that the fix allows these 3 key/values to be translated, so that the bug
described here with faces-config* will not happen ?

or should the key/values of these 3 strings not be translated ?

if can be translated, without issue happening, then issue can be resolved,
otherwise it can be reopened until fixed by having #NOI18N comments in bundlel file.

ken.frank@sun.com


ken.frank@sun.com
Comment 6 Joelle Lam 2008-07-29 03:37:23 UTC
Yes, they can be translated and this shouldn't be an issue. 

I don't understand how the build file in the jar file can vary from the actual source.  I looked into my build directory
and am seeing the three properly listed. Maybe you can explain further.
LBL_Scope_FacesConfig=Faces Configuration Only
LBL_Scope_All_FacesConfig=All Faces Configurations
LBL_Scope_Project=Project

/Users/joelle/hgtrunks/main/web.jsf.navigation/build/classes/org/netbeans/modules/web/jsf/navigation
Macintosh-135:navigation joelle$ grep "LBL_Scope_All_FacesConfig" *
Bundle.properties:LBL_Scope_All_FacesConfig=All Faces Configurations
Comment 7 Ken Frank 2008-07-29 15:44:36 UTC
verifying based on communication with developer that they can now be
translated and the problem originally seen has been fixed.

ken.frank@sun.com