Eclipse babel translation tool
Page generated in 0. Sign up to our Newsletter A fresh new issue delivered monthly. Eclipse Community Forums. Forum Search:. No version for MAT project in translation tool [ message ]. Wed, 06 May Elena Nayashkova Messages: 12 Registered: July Hi, when the map file for MAT project was added, the drop down list for the version offered only "unspecified". Eclipse Babel Project will better integrate the functions together to make it easier for programmers to create the NL fragment project for the plug-in project they are working on.
This infrastructure would allow various interested and capable parties to contribute translations for different parts of different components, and define a process by which those translations are verified, approved merged, and ultimately delivered in a localized release.
Technology tools and features both standalone and incorporated into other projects which ensures that the ongoing development of the Eclipse Platform results in artifacts that are easily localized. Breadcrumbs Home Proposals Project Babel. This page is deprecated and may contain some information that is no longer relevant or accurate.
Background Eclipse is a global community. Thus the user will see the changed text immediately. This immediate feedback right into the user's running application is important to encourage contributions and also to ensure users know what they are changing. Now suppose there are two possible titles to the view, depending, perhaps, on the state of a checkbox in the view. Suppose both possible titles are taken from the resource bundle, and the title flips between them as the checkbox is checked.
The application, when changing the title, could make another called to 'associate'. The problem is, there would then be two updateControl implementations, and the original would be called also. To solve this issue, the 'associate' method has another form in which an object is passed as the first parameter.
You can pass any object, but it must be the same object each time 'associate' is called to set the title. This object is used as the key is a map, and if the key matches a previous key then the entry is replaced. In the above example of setting the title, you could use, say, a String object with a value of "title" as the key, or you could use the ViewPart object itself. It is a little long winded to provide an implementation of updateControl for every text message.
Other forms of the 'associate' method are provided in the TranslatableSet class that do this for you. For example, to associate text with a Label, simply call:.
The first parameter is used both as the key in the map and also it the control into which the text is set. Most methods are overloaded versions of 'associate'. However, some have different names to avoid ambiguity. For example, to associate text with the tooltip of a label control, you would use:.
When a new translation is set into an active control, the container layout may need to be re-calculated. If a dialog box, this may even cause the size of the dialog box to change.
This could be done in the updateControl implementations. However, that would mean the implementations supplied by the TranslatableSet object cannot be used. An alternative method is to implement the Layout method in the TranslatableSet object. By implementing the layout in this method, the layout will be re-calculated only once even if the user changed multiple text values.
If you restart Eclipse, you will see your text changes are still there. The messages are stored in a properties file in the runtime workspace. You can find these delta files in the plug-in's state directory at ". The delta files contain the differences between the resource bundles embedded in the plug-in or fragment and the actual text to be used. The differences being changes either made by the user or obtained from a server running Aptana's software.
The message changes should be communicated to the servers running Aptana's code contribution. This work has not been done. Before this can be done, a programmatic interface is required. Although the language fragments are built nightly on the Babel server, users may not be downloading these on a regular basis. Non-technical users may not even know about the Babel server or how to install the fragments. If users open the dialog to enter translations then it is desirable for the user to see the latest translations from the server.
Therefore the current values should be fetched from the server every time the translation dialog is opened. Another problem to consider is how we handle the installation of a later language pack. Ideally the delta files should modified to be deltas from that later version. This work has not been done, which means there may be older translations left in the delta files that are overriding more recent translations in the language packs.
It is possible to traverse the menu, but that gains us little as we have no means of determining where each text originated. We solve this by traversing the menu bar contribution tree.
This is rather trickier because the tree does not map simply to the actual menu but needs some knowledge of the various contribution classes in order to get the menu tree to match the menu.
Having access to the contribution objects still does not get us to the origins of each piece of text. The problem is that the code to parse the plugin.
0コメント