slub.team team mailing list archive
-
slub.team team
-
Mailing list archive
-
Message #00209
[Merge] lp:~zeutschel/goobi-production/refactoring-messages into lp:goobi-production
Matthias Ronge has proposed merging lp:~zeutschel/goobi-production/refactoring-messages into lp:goobi-production.
Requested reviews:
Ralf Claussnitzer (ralf-claussnitzer)
Related bugs:
Bug #961435 in Goobi.Production: "Spanish language flag without translation in metadata editor"
https://bugs.launchpad.net/goobi-production/+bug/961435
For more details, see:
https://code.launchpad.net/~zeutschel/goobi-production/refactoring-messages/+merge/103819
The patch has been added.
--
https://code.launchpad.net/~zeutschel/goobi-production/refactoring-messages/+merge/103819
Your team Saxon State Library Team is subscribed to branch lp:goobi-production.
=== modified file 'build.xml'
--- build.xml 2012-04-19 13:32:55 +0000
+++ build.xml 2012-04-27 07:27:33 +0000
@@ -207,15 +207,6 @@
Build
==================================================-->
- <!-- Copy message resource bundles -->
- <target name="copy-message-resources" depends="init">
- <copy todir="${build.classes}/messages">
- <fileset dir="${java.src.dir}/messages">
- <include name="*.properties"/>
- </fileset>
- </copy>
- </target>
-
<!-- Copy hibernate configuration files -->
<target name="copy-hibernate-resources" depends="init">
<copy todir="${build.classes}">
@@ -226,7 +217,7 @@
</target>
<!-- Compile application -->
- <target name="compile" depends="init, copy-message-resources, copy-hibernate-resources, compile-jsp">
+ <target name="compile" depends="init, copy-hibernate-resources, compile-jsp">
<javac includeAntRuntime="false" srcdir="${java.src.dir}:${java.src.dubious.dir}:${build.jsp.src}"
destdir="${build.classes}"
source="${build.javac.source}"
=== renamed file 'src/messages/messages_de.properties' => 'config/messages_de.properties'
--- src/messages/messages_de.properties 2012-03-28 09:01:49 +0000
+++ config/messages_de.properties 2012-04-27 07:27:33 +0000
@@ -21,7 +21,7 @@
#
#Created by JInto - www.guh-software.de
-#Thu Jan 20 13:02:30 CET 2011
+#Fri Apr 20 10:57:36 CEST 2012
Anlegen\ eines\ Prozesses\ (auf\ Bandebene)=Anlegen eines Vorgangs (auf Bandebene)
Anlegen\ eines\ Prozesses\ auf\ Bandebene=Anlegen eines Prozesses auf Bandebene
AuswaehlenAusVorhandenenProzessen=Ausw\u00E4hlen aus vorhandenen Prozessen
@@ -45,7 +45,7 @@
Import\ in\ die\ lokalen\ DMS\ bzw.\ Repositories=Import in die lokalen DMS bzw. Repositories
Korrektur\ Import\ Zentralblatt=Korrektur Import Zentralblatt
KorrekturFuer=Korrektur f\u00FCr Schritt
-KorrekturloesungFuer=Probleml\u00F6sung f\u00FCr
+KorrekturloesungFuer=Korrekturl\u00F6sung f\u00FCr Schritt
Lizenzeinwerbung=Lizenzeinwerbung
Normierung\ der\ Zeitschriftentitel=Normierung der Zeitschriftentitel
Pr\u00FCfung\ der\ Vollst\u00E4ndigkeit\ der\ Zentralblattdaten\ auf\ Artikelebene=Pr\u00FCfung der Vollst\u00E4ndigkeit der Zentralblattdaten auf Artikelebene
@@ -514,6 +514,8 @@
pagesPerMonth=Seiten pro Monat
pagesPerQuarter=Seiten pro Quartal
pagesPerYear=Seiten pro Jahr
+pagination.error.uncountedFoliationNotAllowed=Blattzaehlung ohne Nummerierung nicht erlaubt
+paginationFictitious=Fiktive Paginierung
paginierung=Paginierung
paginierungBearbeiten=Paginierung bearbeiten
paginierungEinlesen=Paginierung anhand der Images einlesen
@@ -629,7 +631,7 @@
startseite=Startseite
statistik=Statistik
statistikBenutzer=Benutzerstatistik
-statistikDatenbank=Statistik Datenbank
+statistikDatenbank=Datenbankstatistik
statistikPersoenlich=Pers\u00F6nliche Statistik
statistischeAuswertung=Statistische Auswertung
status=Status
@@ -762,6 +764,3 @@
zurueckZurStartseite=Zur\u00FCck zur Startseite
zusaetzlicheDetails=Zus\u00E4tzliche Details
zusammenfassung=Zusammenfassung
-pagination.error.uncountedFoliationNotAllowed=Blattzaehlung ohne Nummerierung nicht erlaubt
-paginationFictitious=Fiktive Paginierung
-
=== renamed file 'src/messages/messages_en.properties' => 'config/messages_en.properties'
--- src/messages/messages_en.properties 2012-03-28 09:01:49 +0000
+++ config/messages_en.properties 2012-04-27 07:27:33 +0000
@@ -21,7 +21,7 @@
#
#Created by JInto - www.guh-software.de
-#Thu Jan 20 13:02:30 CET 2011
+#Fri Apr 20 10:57:36 CEST 2012
Anlegen\ eines\ Prozesses\ (auf\ Bandebene)=Process creation (at volume level)
Anlegen\ eines\ Prozesses\ auf\ Bandebene=Process creation (at volume level)
AuswaehlenAusVorhandenenProzessen=Choose from previous processes
@@ -45,7 +45,7 @@
Import\ in\ die\ lokalen\ DMS\ bzw.\ Repositories=Import into local DMS or repositories
Korrektur\ Import\ Zentralblatt=Check import from Zentralblatt
KorrekturFuer=Correction for step
-KorrekturloesungFuer=Solve problem for
+KorrekturloesungFuer=Correction done for step
Lizenzeinwerbung=Application for a licence
Normierung\ der\ Zeitschriftentitel=Standardisation of journal titles
Pr\u00FCfung\ der\ Vollst\u00E4ndigkeit\ der\ Zentralblattdaten\ auf\ Artikelebene=Completeness check of Zentralblatt data at article level
@@ -514,6 +514,8 @@
pagesPerMonth=Pages per month
pagesPerQuarter=Pages per quarter
pagesPerYear=Pages per Year
+pagination.error.uncountedFoliationNotAllowed=Foliation not allowed when using 'uncounted'
+paginationFictitious=Fictitious paginating
paginierung=Pagination
paginierungBearbeiten=Edit pagination
paginierungEinlesen=Read in pagination from images
@@ -762,6 +764,3 @@
zurueckZurStartseite=Back to start page
zusaetzlicheDetails=Additional details
zusammenfassung=Summary
-pagination.error.uncountedFoliationNotAllowed=Foliation not allowed when using 'uncounted'
-paginationFictitious=Fictitious paginating
-
=== modified file 'newpages/inc/box_Kopf.jsp'
--- newpages/inc/box_Kopf.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc/box_Kopf.jsp 2012-04-27 07:27:33 +0000
@@ -35,19 +35,19 @@
style="position:absolute;top:15px;right:100px;margin:0px;"
title="deutsche Version">
<h:graphicImage value="/newpages/images/flag_de_ganzklein.gif" />
- <f:param name="locale" value="de" />
+ <f:param name="locale" value="de_DE" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}" id="lang2"
style="position:absolute;top:15px;right:65px;margin:0px"
title="english version">
<h:graphicImage value="/newpages/images/flag_en_ganzklein.gif" />
- <f:param name="locale" value="en" />
+ <f:param name="locale" value="en_GB" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}" id="lang3"
style="position:absolute;top:15px;right:30px;margin:0px" rendered="true"
title="russian version">
<h:graphicImage value="/newpages/images/flag_ru_ganzklein.gif" />
- <f:param name="locale" value="ru" />
+ <f:param name="locale" value="ru_RU" />
</h:commandLink>
</h:form>
@@ -79,17 +79,17 @@
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
title="deutsche Version">
<h:graphicImage value="/newpages/images/flag_de_ganzklein.gif" />
- <f:param name="locale" value="de" />
+ <f:param name="locale" value="de_DE" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
title="english version">
<h:graphicImage value="/newpages/images/flag_en_ganzklein.gif" />
- <f:param name="locale" value="en" />
+ <f:param name="locale" value="en_GB" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
rendered="true" title="russian version">
<h:graphicImage value="/newpages/images/flag_ru_ganzklein.gif" />
- <f:param name="locale" value="ru" />
+ <f:param name="locale" value="ru_RU" />
</h:commandLink>
</h:panelGrid>
</h:form>
=== modified file 'newpages/inc/box_head.jsp'
--- newpages/inc/box_head.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc/box_head.jsp 2012-04-27 07:27:33 +0000
@@ -34,6 +34,6 @@
<x:stylesheet path="/css/box_navigation.css"/>
<x:stylesheet path="/css/box_styles.css"/>
- <f:loadBundle basename="Messages.messages" var="msgs" />
+ <f:loadBundle basename="messages" var="msgs" />
<title><h:outputText value="#{HelperForm.applicationHeaderTitle} 1.19" /></title>
</head>
\ No newline at end of file
=== modified file 'newpages/inc/head.jsp'
--- newpages/inc/head.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc/head.jsp 2012-04-27 07:27:33 +0000
@@ -33,7 +33,7 @@
<link rel="shortcut icon" href="favicon.ico"/>
<x:stylesheet media="screen" path="#{LoginForm.myBenutzer == null?'/css/default.css':LoginForm.myBenutzer.css}"/>
<x:stylesheet media="print" path="/css/system/print.css"/>
- <f:loadBundle basename="messages.messages" var="msgs" />
+ <f:loadBundle basename="messages" var="msgs" />
<title><h:outputText value="#{HelperForm.applicationHeaderTitle} - #{HelperForm.version}"/></title>
<!-- <h:outputText value="internal version number: #{HelperForm.buildVersion}"/> -->
</head>
\ No newline at end of file
=== modified file 'newpages/inc/tbl_Kopf.jsp'
--- newpages/inc/tbl_Kopf.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc/tbl_Kopf.jsp 2012-04-27 07:27:33 +0000
@@ -79,12 +79,12 @@
<h:commandLink action="#{SpracheForm.SpracheUmschalten}" id="lang1"
title="deutsche Version">
<h:graphicImage value="/newpages/images/flag_de_ganzklein.gif" />
- <f:param name="locale" value="de" />
+ <f:param name="locale" value="de_DE" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}" id="lang2"
title="english version">
<h:graphicImage value="/newpages/images/flag_en_ganzklein.gif" />
- <f:param name="locale" value="en" />
+ <f:param name="locale" value="en_GB" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}" id="lang3"
rendered="false" title="russian version">
=== modified file 'newpages/inc_AktuelleSchritte/Schritte_Liste.jsp'
--- newpages/inc_AktuelleSchritte/Schritte_Liste.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc_AktuelleSchritte/Schritte_Liste.jsp 2012-04-27 07:27:33 +0000
@@ -28,7 +28,7 @@
~ Suite 330, Boston, MA 02111-1307 USA
--%>
-<a4j:loadBundle basename="messages.messages" var="msgs" />
+<a4j:loadBundle basename="messages" var="msgs" />
<htm:h4>
<h:outputText value="#{msgs.meineAufgabenMsg}" />
=== modified file 'newpages/inc_Prozessverwaltung/Context_Prozesse_Liste.jsp'
--- newpages/inc_Prozessverwaltung/Context_Prozesse_Liste.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc_Prozessverwaltung/Context_Prozesse_Liste.jsp 2012-04-27 07:27:33 +0000
@@ -29,7 +29,7 @@
~ Suite 330, Boston, MA 02111-1307 USA
--%>
-<a4j:loadBundle basename="messages.messages" var="msgs" />
+<a4j:loadBundle basename="messages" var="msgs" />
<htm:h4>
<h:outputText value="#{msgs.prozessvorlagen}"
=== modified file 'newpages/inc_Prozessverwaltung/Prozesse_Liste.jsp'
--- newpages/inc_Prozessverwaltung/Prozesse_Liste.jsp 2012-04-02 10:32:35 +0000
+++ newpages/inc_Prozessverwaltung/Prozesse_Liste.jsp 2012-04-27 07:27:33 +0000
@@ -28,7 +28,7 @@
~ Suite 330, Boston, MA 02111-1307 USA
--%>
-<a4j:loadBundle basename="messages.messages" var="msgs" />
+<a4j:loadBundle basename="messages" var="msgs" />
<htm:h4>
<h:outputText value="#{msgs.prozessvorlagen}"
=== modified file 'newpages/inc_Prozessverwaltung/prozess_box_Schritte.jsp'
--- newpages/inc_Prozessverwaltung/prozess_box_Schritte.jsp 2011-12-20 08:07:09 +0000
+++ newpages/inc_Prozessverwaltung/prozess_box_Schritte.jsp 2012-04-27 07:27:33 +0000
@@ -28,7 +28,7 @@
~ Suite 330, Boston, MA 02111-1307 USA
--%>
-<a4j:loadBundle basename="messages.messages" var="msgs" />
+<a4j:loadBundle basename="messages" var="msgs" />
<%-- ===================== GROSSE SCHRITT BOX IM GELADENEN PROZESS ====================== --%>
=== modified file 'pages/Metadaten2oben.jsp'
--- pages/Metadaten2oben.jsp 2011-12-20 08:07:09 +0000
+++ pages/Metadaten2oben.jsp 2012-04-27 07:27:33 +0000
@@ -98,17 +98,17 @@
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
title="deutsche Version" target="rechts">
<h:graphicImage value="/newpages/images/flag_de_ganzklein.gif" />
- <f:param name="locale" value="de" />
+ <f:param name="locale" value="de_DE" />
<f:param name="ziel" value="Metadaten2rechts" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
title="english version" target="rechts">
<h:graphicImage value="/newpages/images/flag_en_ganzklein.gif" />
- <f:param name="locale" value="en" />
+ <f:param name="locale" value="en_GB" />
<f:param name="ziel" value="Metadaten2rechts" />
</h:commandLink>
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
- title="spanish version" target="rechts">
+ title="spanish version" target="rechts" rendered="false">
<h:graphicImage value="/newpages/images/flag_es_ganzklein.gif" />
<f:param name="locale" value="es" />
<f:param name="ziel" value="Metadaten2rechts" />
@@ -116,7 +116,7 @@
<h:commandLink action="#{SpracheForm.SpracheUmschalten}"
title="english version" target="rechts" rendered="false">
<h:graphicImage value="/newpages/images/flag_ru_ganzklein.gif" />
- <f:param name="locale" value="ru" />
+ <f:param name="locale" value="ru_RU" />
<f:param name="ziel" value="Metadaten2rechts" />
</h:commandLink>
</htm:td>
=== modified file 'src/de/sub/goobi/beans/Prozess.java'
--- src/de/sub/goobi/beans/Prozess.java 2012-04-13 13:17:45 +0000
+++ src/de/sub/goobi/beans/Prozess.java 2012-04-27 07:27:33 +0000
@@ -59,6 +59,7 @@
import de.sub.goobi.persistence.ProzessDAO;
import de.sub.goobi.config.ConfigMain;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.MetadataFormat;
import de.sub.goobi.helper.enums.StepStatus;
import de.sub.goobi.helper.exceptions.DAOException;
@@ -211,7 +212,7 @@
rueckgabe = new BenutzerDAO().get(new Integer(benutzerID));
} catch (Exception e) {
// TODO Meldung in messages implementieren
- Helper.setFehlerMeldung(Helper.getTranslation("userNotFound"), e);
+ Helper.setFehlerMeldung(Messages.getString("userNotFound"), e);
}
}
return rueckgabe;
@@ -716,7 +717,7 @@
File f = new File(getMetadataFilePath());
if (!f.exists()) {
- String errorMessage = Helper.getTranslation("metadataFileNotFound") + " " + f.getAbsolutePath();
+ String errorMessage = Messages.getString("metadataFileNotFound") + " " + f.getAbsolutePath();
myLogger.warn(errorMessage);
Helper.setFehlerMeldung(errorMessage);
result = false;
=== modified file 'src/de/sub/goobi/beans/Schritt.java'
--- src/de/sub/goobi/beans/Schritt.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/beans/Schritt.java 2012-04-27 07:27:33 +0000
@@ -37,6 +37,7 @@
import de.sub.goobi.beans.property.IGoobiEntity;
import de.sub.goobi.beans.property.IGoobiProperty;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.StepEditType;
import de.sub.goobi.helper.enums.StepStatus;
@@ -298,7 +299,7 @@
}
public String getTitelLokalisiert() {
- return Helper.getTranslation(titel);
+ return Messages.getString(titel);
}
public String getTitel() {
=== modified file 'src/de/sub/goobi/config/ConfigMain.java'
--- src/de/sub/goobi/config/ConfigMain.java 2011-12-20 08:07:09 +0000
+++ src/de/sub/goobi/config/ConfigMain.java 2012-04-27 07:27:33 +0000
@@ -34,6 +34,7 @@
import org.apache.log4j.Logger;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
public class ConfigMain implements Serializable{
private static final long serialVersionUID = -7167854300981799440L;
@@ -106,7 +107,7 @@
}
} catch (Exception ioe) {
myLogger.error("IO error: " + ioe);
- Helper.setFehlerMeldung(Helper.getTranslation("couldNotCreateImageFolder"), ioe.getMessage());
+ Helper.setFehlerMeldung(Messages.getString("couldNotCreateImageFolder"), ioe.getMessage());
}
}
return filename;
=== modified file 'src/de/sub/goobi/export/dms/ExportDms.java'
--- src/de/sub/goobi/export/dms/ExportDms.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/export/dms/ExportDms.java 2012-04-27 07:27:33 +0000
@@ -45,6 +45,7 @@
import de.sub.goobi.config.ConfigMain;
import de.sub.goobi.config.ConfigProjects;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.MetadataFormat;
import de.sub.goobi.helper.exceptions.DAOException;
import de.sub.goobi.helper.exceptions.ExportFileException;
@@ -118,7 +119,7 @@
} catch (Exception e) {
- Helper.setFehlerMeldung(Helper.getTranslation("exportError") + myProzess.getTitel(), e);
+ Helper.setFehlerMeldung(Messages.getString("exportError") + myProzess.getTitel(), e);
myLogger.error("Export abgebrochen, xml-LeseFehler", e);
return;
}
=== modified file 'src/de/sub/goobi/forms/AktuelleSchritteForm.java'
--- src/de/sub/goobi/forms/AktuelleSchritteForm.java 2012-03-10 13:33:00 +0000
+++ src/de/sub/goobi/forms/AktuelleSchritteForm.java 2012-04-27 07:27:33 +0000
@@ -48,7 +48,7 @@
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
-import messages.Messages;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.beans.Benutzer;
import de.sub.goobi.beans.HistoryEvent;
import de.sub.goobi.beans.Prozess;
@@ -226,7 +226,7 @@
*/
new ProzessDAO().save(mySchritt.getProzess());
} catch (DAOException e) {
- Helper.setFehlerMeldung(Helper.getTranslation("stepSaveError"), e);
+ Helper.setFehlerMeldung(Messages.getString("stepSaveError"), e);
myLogger.error("step couldn't get saved", e);
} finally {
flagWait = false;
@@ -323,8 +323,8 @@
if (propList.size() > 0) {
for (PropertyTemplate prop : propList) {
if (prop.isIstObligatorisch() && (prop.getWert() == null || prop.getWert().equals(""))) {
- Helper.setFehlerMeldung(Helper.getTranslation("Eigenschaft") + " " + prop.getTitel() + " "
- + Helper.getTranslation("requiredValue"));
+ Helper.setFehlerMeldung(Messages.getString("Eigenschaft") + " " + prop.getTitel() + " "
+ + Messages.getString("requiredValue"));
return "";
}
}
=== modified file 'src/de/sub/goobi/forms/BenutzerverwaltungForm.java'
--- src/de/sub/goobi/forms/BenutzerverwaltungForm.java 2012-04-16 13:54:13 +0000
+++ src/de/sub/goobi/forms/BenutzerverwaltungForm.java 2012-04-27 07:27:33 +0000
@@ -57,6 +57,7 @@
import de.sub.goobi.persistence.LdapGruppenDAO;
import de.sub.goobi.persistence.ProjektDAO;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.exceptions.DAOException;
import de.sub.goobi.helper.ldap.Ldap;
@@ -143,7 +144,7 @@
dao.save(myClass);
return "BenutzerAlle";
} else {
- Helper.setFehlerMeldung("", Helper.getTranslation("loginBereitsVergeben"));
+ Helper.setFehlerMeldung("", Messages.getString("loginBereitsVergeben"));
return "";
}
} catch (DAOException e) {
@@ -160,7 +161,7 @@
Matcher matcher = pattern.matcher(inLogin);
valide = matcher.matches();
if (!valide)
- Helper.setFehlerMeldung("", Helper.getTranslation("loginNotValid"));
+ Helper.setFehlerMeldung("", Messages.getString("loginNotValid"));
/* Pfad zur Datei ermitteln */
FacesContext context = FacesContext.getCurrentInstance();
@@ -175,7 +176,7 @@
while ((str = in.readLine()) != null)
if (str.length() > 0 && inLogin.equalsIgnoreCase(str)) {
valide = false;
- Helper.setFehlerMeldung("", "Login " + str + Helper.getTranslation("loginNotValid"));
+ Helper.setFehlerMeldung("", "Login " + str + Messages.getString("loginNotValid"));
}
in.close();
} catch (IOException e) {
@@ -319,7 +320,7 @@
Ldap myLdap = new Ldap();
try {
myLdap.createNewUser(myClass, myClass.getPasswortCrypt());
- Helper.setMeldung(null, Helper.getTranslation("ldapWritten") + myClass.getNachVorname(), "");
+ Helper.setMeldung(null, Messages.getString("ldapWritten") + myClass.getNachVorname(), "");
} catch (Exception e) {
logger.warn("Could not generate ldap entry: " + e.getMessage());
}
=== modified file 'src/de/sub/goobi/forms/HelperForm.java'
--- src/de/sub/goobi/forms/HelperForm.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/forms/HelperForm.java 2012-04-27 07:27:33 +0000
@@ -42,7 +42,7 @@
import de.sub.goobi.beans.Regelsatz;
import de.sub.goobi.persistence.RegelsatzDAO;
import de.sub.goobi.config.ConfigMain;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.MetadataFormat;
import de.sub.goobi.helper.exceptions.DAOException;
@@ -112,22 +112,22 @@
public String getApplicationWebsiteMsg() {
String rueck = ConfigMain.getParameter("ApplicationWebsiteMsg", getApplicationWebsiteUrl());
- return Helper.getTranslation(rueck);
+ return Messages.getString(rueck);
}
public String getApplicationHomepageMsg() {
String rueck = ConfigMain.getParameter("ApplicationHomepageMsg", getApplicationWebsiteUrl());
- return Helper.getTranslation(rueck);
+ return Messages.getString(rueck);
}
public String getApplicationTechnicalBackgroundMsg() {
String rueck = ConfigMain.getParameter("ApplicationTechnicalBackgroundMsg", getApplicationWebsiteUrl());
- return Helper.getTranslation(rueck);
+ return Messages.getString(rueck);
}
public String getApplicationImpressumMsg() {
String rueck = ConfigMain.getParameter("ApplicationImpressumMsg", getApplicationWebsiteUrl());
- return Helper.getTranslation(rueck);
+ return Messages.getString(rueck);
}
public String getApplicationIndividualHeader() {
=== modified file 'src/de/sub/goobi/forms/LoginForm.java'
--- src/de/sub/goobi/forms/LoginForm.java 2012-02-22 14:20:53 +0000
+++ src/de/sub/goobi/forms/LoginForm.java 2012-04-27 07:27:33 +0000
@@ -28,6 +28,7 @@
import de.sub.goobi.beans.Benutzergruppe;
import de.sub.goobi.config.ConfigMain;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.exceptions.DAOException;
import de.sub.goobi.helper.ldap.Ldap;
import de.sub.goobi.metadaten.MetadatenSperrung;
@@ -38,7 +39,6 @@
import java.io.File;
import java.io.FilenameFilter;
import java.security.NoSuchAlgorithmException;
-import java.util.Iterator;
import java.util.List;
public class LoginForm {
@@ -70,7 +70,7 @@
myBenutzer = null;
/* ohne Login gleich abbrechen */
if (login == null) {
- Helper.setFehlerMeldung("login", "", Helper.getTranslation("wrongLogin"));
+ Helper.setFehlerMeldung("login", "", Messages.getString("wrongLogin"));
} else {
/* prüfen, ob schon ein Benutzer mit dem Login existiert */
@@ -108,7 +108,7 @@
Helper.setFehlerMeldung("passwort", "", "wrong password");
} else {
/* Login nicht vorhanden, also auch keine Passwortprüfung */
- Helper.setFehlerMeldung("login", "", Helper.getTranslation("wrongLogin"));
+ Helper.setFehlerMeldung("login", "", Messages.getString("wrongLogin"));
}
}
// checking if saved css stylesheet is available, if not replace it by something available
@@ -177,11 +177,11 @@
public String PasswortAendernSpeichern() {
/* ist das aktuelle Passwort korrekt angegeben ? */
if (!myBenutzer.istPasswortKorrekt(passwortAendernAlt)) {
- Helper.setFehlerMeldung("passwortform:passwortAendernAlt", "", Helper.getTranslation("aktuellesPasswortFalsch"));
+ Helper.setFehlerMeldung("passwortform:passwortAendernAlt", "", Messages.getString("aktuellesPasswortFalsch"));
} else {
/* ist das neue Passwort beide Male gleich angegeben? */
if (!passwortAendernNeu1.equals(passwortAendernNeu2)) {
- Helper.setFehlerMeldung("passwortform:passwortAendernNeu1", "", Helper.getTranslation("neuesPasswortNichtGleich"));
+ Helper.setFehlerMeldung("passwortform:passwortAendernNeu1", "", Messages.getString("neuesPasswortNichtGleich"));
} else {
try {
/* wenn alles korrekt, dann jetzt speichern */
@@ -192,7 +192,7 @@
new BenutzerDAO().save(temp);
myBenutzer = temp;
- Helper.setMeldung(null, "", Helper.getTranslation("passwortGeaendert"));
+ Helper.setMeldung(null, "", Messages.getString("passwortGeaendert"));
} catch (DAOException e) {
Helper.setFehlerMeldung("could not save", e.getMessage());
} catch (NoSuchAlgorithmException e) {
@@ -214,7 +214,7 @@
temp.setConfVorgangsdatumAnzeigen(myBenutzer.isConfVorgangsdatumAnzeigen());
new BenutzerDAO().save(temp);
myBenutzer = temp;
- Helper.setMeldung(null, "", Helper.getTranslation("configurationChanged"));
+ Helper.setMeldung(null, "", Messages.getString("configurationChanged"));
} catch (DAOException e) {
Helper.setFehlerMeldung("could not save", e.getMessage());
}
=== modified file 'src/de/sub/goobi/forms/ProzesskopieForm.java'
--- src/de/sub/goobi/forms/ProzesskopieForm.java 2012-02-22 11:26:21 +0000
+++ src/de/sub/goobi/forms/ProzesskopieForm.java 2012-04-27 07:27:33 +0000
@@ -86,6 +86,7 @@
import de.sub.goobi.config.ConfigProjects;
import de.sub.goobi.helper.BeanHelper;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.UghHelper;
import de.sub.goobi.helper.enums.StepEditType;
import de.sub.goobi.helper.enums.StepStatus;
@@ -446,13 +447,13 @@
/* kein Titel */
if (prozessKopie.getTitel() == null || prozessKopie.getTitel().equals("")) {
valide = false;
- Helper.setFehlerMeldung(Helper.getTranslation("UnvollstaendigeDaten") + " Process title is empty");
+ Helper.setFehlerMeldung(Messages.getString("UnvollstaendigeDaten") + " Process title is empty");
}
String validateRegEx = ConfigMain.getParameter("validateProzessTitelRegex", "[\\w-]*");
if (!prozessKopie.getTitel().matches(validateRegEx)) {
valide = false;
- Helper.setFehlerMeldung(Helper.getTranslation("UngueltigerTitelFuerVorgang"));
+ Helper.setFehlerMeldung(Messages.getString("UngueltigerTitelFuerVorgang"));
}
/* prüfen, ob der Prozesstitel schon verwendet wurde */
@@ -466,7 +467,7 @@
}
if (anzahl > 0) {
valide = false;
- Helper.setFehlerMeldung(Helper.getTranslation("UngueltigeDaten: ") + " the process title is allready used");
+ Helper.setFehlerMeldung(Messages.getString("UngueltigeDaten: ") + " the process title is allready used");
}
}
@@ -476,7 +477,7 @@
/* keine Collektion ausgewählt */
if (standardFields.get("collections") && getDigitalCollections().size() == 0) {
valide = false;
- Helper.setFehlerMeldung(Helper.getTranslation("UnvollstaendigeDaten") + " digital collection is empty");
+ Helper.setFehlerMeldung(Messages.getString("UnvollstaendigeDaten") + " digital collection is empty");
}
/*
@@ -485,7 +486,7 @@
for (AdditionalField field : additionalFields) {
if ((field.getWert() == null || field.getWert().equals("")) && field.isRequired() && field.getShowDependingOnDoctype() && (StringUtils.isBlank(field.getWert()))) {
valide = false;
- Helper.setFehlerMeldung(Helper.getTranslation("UnvollstaendigeDaten") + " " + field.getTitel() + " is empty");
+ Helper.setFehlerMeldung(Messages.getString("UnvollstaendigeDaten") + " " + field.getTitel() + " is empty");
}
}
return valide;
@@ -1187,9 +1188,9 @@
rueckgabe = df.format(bandint);
} catch (NumberFormatException e) {
if (inFeldName.equals("Bandnummer")) {
- Helper.setFehlerMeldung(Helper.getTranslation("UngueltigeDaten: ") + "Bandnummer ist keine gültige Zahl");
+ Helper.setFehlerMeldung(Messages.getString("UngueltigeDaten: ") + "Bandnummer ist keine gültige Zahl");
} else {
- Helper.setFehlerMeldung(Helper.getTranslation("UngueltigeDaten: ") + "Volume number is not a valid number");
+ Helper.setFehlerMeldung(Messages.getString("UngueltigeDaten: ") + "Volume number is not a valid number");
}
}
if (rueckgabe != null && rueckgabe.length() < 4)
=== modified file 'src/de/sub/goobi/forms/ProzessverwaltungForm.java'
--- src/de/sub/goobi/forms/ProzessverwaltungForm.java 2012-03-10 13:33:00 +0000
+++ src/de/sub/goobi/forms/ProzessverwaltungForm.java 2012-04-27 07:27:33 +0000
@@ -81,6 +81,7 @@
import de.sub.goobi.helper.GoobiScript;
import de.sub.goobi.helper.Helper;
import de.sub.goobi.helper.HelperSchritte;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.WebDav;
import de.sub.goobi.helper.XmlArtikelZaehlen;
import de.sub.goobi.helper.XmlArtikelZaehlen.CountType;
@@ -148,7 +149,7 @@
String validateRegEx = ConfigMain.getParameter("validateProzessTitelRegex", "[\\w-]*");
if (!myNewProcessTitle.matches(validateRegEx)) {
modusBearbeiten = "prozess";
- Helper.setFehlerMeldung(Helper.getTranslation("UngueltigerTitelFuerVorgang"));
+ Helper.setFehlerMeldung(Messages.getString("UngueltigerTitelFuerVorgang"));
return "";
} else {
/* Prozesseigenschaften */
@@ -644,7 +645,7 @@
WebDav myDav = new WebDav();
myDav.DownloadToHome(myProzess, 0, false);
} else {
- Helper.setMeldung(null, Helper.getTranslation("directory ") + " " + myProzess.getTitel() + " " + Helper.getTranslation("isInUse"),
+ Helper.setMeldung(null, Messages.getString("directory ") + " " + myProzess.getTitel() + " " + Messages.getString("isInUse"),
myProzess.getImageFolderInUseUser().getNachVorname());
}
}
@@ -660,7 +661,7 @@
if (!proz.isImageFolderInUse()) {
myDav.DownloadToHome(proz, 0, false);
} else {
- Helper.setMeldung(null, Helper.getTranslation("directory ") + " " + proz.getTitel() + " " + Helper.getTranslation("isInUse"), proz
+ Helper.setMeldung(null, Messages.getString("directory ") + " " + proz.getTitel() + " " + Messages.getString("isInUse"), proz
.getImageFolderInUseUser().getNachVorname());
}
}
@@ -675,7 +676,7 @@
if (!proz.isImageFolderInUse()) {
myDav.DownloadToHome(proz, 0, false);
} else {
- Helper.setMeldung(null, Helper.getTranslation("directory ") + " " + proz.getTitel() + " " + Helper.getTranslation("isInUse"),
+ Helper.setMeldung(null, Messages.getString("directory ") + " " + proz.getTitel() + " " + Messages.getString("isInUse"),
proz.getImageFolderInUseUser().getNachVorname());
}
}
@@ -690,7 +691,7 @@
if (!proz.isImageFolderInUse()) {
myDav.DownloadToHome(proz, 0, false);
} else {
- Helper.setMeldung(null, Helper.getTranslation("directory ") + " " + proz.getTitel() + " " + Helper.getTranslation("isInUse"), proz
+ Helper.setMeldung(null, Messages.getString("directory ") + " " + proz.getTitel() + " " + Messages.getString("isInUse"), proz
.getImageFolderInUseUser().getNachVorname());
}
}
=== modified file 'src/de/sub/goobi/forms/SpracheForm.java'
--- src/de/sub/goobi/forms/SpracheForm.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/forms/SpracheForm.java 2012-04-27 07:27:33 +0000
@@ -27,58 +27,63 @@
import javax.faces.context.FacesContext;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
- * Klasse SpracheForm für die Umstellung der Sprache aus dem
- * laufenden Servlet
+ * The SpracheForm class serves to switch the displayed language for the current
+ * user in the running application
*/
public class SpracheForm {
- private Locale locale;
-
-
-
- public SpracheForm() {
- while (FacesContext.getCurrentInstance().getApplication().getSupportedLocales().hasNext()){
- locale = (Locale) FacesContext.getCurrentInstance().getApplication().getSupportedLocales().next();
- break;
- }
-
- FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
- Helper.loadLanguageBundle();
- }
-
-
-
- /**
- * ermitteln auf welche Sprache umgestellt werden soll
- *
- * @return Navigationsanweisung "null" als String - daher ein Reload der gleichen Seite mit neuer Sprache
- */
- public String SpracheUmschalten() {
-
- String aktuelleSprache = Helper.getRequestParameter("locale");
-
- if ("en".equals(aktuelleSprache))
- locale = Locale.UK;
-
- if ("de".equals(aktuelleSprache))
- locale = Locale.GERMANY;
-
- if ("ru".equals(aktuelleSprache))
- locale = new Locale("ru", "RU");
-
- if ("es".equals(aktuelleSprache)) {
- locale = new Locale("es");
- }
-
- FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
- Helper.loadLanguageBundle();
- return Helper.getRequestParameter("ziel");
- }
-
-
-
- public Locale getLocale() {
- return locale;
- }
+ private Locale locale;
+
+ /**
+ * The constructor of this class sets the locale to the first available
+ * value and loads the required MessageBundle
+ */
+ public SpracheForm() {
+ while (FacesContext.getCurrentInstance().getApplication()
+ .getSupportedLocales().hasNext()) {
+ locale = (Locale) FacesContext.getCurrentInstance()
+ .getApplication().getSupportedLocales().next();
+ break;
+ }
+ FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
+ Messages.loadLanguageBundle();
+ }
+
+ /**
+ * The procedure switchLanguage is used to alter the application’s interface
+ * language.
+ *
+ * @param langCodeCombined
+ * This parameter can be either of form “‹language›” or of form
+ * “‹language›_‹country›”, e.g. “en” or “en_GB” are valid values.
+ */
+ public void switchLanguage(String langCodeCombined) {
+ String[] languageCode = langCodeCombined.split("_");
+ if (languageCode.length == 2) {
+ locale = new Locale(languageCode[0], languageCode[1]);
+ } else {
+ locale = new Locale(languageCode[0]);
+ }
+ FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
+ Messages.loadLanguageBundle();
+ }
+
+ /**
+ * The procedure SpracheUmschalten is called from /pages/Metadaten2oben.jsp
+ * to switch the language.
+ *
+ * @return the empty String to point to the JSF framework to remain on the
+ * current page
+ */
+ public String SpracheUmschalten() {
+ String languageCodeCombined = Helper.getRequestParameter("locale");
+ switchLanguage(languageCodeCombined);
+ return Helper.getRequestParameter("ziel");
+ }
+
+ public Locale getLocale() {
+ return locale;
+ }
}
=== modified file 'src/de/sub/goobi/helper/Helper.java'
--- src/de/sub/goobi/helper/Helper.java 2012-02-24 13:46:03 +0000
+++ src/de/sub/goobi/helper/Helper.java 2012-04-27 07:27:33 +0000
@@ -23,8 +23,6 @@
package de.sub.goobi.helper;
import java.io.*;
-import java.net.URL;
-import java.net.URLClassLoader;
import java.text.DateFormat;
import java.util.*;
@@ -61,8 +59,6 @@
private String myMetadatenVerzeichnis;
private String myConfigVerzeichnis;
- static ResourceBundle bundle;
- static ResourceBundle localBundle;
/**
* Ermitteln eines bestimmten Paramters des Requests
@@ -173,12 +169,12 @@
String msg = "";
String beschr = "";
try {
- msg = bundle.getString(meldung);
+ msg = Messages.getString(meldung);
} catch (RuntimeException e) {
msg = meldung;
}
try {
- beschr = bundle.getString(beschreibung);
+ beschr = Messages.getString(beschreibung);
} catch (RuntimeException e) {
beschr = beschreibung;
}
@@ -343,58 +339,6 @@
callShell(command);
}
- public static void loadLanguageBundle() {
- myLogger.info("Loading message bundles.");
- bundle = ResourceBundle.getBundle("messages.messages", FacesContext.getCurrentInstance().getViewRoot().getLocale());
- localBundle = loadLocalMessageBundleIfAvailable();
- }
-
- /**
- * Load local message bundle from file system only if file exists.
- *
- * @return Resource bundle for local messages. Returns NULL if no local message bundle could be found.
- */
- private static ResourceBundle loadLocalMessageBundleIfAvailable() {
- String localMessages = ConfigMain.getParameter("localMessages");
- if (localMessages != null) {
- File file = new File(localMessages);
- if (file.exists()) {
- myLogger.info("Local message bundle found: " + localMessages);
- try {
- URL resourceURL = file.toURI().toURL();
- URLClassLoader urlLoader = new URLClassLoader(new URL[] { resourceURL });
- return ResourceBundle.getBundle("messages", FacesContext.getCurrentInstance().getViewRoot().getLocale(), urlLoader);
- } catch (java.net.MalformedURLException muex) {
- myLogger.error("Error reading local message bundle", muex);
- }
- }
- }
- return null;
- }
-
- public static String getTranslation(String dbTitel) {
- // running instance of ResourceBundle doesn't respond on user language changes, workaround by instanciating it every time
-
- try {
- if (localBundle != null) {
- if (localBundle.containsKey(dbTitel)) {
- String trans = localBundle.getString(dbTitel);
- return trans;
- }
- if (localBundle.containsKey(dbTitel.toLowerCase())) {
- return localBundle.getString(dbTitel.toLowerCase());
- }
- }
- } catch (RuntimeException e) {
- }
- try {
- String msg = bundle.getString(dbTitel);
- return msg;
- } catch (RuntimeException e) {
- return dbTitel;
- }
- }
-
/**
* for easy access of the implemented Interface Observer
*
=== added file 'src/de/sub/goobi/helper/Messages.java'
--- src/de/sub/goobi/helper/Messages.java 1970-01-01 00:00:00 +0000
+++ src/de/sub/goobi/helper/Messages.java 2012-04-27 07:27:33 +0000
@@ -0,0 +1,105 @@
+/*
+ * This file is part of the Goobi Application - a Workflow tool for the support of
+ * mass digitization.
+ *
+ * Visit the websites for more information.
+ * - http://gdz.sub.uni-goettingen.de
+ * - http://www.goobi.org
+ * - http://launchpad.net/goobi-production
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package de.sub.goobi.helper;
+
+import de.sub.goobi.config.ConfigMain;
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ResourceBundle;
+import javax.faces.context.FacesContext;
+import org.apache.log4j.Logger;
+
+public class Messages {
+ private static final Logger logger = Logger.getLogger(Messages.class);
+
+ private static ResourceBundle bundle;
+ private static ResourceBundle localBundle;
+
+ public static void loadLanguageBundle() {
+ bundle = ResourceBundle.getBundle("messages", FacesContext
+ .getCurrentInstance().getViewRoot().getLocale());
+ localBundle = loadLocalMessageBundleIfAvailable();
+ }
+
+ /**
+ * A parameter “localMessages” can be configured in GoobiConfig.properties.
+ * If this points to a valid path where the messages_*.properties files can
+ * be found, these are used instead. Load local message bundle from file
+ * system only if file exists.
+ *
+ * @return Resource bundle for local messages. Returns NULL if no local
+ * message bundle could be found.
+ */
+ private static ResourceBundle loadLocalMessageBundleIfAvailable() {
+ String localMessages = ConfigMain.getParameter("localMessages");
+ if (localMessages != null) {
+ File path = new File(localMessages);
+ if (path.exists()) {
+ try {
+ URL pathURL = path.toURI().toURL();
+ URLClassLoader urlLoader = new URLClassLoader(
+ new URL[] { pathURL });
+ return ResourceBundle.getBundle("messages", FacesContext
+ .getCurrentInstance().getViewRoot().getLocale(),
+ urlLoader);
+ } catch (java.net.MalformedURLException e) {
+ logger.error("Error reading local message bundle", e);
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * The function getString() returns the translated key in the given language.
+ *
+ * @param key
+ * A key to to be looked up in the messages.
+ * @return The verbalisation for the given key in the chosen application
+ * frontend’s language
+ */
+ public static String getString(String key) {
+ // running instance of ResourceBundle doesn't respond on user language
+ // changes, workaround by instantiating it every time
+
+ try {
+ if (localBundle != null) {
+ if (localBundle.containsKey(key)) {
+ String trans = localBundle.getString(key);
+ return trans;
+ }
+ if (localBundle.containsKey(key.toLowerCase())) {
+ return localBundle.getString(key.toLowerCase());
+ }
+ }
+ } catch (RuntimeException e) {
+ }
+ try {
+ String msg = bundle.getString(key);
+ return msg;
+ } catch (RuntimeException e) {
+ return key;
+ }
+ }
+}
=== modified file 'src/de/sub/goobi/helper/enums/HistoryEventType.java'
--- src/de/sub/goobi/helper/enums/HistoryEventType.java 2011-12-20 08:07:09 +0000
+++ src/de/sub/goobi/helper/enums/HistoryEventType.java 2012-04-27 07:27:33 +0000
@@ -22,7 +22,7 @@
package de.sub.goobi.helper.enums;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum of all history event types for all history events for processes
@@ -115,7 +115,7 @@
* @return title as translated string for current locale from standard-jsf-messages
*/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
=== modified file 'src/de/sub/goobi/helper/enums/StepEditType.java'
--- src/de/sub/goobi/helper/enums/StepEditType.java 2011-12-20 08:07:09 +0000
+++ src/de/sub/goobi/helper/enums/StepEditType.java 2012-04-27 07:27:33 +0000
@@ -22,7 +22,7 @@
package de.sub.goobi.helper.enums;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum for edit type of task steps each one has an integer value, and a title
@@ -78,7 +78,7 @@
* @return title as translated string for current locale
*/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
/**
=== modified file 'src/de/sub/goobi/helper/enums/StepStatus.java'
--- src/de/sub/goobi/helper/enums/StepStatus.java 2011-12-20 08:07:09 +0000
+++ src/de/sub/goobi/helper/enums/StepStatus.java 2012-04-27 07:27:33 +0000
@@ -22,7 +22,7 @@
package de.sub.goobi.helper.enums;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum for status of steps, each one with integer value for database, with
@@ -79,7 +79,7 @@
* @return title as translated string for current locale from standard-jsf-messages
*/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
/**
=== modified file 'src/de/sub/goobi/helper/exceptions/GUIExceptionWrapper.java'
--- src/de/sub/goobi/helper/exceptions/GUIExceptionWrapper.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/helper/exceptions/GUIExceptionWrapper.java 2012-04-27 07:27:33 +0000
@@ -26,7 +26,7 @@
import java.util.Date;
import de.sub.goobi.config.ConfigMain;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* This class provides the tools it takes to generate a configurable Error
@@ -87,7 +87,7 @@
*
*/
- private String fallBackErrorMessage = Helper.getTranslation("err_fallBackMessage");
+ private String fallBackErrorMessage = Messages.getString("err_fallBackMessage");
private String userSeenErrorMessage = "";
@@ -133,14 +133,14 @@
try {
if (ConfigMain.getBooleanParameter("err_userHandling")) {
- err_linkText = Helper.getTranslation("err_linkText");
- err_linkText = err_linkText.replace("{0}", Helper.getTranslation("err_linkToPage")).replace("err_linkToPage", "./Main.jsf");
+ err_linkText = Messages.getString("err_linkText");
+ err_linkText = err_linkText.replace("{0}", Messages.getString("err_linkToPage")).replace("err_linkToPage", "./Main.jsf");
if (ConfigMain.getBooleanParameter("err_emailEnabled")) {
- err_emailMessage = Helper.getTranslation("err_emailMessage");
- err_subjectLine = Helper.getTranslation("err_subjectLine");
- err_emailBody = Helper.getTranslation("err_emailBody");
+ err_emailMessage = Messages.getString("err_emailMessage");
+ err_subjectLine = Messages.getString("err_subjectLine");
+ err_emailBody = Messages.getString("err_emailBody");
Integer emailCounter = Integer.valueOf(0);
String email = "";
@@ -156,7 +156,7 @@
} else {
// no email service enabled, build standard message
- err_emailMessage = Helper.getTranslation("err_noMailService");
+ err_emailMessage = Messages.getString("err_noMailService");
}
} else {
@@ -209,7 +209,7 @@
} else {
// if no adresse a general text will be provided by this class
- emailPart = Helper.getTranslation("err_noMailService");
+ emailPart = Messages.getString("err_noMailService");
}
userSeenErrorMessage = internalErrorMsg + linkPart + htmlLineFeed
=== modified file 'src/de/sub/goobi/helper/servletfilter/RequestControlFilter.java'
--- src/de/sub/goobi/helper/servletfilter/RequestControlFilter.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/helper/servletfilter/RequestControlFilter.java 2012-04-27 07:27:33 +0000
@@ -163,7 +163,7 @@
try {
chain.doFilter(request, response);
} catch (LazyInitializationException e) {
- Helper.setFehlerMeldung(de.sub.goobi.helper.Helper.getTranslation("aLazyInitializationErrorOcurred"));
+ Helper.setFehlerMeldung(de.sub.goobi.helper.Messages.getString("aLazyInitializationErrorOcurred"));
}
finally {
=== modified file 'src/de/sub/goobi/metadaten/Metadaten.java'
--- src/de/sub/goobi/metadaten/Metadaten.java 2012-02-22 11:26:21 +0000
+++ src/de/sub/goobi/metadaten/Metadaten.java 2012-04-27 07:27:33 +0000
@@ -73,6 +73,7 @@
import de.sub.goobi.helper.FileUtils;
import de.sub.goobi.helper.Helper;
import de.sub.goobi.helper.HelperComparator;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.Transliteration;
import de.sub.goobi.helper.TreeNode;
import de.sub.goobi.helper.XmlArtikelZaehlen;
@@ -611,7 +612,7 @@
// this exception needs some serious feedback because data is corrupted
if (logicalTopstruct == null) {
- throw new ReadException(Helper.getTranslation("metaDataError"));
+ throw new ReadException(Messages.getString("metaDataError"));
}
BildErmitteln(0);
=== modified file 'src/de/sub/goobi/persistence/HibernateSessionConversationFilter.java'
--- src/de/sub/goobi/persistence/HibernateSessionConversationFilter.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/persistence/HibernateSessionConversationFilter.java 2012-04-27 07:27:33 +0000
@@ -41,7 +41,7 @@
import org.hibernate.StaleObjectStateException;
import org.hibernate.context.ManagedSessionContext;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.exceptions.GUIExceptionWrapper;
public class HibernateSessionConversationFilter implements Filter {
@@ -72,13 +72,13 @@
}
} catch (Exception e) {
- throw new ServletException(new GUIExceptionWrapper(Helper.getTranslation("err_noConnectionEstablished") + " Establishing Sessions", e));
+ throw new ServletException(new GUIExceptionWrapper(Messages.getString("err_noConnectionEstablished") + " Establishing Sessions", e));
}
try {
ManagedSessionContext.bind(currentSession);
} catch (Exception e) {
- throw new ServletException(new GUIExceptionWrapper(Helper.getTranslation("err_noConnectionEstablished") + " ManagedSessionContext", e));
+ throw new ServletException(new GUIExceptionWrapper(Messages.getString("err_noConnectionEstablished") + " ManagedSessionContext", e));
}
try {
@@ -86,7 +86,7 @@
} catch (HibernateException e) {
log.error("no database connection available", e);
ManagedSessionContext.unbind(sf);
- throw new ServletException(new GUIExceptionWrapper(Helper.getTranslation("err_noConnectionEstablished") + " BeginTransaction", e));
+ throw new ServletException(new GUIExceptionWrapper(Messages.getString("err_noConnectionEstablished") + " BeginTransaction", e));
}
// #################################
=== modified file 'src/de/sub/goobi/persistence/HibernateSessionConversationFilterWithoutTransaction.java'
--- src/de/sub/goobi/persistence/HibernateSessionConversationFilterWithoutTransaction.java 2012-02-22 07:43:02 +0000
+++ src/de/sub/goobi/persistence/HibernateSessionConversationFilterWithoutTransaction.java 2012-04-27 07:27:33 +0000
@@ -40,7 +40,7 @@
import org.hibernate.StaleObjectStateException;
import org.hibernate.context.ManagedSessionContext;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.exceptions.GUIExceptionWrapper;
public class HibernateSessionConversationFilterWithoutTransaction implements Filter {
@@ -71,13 +71,13 @@
}
} catch (Exception e) {
- throw new ServletException(new GUIExceptionWrapper(Helper.getTranslation("err_noConnectionEstablished") + " Establishing Sessions", e));
+ throw new ServletException(new GUIExceptionWrapper(Messages.getString("err_noConnectionEstablished") + " Establishing Sessions", e));
}
try {
ManagedSessionContext.bind(currentSession);
} catch (Exception e) {
- throw new ServletException(new GUIExceptionWrapper(Helper.getTranslation("err_noConnectionEstablished") + " ManagedSessionContext", e));
+ throw new ServletException(new GUIExceptionWrapper(Messages.getString("err_noConnectionEstablished") + " ManagedSessionContext", e));
}
// #################################
=== removed directory 'src/messages'
=== removed file 'src/messages/Messages.java'
--- src/messages/Messages.java 2012-02-15 06:59:40 +0000
+++ src/messages/Messages.java 1970-01-01 00:00:00 +0000
@@ -1,96 +0,0 @@
-/*
- * This file is part of the Goobi Application - a Workflow tool for the support of
- * mass digitization.
- *
- * Visit the websites for more information.
- * - http://gdz.sub.uni-goettingen.de
- * - http://www.goobi.org
- * - http://launchpad.net/goobi-production
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
- * Suite 330, Boston, MA 02111-1307 USA
- */
-
-package messages;
-
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ResourceBundle;
-
-import javax.faces.context.FacesContext;
-
-import de.sub.goobi.config.ConfigMain;
-
-import org.apache.log4j.Logger;
-
-public class Messages {
- private static final String BUNDLE_NAME = "messages.intmessages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
- static ResourceBundle localBundle;
-
- private static final Logger myLogger = Logger.getLogger(Messages.class);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- // load local message bundle if not yet loaded
- if (localBundle == null) {
- localBundle = loadLocalMessageBundleIfAvailable();
- }
-
- // do local translation
- if (localBundle != null) {
- if (localBundle.containsKey(key)) {
- String trans = localBundle.getString(key);
- return trans;
- }
- if (localBundle.containsKey(key.toLowerCase())) {
- return localBundle.getString(key.toLowerCase());
- }
- }
-
- // fallback to default resource bundle
- if (RESOURCE_BUNDLE.containsKey(key)) {
- String msg = RESOURCE_BUNDLE.getString(key);
- return msg;
- } else {
- return key;
- }
- }
-
- /**
- * Load local message bundle from file system only if file exists.
- *
- * @return Resource bundle for local messages. Returns NULL if no local message bundle could be found.
- */
- private static ResourceBundle loadLocalMessageBundleIfAvailable() {
- String localMessages = ConfigMain.getParameter("localMessages");
- if (localMessages != null) {
- File file = new File(localMessages);
- if (file.exists()) {
- myLogger.info("Local message bundle found: " + localMessages);
- try {
- URL resourceURL = file.toURI().toURL();
- URLClassLoader urlLoader = new URLClassLoader(new URL[] { resourceURL });
- return ResourceBundle.getBundle("messages", FacesContext.getCurrentInstance().getViewRoot().getLocale(), urlLoader);
- } catch (java.net.MalformedURLException muex) {
- myLogger.error("Error reading local message bundle", muex);
- }
- }
- }
- return null;
- }
-
-}
=== removed file 'src/messages/intmessages.properties'
--- src/messages/intmessages.properties 2011-12-20 08:07:09 +0000
+++ src/messages/intmessages.properties 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-#
-# This file is part of the Goobi Application - a Workflow tool for the support of
-# mass digitization.
-#
-# Visit the websites for more information.
-# - http://gdz.sub.uni-goettingen.de
-# - http://www.goobi.org
-# - http://launchpad.net/goobi-production
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU General Public License for more details. You
-# should have received a copy of the GNU General Public License along with this
-# program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
-#
-
-#Created by JInto - www.guh-software.de
-#Mon Sep 22 18:02:30 CEST 2008
-KorrekturFuer=Korrektur f\u00FCr Schritt
-KorrekturloesungFuer=Korrekturl\u00F6sung f\u00FCr Schritt
=== modified file 'src/org/goobi/production/flow/statistics/enums/CalculationUnit.java'
--- src/org/goobi/production/flow/statistics/enums/CalculationUnit.java 2011-12-20 08:07:09 +0000
+++ src/org/goobi/production/flow/statistics/enums/CalculationUnit.java 2012-04-27 07:27:33 +0000
@@ -22,7 +22,7 @@
package org.goobi.production.flow.statistics.enums;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum of all calculation units for the statistics
@@ -66,7 +66,7 @@
* @return localized title
****************************************************************************/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
/**
=== modified file 'src/org/goobi/production/flow/statistics/enums/ResultOutput.java'
--- src/org/goobi/production/flow/statistics/enums/ResultOutput.java 2011-12-20 08:07:09 +0000
+++ src/org/goobi/production/flow/statistics/enums/ResultOutput.java 2012-04-27 07:27:33 +0000
@@ -22,7 +22,7 @@
package org.goobi.production.flow.statistics.enums;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum of all result output possibilities for the statistics
@@ -66,7 +66,7 @@
* @return localized title
****************************************************************************/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
/**
=== modified file 'src/org/goobi/production/flow/statistics/enums/StatisticsMode.java'
--- src/org/goobi/production/flow/statistics/enums/StatisticsMode.java 2011-12-20 08:07:09 +0000
+++ src/org/goobi/production/flow/statistics/enums/StatisticsMode.java 2012-04-27 07:27:33 +0000
@@ -31,7 +31,7 @@
import org.goobi.production.flow.statistics.hibernate.StatQuestUsergroups;
import org.goobi.production.flow.statistics.hibernate.StatQuestVolumeStatus;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum for all statistic modes,
@@ -109,7 +109,7 @@
* @return title of statistic question mode
****************************************************************************/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
/**
=== modified file 'src/org/goobi/production/flow/statistics/enums/TimeUnit.java'
--- src/org/goobi/production/flow/statistics/enums/TimeUnit.java 2011-12-20 08:07:09 +0000
+++ src/org/goobi/production/flow/statistics/enums/TimeUnit.java 2012-04-27 07:27:33 +0000
@@ -30,7 +30,7 @@
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* Enum of all time units for the statistics
@@ -105,7 +105,7 @@
* @return localized title
****************************************************************************/
public String getTitle() {
- return Helper.getTranslation(title);
+ return Messages.getString(title);
}
/**
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java 2011-12-20 08:07:09 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestCorrections.java 2012-04-27 07:27:33 +0000
@@ -41,6 +41,7 @@
import de.intranda.commons.chart.results.DataRow;
import de.intranda.commons.chart.results.DataTable;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.HistoryEventType;
/*****************************************************************************
@@ -114,7 +115,7 @@
DataTable dtbl = new DataTable(StatisticsMode.getByClassName(
this.getClass()).getTitle()
- + Helper.getTranslation("_(number)"));
+ + Messages.getString("_(number)"));
DataRow dataRow;
@@ -133,7 +134,7 @@
dataRow.setName(new Converter(objArr[1]).getString() + "");
//dataRow.setName(new converter(objArr[2]).getString());
- dataRow.addValue(Helper.getTranslation("Corrections/Errors"),
+ dataRow.addValue(Messages.getString("Corrections/Errors"),
(new Converter(objArr[0]).getDouble()));
} catch (Exception e) {
@@ -146,7 +147,7 @@
// a list of DataTables is expected as return Object, even if there is only one
// Data Table as it is here in this implementation
- dtbl.setUnitLabel(Helper.getTranslation(getTimeUnit()
+ dtbl.setUnitLabel(Messages.getString(getTimeUnit()
.getSingularTitle()));
allTables.add(dtbl);
return allTables;
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java 2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProduction.java 2012-04-27 07:27:33 +0000
@@ -41,6 +41,7 @@
import de.intranda.commons.chart.results.DataTable;
import de.sub.goobi.beans.Prozess;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/**
* This class is an implementation of {@link IStatisticalQuestionLimitedTimeframe} and retrieves statistical Data about the productivity of the
@@ -199,8 +200,8 @@
// a list of DataTables is expected as return Object, even if there is only one
// Data Table as it is here in this implementation
- dtblChart.setUnitLabel(Helper.getTranslation(timeGrouping.getSingularTitle()));
- dtbl.setUnitLabel(Helper.getTranslation(timeGrouping.getSingularTitle()));
+ dtblChart.setUnitLabel(Messages.getString(timeGrouping.getSingularTitle()));
+ dtbl.setUnitLabel(Messages.getString(timeGrouping.getSingularTitle()));
dtblChart.setShowableInTable(false);
dtbl.setShowableInChart(false);
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectAssociations.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectAssociations.java 2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectAssociations.java 2012-04-27 07:27:33 +0000
@@ -38,7 +38,7 @@
import de.intranda.commons.chart.renderer.IRenderer;
import de.intranda.commons.chart.results.DataRow;
import de.intranda.commons.chart.results.DataTable;
-import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/*****************************************************************************
* Implementation of {@link IStatisticalQuestion}.
@@ -85,7 +85,7 @@
DataTable dtbl = new DataTable(title.toString());
dtbl.setShowableInPieChart(true);
- DataRow dRow = new DataRow(Helper.getTranslation("count"));
+ DataRow dRow = new DataRow(Messages.getString("count"));
for (Object obj : crit.list()) {
Object[] objArr = (Object[]) obj;
@@ -96,7 +96,7 @@
List<DataTable> allTables = new ArrayList<DataTable>();
- dtbl.setUnitLabel(Helper.getTranslation("project"));
+ dtbl.setUnitLabel(Messages.getString("project"));
allTables.add(dtbl);
return allTables;
}
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java 2012-02-22 11:26:21 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestProjectProgressData.java 2012-04-27 07:27:33 +0000
@@ -43,6 +43,7 @@
import de.intranda.commons.chart.results.DataRow;
import de.intranda.commons.chart.results.DataTable;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.HistoryEventType;
/*****************************************************************************
@@ -144,7 +145,7 @@
* generate requiredOutputLine
*/
private DataRow requiredOutput() {
- DataRow dataRow = new DataRow(Helper.getTranslation("requiredOutput"));
+ DataRow dataRow = new DataRow(Messages.getString("requiredOutput"));
dataRow.setShowPoint(false);
Double requiredOutputPerTimeUnit = this.requiredDailyOutput * this.timeGrouping.getDayFactor();
@@ -162,7 +163,7 @@
*/
private DataRow referenceCurve(DataRow referenceRow) {
DataRow orientationRow = requiredOutput();
- DataRow dataRow = new DataRow(Helper.getTranslation("ReferenceCurve"));
+ DataRow dataRow = new DataRow(Messages.getString("ReferenceCurve"));
dataRow.setShowPoint(false);
// may have to be calculated differently
@@ -248,8 +249,8 @@
DataTable tableStepCompleted = getAllSteps(HistoryEventType.stepDone);
- tableStepCompleted.setUnitLabel(Helper.getTranslation(timeGrouping.getSingularTitle()));
- tableStepCompleted.setName(Helper.getTranslation("doneSteps"));
+ tableStepCompleted.setUnitLabel(Messages.getString(timeGrouping.getSingularTitle()));
+ tableStepCompleted.setName(Messages.getString("doneSteps"));
// show in line graph
tableStepCompleted.setShowableInChart(true);
@@ -434,7 +435,7 @@
public List<String> getSelectableSteps() {
List<String> selectableList = new ArrayList<String>();
- selectableList.add(Helper.getTranslation("selectAll"));
+ selectableList.add(Messages.getString("selectAll"));
for (StepInformation steps : this.commonWorkFlow) {
selectableList.add(steps.getTitle());
}
@@ -443,7 +444,7 @@
public void setSelectedSteps(List<String> inSteps){
isDirty=true;
- if (inSteps.contains(Helper.getTranslation("selectAll"))) {
+ if (inSteps.contains(Messages.getString("selectAll"))) {
this.selectedSteps = new ArrayList<String>();
for (StepInformation steps : this.commonWorkFlow) {
this.selectedSteps.add(steps.getTitle());
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java 2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestStorage.java 2012-04-27 07:27:33 +0000
@@ -41,6 +41,7 @@
import de.intranda.commons.chart.results.DataRow;
import de.intranda.commons.chart.results.DataTable;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/*****************************************************************************
* Implementation of {@link IStatisticalQuestion}.
@@ -103,7 +104,7 @@
DataTable dtbl = new DataTable(StatisticsMode.getByClassName(
this.getClass()).getTitle() + " "
- + Helper.getTranslation("_inGB"));
+ + Messages.getString("_inGB"));
DataRow dataRow;
@@ -122,7 +123,7 @@
dataRow.setName(new Converter(objArr[1]).getString() + "");
- dataRow.addValue(Helper.getTranslation("storageDifference"),
+ dataRow.addValue(Messages.getString("storageDifference"),
(new Converter(objArr[0]).getGB()));
} catch (Exception e) {
@@ -135,8 +136,7 @@
// a list of DataTables is expected as return Object, even if there is only one
// Data Table as it is here in this implementation
- dtbl.setUnitLabel(Helper
- .getTranslation(timeGrouping.getSingularTitle()));
+ dtbl.setUnitLabel(Messages.getString(timeGrouping.getSingularTitle()));
allTables.add(dtbl);
return allTables;
}
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java 2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestThroughput.java 2012-04-27 07:27:33 +0000
@@ -44,6 +44,7 @@
import de.intranda.commons.chart.results.DataRow;
import de.intranda.commons.chart.results.DataTable;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
import de.sub.goobi.helper.enums.HistoryEventType;
/*****************************************************************************
@@ -121,20 +122,20 @@
// a list of DataTables is expected as return Object, even if there is only one
// Data Table as it is here in this implementation
DataTable tableStepOpenAndDone = getAllSteps(HistoryEventType.stepOpen);
- tableStepOpenAndDone.setUnitLabel(Helper
- .getTranslation(timeGrouping.getSingularTitle()));
+ tableStepOpenAndDone.setUnitLabel(Messages
+ .getString(timeGrouping.getSingularTitle()));
tableStepOpenAndDone.setName(StatisticsMode.getByClassName(this.getClass()).getTitle()
- + " (" + Helper.getTranslation("openSteps") + ")");
+ + " (" + Messages.getString("openSteps") + ")");
tableStepOpenAndDone = tableStepOpenAndDone.getDataTableInverted();
tableStepOpenAndDone = tableStepOpenAndDone.getDataTableInverted();
tableStepOpenAndDone.setShowableInChart(false);
allTables.add(tableStepOpenAndDone);
tableStepOpenAndDone = getAllSteps(HistoryEventType.stepDone);
- tableStepOpenAndDone.setUnitLabel(Helper
- .getTranslation(timeGrouping.getSingularTitle()));
+ tableStepOpenAndDone.setUnitLabel(Messages
+ .getString(timeGrouping.getSingularTitle()));
tableStepOpenAndDone.setName(StatisticsMode.getByClassName(this.getClass()).getTitle()
- + " (" + Helper.getTranslation("doneSteps") + ")");
+ + " (" + Messages.getString("doneSteps") + ")");
tableStepOpenAndDone.setShowableInChart(false);
tableStepOpenAndDone = tableStepOpenAndDone.getDataTableInverted();
tableStepOpenAndDone = tableStepOpenAndDone.getDataTableInverted();
@@ -181,7 +182,7 @@
// to merge we just take each table and dump the entire content in a
// row for the open step
- DataRow rowOpenSteps = new DataRow(Helper.getTranslation("openSteps")
+ DataRow rowOpenSteps = new DataRow(Messages.getString("openSteps")
+ " " + i.toString());
for (DataRow dtr : tableStepOpen.getDataRows()) {
rowOpenSteps.addValue(dtr.getName(), dtr.getValue(0));
@@ -195,12 +196,12 @@
title = tableStepDone.getName();
}
- tableStepOpenAndDone = new DataTable(Helper.getTranslation("throughput") + " "
- + Helper.getTranslation("steps") + " " + title);
+ tableStepOpenAndDone = new DataTable(Messages.getString("throughput") + " "
+ + Messages.getString("steps") + " " + title);
tableStepOpenAndDone.addDataRow(rowOpenSteps);
// row for the done step
- rowOpenSteps = new DataRow(Helper.getTranslation("doneSteps") + " "
+ rowOpenSteps = new DataRow(Messages.getString("doneSteps") + " "
+ i.toString());
for (DataRow dtr : tableStepDone.getDataRows()) {
rowOpenSteps.addValue(dtr.getName(), dtr.getValue(0));
@@ -214,7 +215,7 @@
//inverting the orientation
tableStepOpenAndDone = tableStepOpenAndDone.getDataTableInverted();
- tableStepOpenAndDone.setUnitLabel(Helper.getTranslation(timeGrouping
+ tableStepOpenAndDone.setUnitLabel(Messages.getString(timeGrouping
.getSingularTitle()));
//Dates may not be all in the right order because of it's composition from 2 tables
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestUsergroups.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestUsergroups.java 2012-02-22 11:26:21 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestUsergroups.java 2012-04-27 07:27:33 +0000
@@ -40,6 +40,7 @@
import de.sub.goobi.beans.Benutzergruppe;
import de.sub.goobi.beans.Schritt;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/*****************************************************************************
* Implementation of {@link IStatisticalQuestion}.
@@ -74,7 +75,7 @@
DataTable dtbl = new DataTable(title.toString());
dtbl.setShowableInPieChart(true);
- DataRow dRow = new DataRow(Helper.getTranslation("count"));
+ DataRow dRow = new DataRow(Messages.getString("count"));
for (Object obj : crit.list()) {
Schritt step = (Schritt) obj;
@@ -86,7 +87,7 @@
dtbl.addDataRow(dRow);
List<DataTable> allTables = new ArrayList<DataTable>();
- dtbl.setUnitLabel(Helper.getTranslation("benutzergruppe"));
+ dtbl.setUnitLabel(Messages.getString("benutzergruppe"));
allTables.add(dtbl);
return allTables;
}
=== modified file 'src/org/goobi/production/flow/statistics/hibernate/StatQuestVolumeStatus.java'
--- src/org/goobi/production/flow/statistics/hibernate/StatQuestVolumeStatus.java 2012-02-22 07:43:02 +0000
+++ src/org/goobi/production/flow/statistics/hibernate/StatQuestVolumeStatus.java 2012-04-27 07:27:33 +0000
@@ -39,6 +39,7 @@
import de.intranda.commons.chart.results.DataTable;
import de.sub.goobi.beans.Schritt;
import de.sub.goobi.helper.Helper;
+import de.sub.goobi.helper.Messages;
/*****************************************************************************
* Implementation of {@link IStatisticalQuestion}.
@@ -73,7 +74,7 @@
DataTable dtbl = new DataTable(title.toString());
dtbl.setShowableInPieChart(true);
- DataRow dRow = new DataRow(Helper.getTranslation("count"));
+ DataRow dRow = new DataRow(Messages.getString("count"));
for (Object obj : crit.list()) {
Schritt step = (Schritt) obj;
@@ -84,7 +85,7 @@
dtbl.addDataRow(dRow);
List<DataTable> allTables = new ArrayList<DataTable>();
- dtbl.setUnitLabel(Helper.getTranslation("arbeitsschritt"));
+ dtbl.setUnitLabel(Messages.getString("arbeitsschritt"));
allTables.add(dtbl);
return allTables;
}
Follow ups