working on translation of system messages
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -125,7 +125,7 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
if (rs.next()) result = Bookmark.of(rs);
|
if (rs.next()) result = Bookmark.of(rs);
|
||||||
rs.close();
|
rs.close();
|
||||||
if (result != null) return result;
|
if (result != null) return result;
|
||||||
throw UmbrellaException.notFound("No bookmark with urlId {0}",id);
|
throw UmbrellaException.notFound("no_bookmark_for_urlid",id);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new UmbrellaException("Failed to load bookmark");
|
throw new UmbrellaException("Failed to load bookmark");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import static de.srsoftware.tools.jdbc.Query.insertInto;
|
|||||||
import static de.srsoftware.tools.jdbc.Query.select;
|
import static de.srsoftware.tools.jdbc.Query.select;
|
||||||
import static de.srsoftware.umbrella.contact.Constants.*;
|
import static de.srsoftware.umbrella.contact.Constants.*;
|
||||||
import static de.srsoftware.umbrella.core.Constants.*;
|
import static de.srsoftware.umbrella.core.Constants.*;
|
||||||
|
import static de.srsoftware.umbrella.core.Errors.FAILED_TO_LOAD_CONTACTS_OF_USER;
|
||||||
|
import static de.srsoftware.umbrella.core.Errors.FAILED_TO_LOAD_CONTACT_BY_ID;
|
||||||
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.databaseException;
|
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.databaseException;
|
||||||
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.notFound;
|
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.notFound;
|
||||||
import static java.text.MessageFormat.format;
|
import static java.text.MessageFormat.format;
|
||||||
@@ -94,9 +96,9 @@ public class SqliteDb extends BaseDb implements ContactDb{
|
|||||||
if (rs.next()) contact = Contact.of(rs);
|
if (rs.next()) contact = Contact.of(rs);
|
||||||
rs.close();
|
rs.close();
|
||||||
if (contact != null) return contact;
|
if (contact != null) return contact;
|
||||||
throw notFound("Failed to load contact with id = {0}", contactId);
|
throw notFound(FAILED_TO_LOAD_CONTACT_BY_ID, contactId);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw databaseException("Failed to load contacts of user {0}",userId);
|
throw databaseException(FAILED_TO_LOAD_CONTACTS_OF_USER,userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package de.srsoftware.umbrella.core;
|
||||||
|
|
||||||
|
public class Errors {
|
||||||
|
public static final String FAILED_TO_LOAD_CONTACT_BY_ID = "failed_to_load_contact_by_id";
|
||||||
|
public static final String FAILED_TO_LOAD_CONTACTS_OF_USER = "failed_to_load_contacts_of_user";
|
||||||
|
}
|
||||||
@@ -95,6 +95,8 @@
|
|||||||
|
|
||||||
"failed": "fehlgeschlagen",
|
"failed": "fehlgeschlagen",
|
||||||
"failed_login_attempts" : "Account nach {attempts} fehlgeschlagenen Logins gesperrt bis {release_time}",
|
"failed_login_attempts" : "Account nach {attempts} fehlgeschlagenen Logins gesperrt bis {release_time}",
|
||||||
|
"failed_to_load_contact_by_id": "Failed to load contact with id = {0}",
|
||||||
|
"failed_to_load_contacts_of_user": "Failed to load contacts of user {0}",
|
||||||
"family_name": "Familenname",
|
"family_name": "Familenname",
|
||||||
"file": "Datei",
|
"file": "Datei",
|
||||||
"files": "Dateien",
|
"files": "Dateien",
|
||||||
@@ -182,6 +184,7 @@
|
|||||||
"new_document_from": "{number} / neues {type}s-Dokument von {sender}",
|
"new_document_from": "{number} / neues {type}s-Dokument von {sender}",
|
||||||
"new_password": "neues Passwort",
|
"new_password": "neues Passwort",
|
||||||
"new_property": "neue Eigenschaft",
|
"new_property": "neue Eigenschaft",
|
||||||
|
"no_bookmark_for_urlid": "No bookmark with urlId {0}",
|
||||||
"no_company": "keine Firma",
|
"no_company": "keine Firma",
|
||||||
"no_project_for_id": "Kein Projekt mit ID {0} gefunden!",
|
"no_project_for_id": "Kein Projekt mit ID {0} gefunden!",
|
||||||
"no_task_for_id": "Keine Aufgabe mit ID {0} gefunden!",
|
"no_task_for_id": "Keine Aufgabe mit ID {0} gefunden!",
|
||||||
|
|||||||
Reference in New Issue
Block a user