2012-01-30 Murray Cumming Translations: Try to translate the strings. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties: Take the Open translation from GTK+'s .po files. Take the Details translation from Glom's po files. I have added the other strings to Glom so we can get translations that way: http://git.gnome.org/browse/glom/commit/?id=c3cefe607428a84bdf8de1b04e8bef6f70b04564 2012-01-27 Murray Cumming TableSelectionViewImpl: Put the search label and entry in a div. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Put the search widgets in a FlowTable so that the CSS can be used to style them while keeping them together. * src/main/webapp/style.css: Mention the new div. 2012-01-27 Murray Cumming Translate more strings in more locales. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: * src/main/java/org/glom/web/client/ui/details/DetailsCell.java: * src/main/java/org/glom/web/client/ui/details/RelatedListTable.java: * src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Translate the "Details" and "Open" string too. * src/main/java/org/glom/web/OnlineGlom.gwt.xml: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_cs.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_es.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_sl.properties: * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_zh_CN.properties: Add these new locales as placeholders though they currently contain English. 2012-01-27 Murray Cumming OnlineGlomServiceImpl: Avoid (unlikely) null object dereferences. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: get*(): Check the ConfiguredDocument* for null before using it. 2012-01-26 Murray Cumming Tell Eclipse about the generated java files. * .classpath: This lets it find OnlineGlomConstants.java. It would be nice if Eclipse just used the maven build files. 2012-01-26 Murray Cumming Prevent a crash when no locale is specified in the URL. * src/main/java/org/glom/web/client/Utils.java: getCurrentLocaleID(): Avoid returning a null string, obtained from Window.Location.getParameter(). This caused a crash when it was later passed to libglom's API. * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java: init(), getDocumentInfo(), getListViewLayout(), getDocuments(), getDetailsLayoutAndData(): Use StringUtils.defaultString() to guard against future null strings. 2012-01-26 Murray Cumming Use the ?locale= query param instead of the &lang= token param. * src/main/java/org/glom/web/client/place/ListPlace.java * src/main/java/org/glom/web/client/place/DetailsPlace.java * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java Remove the lang token key and value. * src/main/java/org/glom/web/client/ui/TableSelectionView.java * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: When the user selects a different locale from the chooser, use Window.Location.assign() to change the URL, which then causes a reload. * src/main/java/org/glom/web/client/Utils.java: Added getCurrentLocaleID(). * src/main/java/org/glom/web/client/activity/DetailsActivity.java * src/main/java/org/glom/web/client/activity/DocumentSelectionActivity.java * src/main/java/org/glom/web/client/activity/ListActivity.java * src/main/java/org/glom/web/client/activity/TableSelectionActivity * src/main/java/org/glom/web/client/ui/DocumentSelectionView.java * src/main/java/org/glom/web/client/ui/DocumentSelectionViewImpl.java: * src/main/java/org/glom/web/client/ui/ListView.java: * src/main/java/org/glom/web/client/ui/ListViewImpl.java: Remove localeID member variables and method/constructor parameters, instead using Utils.getCurrentLocaleID() when we need a localID to pass to OnlineGlomService. 2012-01-26 Murray Cumming Internationalize the UI strings. * pom.xml: gwt-maven-plugin: Add the i18n goal and specify a , removing the unused . * src/main/resources/org/glom/web/client/Messages.properties: Remove this because it is unused. Messages are apparently strings that can have parameters, but we do not need that yet, so Contants will be enough for now. * src/main/java/org/glom/web/OnlineGlom.gwt.xml: Add extend-property lines to say that we support the en and de locales. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants.properties: The original English strings. * src/main/resources/org/glom/web/client/ui/OnlineGlomConstants_de.properties: Some German translations of the English strings. The i18n goal then uses the .properties file to generate an OnlineGlomConstants.java file in target/ and somehow GWT.create() magically returns an implementation that returns the translated strings. The documentation suggests putting these in src/java/*/client/, but it seems best to put it in src/resources/*/client/. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java: Instantiate OnlineGlomConstants via GWT.create() and use it to get the strings instead of hard-coding them. Note that we cannot import OnlineGlomConstants because it does not exist yet, but that does not seem to stop the build, though it confuses Eclipse. You can see the translated string by adding ?locale=de to the URL, like so: http://127.0.0.1:8888/OnlineGlom.html?gwt.codesvr=127.0.0.1:9997?locale=de#list:document=film_manager 2012-01-24 Murray Cumming Improve null/empty String checks. * pom.xml: Add a dependency on commons-lang, to use org.apache.commons.lang.StringUtils. * src/main/java/org/glom/web/server/ConfiguredDocument.java * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java * src/main/java/org/glom/web/server/database/RelatedListDBAccess.java * src/main/java/org/glom/web/server/database/RelatedListNavigation.java: Use StringUtils.isEmpty(). * src/main/java/org/glom/web/client/StringUtils.java: Add a tiny StringUtils class with a static isEmpty() function because we cannot use org.apache.commons.lang.StringUtils in client-side GWT code because it (apparently) cannot be compiled to javascript. * src/main/java/org/glom/web/client/activity/DetailsActivity.java * src/main/java/org/glom/web/client/activity/ListActivity.java * src/main/java/org/glom/web/client/activity/TableSelectionActivity.java * src/main/java/org/glom/web/client/place/DetailsPlace.java * src/main/java/org/glom/web/client/place/HasSelectableTablePlace.java * src/main/java/org/glom/web/client/place/ListPlace.java * src/main/java/org/glom/web/client/ui/cell/NumericCell.java * src/main/java/org/glom/web/client/ui/cell/TextCell.java * src/main/java/org/glom/web/client/ui/details/DetailsCell.java * src/main/java/org/glom/web/client/ui/details/Group.java * src/main/java/org/glom/web/client/ui/details/Notebook.java: Use our StringUtils.isEmpty() function. 2012-01-24 Murray Cumming Update to the latest java-libglom API. * pom.xml: Require java-libglom 1.21.4. * src/main/java/org/glom/web/server/ConfiguredDocument.java getDocumentInfo(), getListViewLayoutGroup(): * src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java getDocuments(): * src/main/java/org/glom/web/server/database/DBAccess.java getFieldsToShowForSQLQueryAddGroup(), getPrimaryKeyLayoutItemField(): Replace get_database_title() with either get_database_title_original() or get_database_title(localeID). 2012-01-24 Murray Cumming ConfiguredDocument: Avoid a null pointer exception. * src/main/java/org/glom/web/server/ConfiguredDocument.java Initialize localeID to "" to avoid returning a null String which causes a crash in java-libglom's swing-generated code. 2012-01-23 Murray Cumming Some simple renaming. * src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java * src/main/webapp/style.css: Rename, tableChooser to tablesChooser. Likewise for localeChooser. This seems more appropriate and is less ambiguous particularly in the .css file. 2012-01-23 Murray Cumming ConfiguredDocument: Rename the localedID private member variable. 2012-01-23 Murray Cumming Adapt to the latest java-libglom API from git master. * src/main/java/org/glom/web/server/database/ListDBAccess.java: libglom now uses only Vector instead of List, which uses add() instead of addLast().