Saturday, October 5, 2013

Easier collaboration to internationalize UDIG

Easier collaboration to internationalize UDIG

During the FOSS4G conference Andrea Antonello and myself we'd the chance to improve Internationalization workflows for users and developers. It was a goal to migrate all User Interface (UI) labels and messages to Transifex translation platform.

Background

In UDIG several UI labels, dialog titles, and messages are externalized from the core Java code and are stored in properties (*.properties) files. Each file has keys on the left to access messages. The message text is separated from the key by an equal sign, e.g.:

OpenFileDialog.dialogTitle = Open File Dialog 

In the origin file, which is named messages.properties the messages for all UI elements are stored in English. To translate UI elements its only required to have a new message properties files for a specific language, e.g. messages_de.properties for German translations. For more details about Java internals have a look at the Java properties files tutorial.

About Transifex

Transifex provides a platform for translation teams to add, modify, and review text strings. Its possible to set up resources in a way that changes in a public accessible Source Code Repository can be pulled. In addition to this translated properties files can be synchronized back into a working copy with a Python based client tool. A client executable for Windows environments is also available (Python isn't required). However, if you don't want to install a tool you can use Transifex' REST API to achieve the same results.

A neat feature is the translation memory for each project. Translators can add words or phrases and can comment the translations. The web front-end looks like this, where you can see suggestions from already translated strings and underlined words already defined in translation memory.

Current State

Transifex project 

After half an hour sed coding with Andrea a project has been created and configured at Transifex for all UI elements of the current code base. We identified two different type of properties files, plugin.properties and messages.properties. For all bundles we found 110 resources and pushed these and its already available translations:


To join a Translation Team you have to create a Transifex account or use your Social Account such as Twitter, Facebook, Google+ or even LinkedIn. Go to the main page and choose LOG IN top right.


Origin Resources will be synchronized in a daily manner from our Github repository to keep up-to-date with added, changed or even deleted text strings for UI elements.

Transifex client tool configuration

The client tool needs a configuration on client side. Its a simple text file which should be stored in a .tx folder of your working copy. Its name is config and contains configurations for each resource - where to find it in the workspace and how the resource is accessible from Transifex (project slug and resource slug).



An initial configuration is available right here.

If you're interested to contribute feel free to join a Translation Team. Happy Translating!!

Sunday, July 28, 2013

Build Instructions for locationtech_ip branch



Update: the original post was getting to big, so I have taken these build instructions into their own post. This will also serve as build instructions until we migrate our developers guide.

Command Line build using Maven

0. Here is the branch, check it out, or fork as you see fit.

https://github.com/uDig/udig-platform/tree/locationtech_ip

1. Download stuff (using maven and wget)

mvn clean install -f pom-libs.xml

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8:05.291s

2) Build Online Help

cd docs
ant help-deploy

help-deploy:
     [copy] Copying 1078 files to /Volumes/Fiore/jody/java/udig/jive/plugins/net.refractions.udig.help/EN

BUILD SUCCESSFUL
Total time: 13 seconds


3) Tycho Build

mvn clean install -Pproduct,sdk

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:44.827s

4) Packaging, branding and installers

cd deploy
./all.sh

..snip..
Releasing linux64
Creating ./build/linux64/udig
Building ./build/udig-1.5-SNAPSHOT.linux.gtk.x86_64.zip ...
Extracting ./../features/net.refractions.udig-product/target/products/net.refractions.udig-product-linux.gtk.x86_64.zip
Preparing ./build/linux64 with ./jre/jre1.6.0_25.lin64_gdal_ecw
Looking for ./jre/jre1.6.0_25.lin64_gdal_ecw.tar.gz
Extracting ./jre/jre1.6.0_25.lin64_gdal_ecw.tar.gz
Preparing ./build/linux64 with start up scripts and html files
Assemble ./build/udig-1.5-SNAPSHOT.linux.gtk.x86_64.zip

5) Upload to website

See results at http://udig.refractions.net/download/unstable/ there should be a 1.5-SNAPSHOT by the time you read this.

