private void fetchData( String version, String field, ITranslation translation, List<RowData> rows) { for (ITranslationKind kind : translation.getAllKinds()) { short column = 0; RowData row = new RowData(3 + getLocales().size()); row.setValue(column++, version); row.setValue(column++, field); row.setValue(column++, translation.getDisplayName(kind)); fetchTranslations(translation, kind, row, column); rows.add(row); } }
private void fetchTranslations( ITranslation translation, ITranslationKind kind, RowData row, short column) { for (Locale locale : getLocales()) { String message = ""; try { if (!translation.isInherited(kind, locale)) { message = translation.getText(kind, locale); } } catch (TranslationException ex) { String msg = "Error when reading translation [" + translation.getDisplayName(kind) + "] for " + translation.getOwner(); // LOGGER.error(msg, ex); } finally { row.setValue(column++, message); } } }