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.
This os NOT for nb4.0 and should not be done for NB4.0 if this needs waiver for nb4.0 (though filed for 4.1) please waive, but leave at p2. As far as I know, all other nb and other of our java products have localizable items in bundle files, or html files for javadoc and template descriptors and .uml files if some localizable link is needed for items on help menu. We've worked with other teams/modules who had been requiring some xml files to be localized, and over time they have switched to using bundle file and/or handling some things in code. But vcsgeneric still requires 2 non standard kind of files to be localized, and in case 1 below, there is nothing that is even translated, just some created localized files that point to other files. case 1 vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/layer-includes files whose localized versions pointed to by the mf-layer.xml file that needs to be modified by l10n -- is this really needed ? can't it be done in code vs requiring these steps ? case 2 The files that have XX as part of the name in cvs, like translatedfiles/src/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config I realize these are actual files that need names of localized commands in them, but can't code be worked out so this info is gotten from Bundle files, just like any other items ? Even if these commands are not for display to user but for use of module to communicate with source control software, it seems the command names themselves should still come from bundle file. -->requireing l10n to localize xml or other special files involves a lot more overhead and special build steps, and recently has led to confusion, both in our teams and with the other community team doing nb l10n for other languages. I think if for case 1, code took care of it, and case 2, if in bundle files, these issues would not arise.
The problem is, that there can be two versions of version control software. English and localized. Therefore on English locale there should be one (English) profile for each VCS, but e.g. on Japanese locale both English and Japanese profile. This is why there needs to be the original vss.xml (for users who have English VSS) plus vss_ja.xml (obtained from vss_XX.xml, for users who have Japanese VSS). There would have to be some special support for localization, that would create the localized profiles automatically from appropriate resource bundles. I'm not sure if this is doable in 4.1 timeframe, though.
Martin, could I seprate this into 2 issues - one for case 1 and one for case 2 ? it seems that case1 is something that might not be complex, since it is not requiring actual localization but just maintianing some xml files with names of jars modified -but it seems code could easily take care of this just like code takes care of all other bundle file kinds of things. so perhaps case 1 could be done for nb4.1, as long as besides not requiring the xml file mods, that internal code handles things correctly. I realize case2 could take time and need to be done after nb4.1 so thats why separate issues could help. ken.frank@sun.com
In case 1, the layer-includes-* files are generated during the build. I'm not sure if we'll be able to actually implement this in two steps, since we can not alter the layer-includes-* files from runtime. I'll try to figure out some elegant solution...
Starting to work on this, I'll try to resolve this into 4.1. First I need to cleanup files that does not have to be on the SystemFileSystem - issue #51684. After we have just the XML profiles there, we can introduce some mechanism, that would duplicate the profiles for current locale in case there will be appropriate localized resource bundle.
The profiles now reference a special resource bundle, which when localized, the profile is automatically split into two - one for English VCS and one for localized VCS. This is described at http://vcsgeneric.netbeans.org/doc/profiles/Structure_of_VCS_profile.html#VCS_Profile_for_NetBeans_4.1 and in following resource bundles: vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/BundleLocalizedPVCS.properties vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/BundleLocalizedVSS.properties /cvs/vcsgeneric/l10n.list,v <-- l10n.list new revision: 1.11; previous revision: 1.10 /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/Bundle.properties,v <-- Bundle.properties new revision: 1.13; previous revision: 1.12 /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsRevisionListGetterLocalized.java,v <-- PvcsRevisionListGetterLocalized.java new revision: 1.3; previous revision: 1.2 /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/Bundle.properties,v <-- Bundle.properties new revision: 1.25; previous revision: 1.24 /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcs.xml,v <-- pvcs.xml new revision: 1.44; previous revision: 1.43 RCS file: /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/BundleLocalizedPVCS.properties,v done /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/BundleLocalizedPVCS.properties,v <-- BundleLocalizedPVCS.properties initial revision: 1.1 Removing profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcsLoc_XX.xml; /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/config/pvcsLoc_XX.xml,v <-- pvcsLoc_XX.xml new revision: delete; previous revision: 1.38 /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/commands/Bundle.properties,v <-- Bundle.properties new revision: 1.6; previous revision: 1.5 /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/commands/VssRevisionListGetterLocalized.java,v <-- VssRevisionListGetterLocalized.java new revision: 1.2; previous revision: 1.1 /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/Bundle.properties,v <-- Bundle.properties new revision: 1.14; previous revision: 1.13 /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vss.xml,v <-- vss.xml new revision: 1.43; previous revision: 1.42 RCS file: /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/BundleLocalizedVSS.properties,v done /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/BundleLocalizedVSS.properties,v <-- BundleLocalizedVSS.properties initial revision: 1.1 Removing profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vssLoc_XX.xml; /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/config/vssLoc_XX.xml,v <-- vssLoc_XX.xml new revision: delete; previous revision: 1.32 /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ConfigSaveAsDialog.java,v <-- ConfigSaveAsDialog.java new revision: 1.18; previous revision: 1.17 /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/Profile.java,v <-- Profile.java new revision: 1.6; previous revision: 1.5 /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ProfileWriter.java,v <-- ProfileWriter.java new revision: 1.3; previous revision: 1.2 /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/ProfilesFactory.java,v <-- ProfilesFactory.java new revision: 1.21; previous revision: 1.20 /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/profilesSettings/VcsSettingsChildren.java,v <-- VcsSettingsChildren.java new revision: 1.7; previous revision: 1.6 /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/variables/VariableIO.java,v <-- VariableIO.java new revision: 1.30; previous revision: 1.29 /cvs/vcsgeneric/www/doc/profiles/Structure_of_VCS_profile.html,v <-- Structure_of_VCS_profile.html new revision: 1.4; previous revision: 1.3 Removing profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/mf-layer_XX.xml; /cvs/vcsgeneric/profiles/pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/mf-layer_XX.xml,v <-- mf-layer_XX.xml new revision: delete; previous revision: 1.2 Removing profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/mf-layer_XX.xml; /cvs/vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/mf-layer_XX.xml,v <-- mf-layer_XX.xml new revision: delete; previous revision: 1.2 Removing src/org/netbeans/modules/vcs/advanced/config/mf-layer_XX.xml; /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/mf-layer_XX.xml,v <-- mf-layer_XX.xml new revision: delete; previous revision: 1.2
An additional change is necessary for the correct translation of all class occurrences in commands properties: /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/commands/UserCommandIO.java,v <-- UserCommandIO.java new revision: 1.23; previous revision: 1.22
Thank you for this fix. It looks like a great solution to the issue. I'll work on getting it verified with localized vss/pcvs products - just to clarify for that -- there does not need to be any xml or _XX type files translated at all anymore as part of this solution - just the new Bundle* files ? ken.frank@sun.com
I have the same question. I cannot get it from ProfileStructure documentation. Neither example usage in VSS does not help here a lot: <resourceBundle>org/netbeans/modules/vcs/profiles/vss/config/Bundle</resourceBundle> <resourceBundle>org/netbeans/modules/vcs/profiles/vss/config/BundleLocalizedVSS</resourceBundle> <label>$[? LOCALIZED_PROFILE_COPY] [ResourceMsg1(VSS_Localized_Label)] [ResourceMsg1(VSS_Label)]</label> It's quite surprsing. My assumtion was that ResourceMsg1() returns value according to current locale, without explictit conditional. First looking to bundle (patterns) defined by splitloc. On the other hand usage of $[? LOCALIZED_PROFILE_COPY] contruct in command's commandlines seems OK. My assumption is that LOCALIZED_PROFILE_COPY is set to profile by infrastucture.
To Ken: yes, there is no need to change the XML files. The localization can all be done just in appropriate properties files. All are referenced from l10n.list. To Petr: There are two labels in fact. One for the original English VCS, one for the localized VCS. This is distinguished by the LOCALIZED_PROFILE_COPY variable. I've added a sentence to http://vcsgeneric.netbeans.org/doc/profiles/Structure_of_VCS_profile.html that "two logical representations of the profile are created from one physical XML file". These two differ just in the definition of LOCALIZED_PROFILE_COPY variable (as stated below in that document). The result is that the user will see E.g.: -- CVS English PVCS Japan PVCS English VSS Japan VSS -- in the profile combo box. The expanded <label> will look like: <label>$[? LOCALIZED_PROFILE_COPY] [Japan PVCS] [English PVCS]</label> The LOCALIZED_PROFILE_COPY is set by the infrastructure after the two profile copies are created from the XML file.
Verified.