Eclipse Build

uDig makes use of a target platform, in order to download and reference bundles from:
  • Eclipse Rich Client Platform (we are using Indigo)
  • Babel Project (providing translations)
  • Orbit (open source components that have been checked by the Eclipse legal team)
Here is how to set that up:

0. Here is the branch, check it out, or fork as you see fit.

https://github.com/uDig/udig-platform/tree/locationtech_ip

1. Download stuff (using maven and wget)

mvn clean install -f pom-libs.xml

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8:05.291s

2. Import the eu.udig.targets.indgo project.
3. Open up udig-indigo-target.target and click on Set as Target Platform
Target Definition with Indigo, Babel and Orbit
4. Once that is done you can import the remaining uDig projects and run as normal

Thanks to Frank for figuring out how to do this!

Friday, July 26, 2013

Migration update - does it build?


A lot of work has been going into the locationtech_ip branch of uDig:

There are two streams to the incubation process for uDig.
  • Preliminary Approval (done) - this is a review of the initial code contribution (i.e. the source code the team is working from). Once it has been reviewed the codebase can be hosted on Eclipse infrastructure - allowing the team to collaborate while to the dependencies are checked.
  • Legal Review (in progress): The IP review is extensive and goes through and double checks the dependencies that are used by uDig. Both dependencies (such as GeoTools) that are distributed with the uDig download, and also those required to build the project (such as Sphinx).
Diagram adapted from wiki page on Parallel IP Process

Status Update

Here is a quick update:
  • Initial Code Contribution: ready to check-in when we are - yay!
  • Infrastructure: moving shop
    • Email List: We have successfully migrated to udig-dev@locationtech.org email list - thanks to Denis and Jeff for making that happen.Although this is a small change, having a dev list cuts down on the number of communication channels the uDig team has to watch. Anything important can be CCed to the udig-dev list.
    • Build Farm: with our Initial Code Contribution approved we have now been introduced to Thanh from the Eclipse build team. The conversation has given us a lot to look forward to in the coming weeks.
  • Dependencies: This is the one to watch, not all the dependencies are submitted yet.
    • Contribution Queries: Each open source project uDig makes use of needs to go through a quick legal review to confirm it is actually open source, and the team responsible has decent procedures in place to check they are allowed to distribute the code.
      Thus far each community we have contacted has been very helpful with respect to questions. I will post a GeoTools blog next week with thanks to a few authors we have had to track down.
    • Build Dependencies: We have also started submitting "build dependencies" for open source projects we use to create uDig - but do not need to distribute as part of the uDig download. As an example Frank has submitted Sphinx which we use to build our docs and online help.
  • Build Scripts: Looks to be working.
    May need to update this when we migrate to build farm.
  • Release Bundle and Scripts: Frank has updated the plugin descriptions and hit a snag. We have a dual BSD + EPL license, but the plugin description only accepts a single URL for the license field - we may have to stand up a single page with both licenses on it.
    We will need to revisit this with the NSIS Installer and NSIS Plugins are through the IP review. 
  • Branding and Headers: This is going to be one of the last things we do.
    Once the headers are updated (to say the project is distributed by Eclipse Foundation) we have to wait for the Legal review before we can issue a release.
    This will also involve a refactor to the org.locationtech.udig package, so we want to handle this step very careful.

Dependencies

I have split out our two dependency activities in the above chart, in order to highlight the difference between creating the request for the legal team, vs submitting the source code (so there is something to review).


You can also see where the action is at the moment - reviewing a very large dependency called GeoTools.

It should be noted that the LegalReview process is developer friendly, making use of Bugzilla for each request, and attaching source code to each ticket in the same manner you would a patch.

Sunday, March 24, 2013

uDig 1.4.0 Released

The uDig Community is pleased to announce the release of uDig 1.4.0.

This release offers some great new features including the long anticipated GeoScript editor (thanks to HydroloGIS),  a full featured graticule map decoration (thanks to Kenneth Gulbrandsoy), and a new Document view (thanks to LISAsoft).

Thanks to Galdoslat-lon and LISAsoft for their participation in OWS9. Their extensive quality assurance work has allowed uDig to enable WMS 1.3.0 by default.

On the development front the SDK now functions as standalone target platform complete with Eclipse and GeoTools source code. Thanks to Sam Guymer for this work, and to community members Suraj Patil and Thomas Dolley for testing. We also offer our congratulations to Kenneth Gulbrandsoy for his promotion to committer status.

The release is issued under a dual EPL and BSD license and marks our initial contribution to LocationTech. No further releases are scheduled under the Refractions banner.

Release Details


About uDig 1.4.0

License Transition Complete

The uDig project has changed to a dual BSD / EPL license. This license is in support of our application to LocationTech (an Eclipse Foundations industry working group). 

GeoScript Editor

This release offers some great new features including the long anticipated GeoScript editor. The use of scripting within a GIS application affords a great middle ground between developers and users. The GeoScript project is focused on taming the power of GIS for dynamic scripting languages. This strong focus on ease-of-use makes for an excellent alignment with the uDig project.

Document View

The use of feature attributes as a jumping off point for a document, web page or script action is known as a hot-link, while the concept of an attachment is well-known from the use of email. uDig provides the innovative combination of these two ideas in a single Document view.

As part of this work, dynamic feature labels can be defined (used by the Info Tool and Document view).


About uDig 1.4 Series



The 1.4 series brings several exciting new features to the table while serving as a stepping stone for the project's migration to LocationTech.

For users:
  • GeoScript editor allowing scripting directly from the uDig application
  • Document view for working with attachments and hot-links
  • New graticule map decorator supporting metric coordinate reference systems
  • WMS 1.3.0 now enabled by default
For developers:
  • Provided under a dual EPL and BSD license with associated refresh of a all headers, plugin license and about.html files.
  • Transition to Maven command line build is complete with both product and SDK builds
  • SDK is a complete target platform (no longer requires an Eclipse Download).
  • Based on GeoTools 9.0-M0
Release notes:

Known Issues

  • The mac release does not support the full range of ImageIO-EXT formats. Please contact udig-devel if you are in position to build GDAL on Mac OSX.
  • The ImageIO-EXT / GDAL library requires native code for MrSID and ECW limiting support to win32 and linux32 platforms.

Sunday, March 17, 2013

uDig Officially Joins LocationTech

The uDig team is thrilled to announce that our proposal to join LocationTech has been accepted. The project now has an landing page on the LocationTech website:
The list of developers on that page will grow as we get around to filling in our paperwork. There is also a happy "egg" logo next to our project as we are currently "in incubation". Our mentors for this process are Benjamin Cabe and Wayne Beaton.
A big thanks to the uDig team, the helpful people on the location-tech email list, and the Eclipse staff who helped make this happen.

About LocationTech

LocationTech is the Eclipse Foundation industry working group for "location aware" technologies. It is a great fit for the uDig project with our technology stack being based on Eclipse RCP.

The Eclipse Foundation is a vendor neutral, member support non-profit Foundation. We look forward to participating, making friends in the Eclipse community and joining in LocationTech's out reach to industry.
What is Next

The uDig team is busy filling in the paperwork to access LocationTech facilities, and will be migrating the codebase shortly.

One of the initial benefits is access to the Eclipse Foundation intellectual property services. While we are confident our codebase is in good shape, the review by the independent IP team is an important step for the uDig project. The costs associated with intellectual property services is a prohibitive constraint on the adoption of open source in general. The completion of this review for the uDig project lowers risk for everyone involved and makes the project easier to deploy.

We have also enjoyed taking part in the LocationTech industry out reach including a recent video presentation on uDig by Jody Garnett and Frank Gasdorf.

Sneak Peek

While we wait the team will continue working on the 1.4.0 release which will be our last release under the Refractions banner. If you would like a sneak peak, the documentation is online, including the What is New page.